• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_author_link函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_author_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_author_link函数的具体用法?PHP get_author_link怎么用?PHP get_author_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_author_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: archive_header

function archive_header(&$post, $before = '', $after = '')
{
    static $previous = '';
    if (test_param('orderby')) {
        $orderby = explode(' ', get_param('orderby'));
        $orderby = $orderby[0];
    } else {
        $orderby = '';
    }
    switch ($orderby) {
        case 'title':
            if (_LANGCODE == 'ja') {
                $thisletter = ucfirst(mb_substring($post->yomi, 0, 1, $GLOBALS['blog_charset']));
                if ($thisletter > "¤ó") {
                    $thisletter = "´Á»ú";
                }
            } else {
                $thisletter = ucfirst(substr($post->yomi, 0, 1));
            }
            if ($thisletter == "") {
                $thisletter = _WP_POST_NOTITLE;
            }
            if ($previous === '' || $thisletter !== $previous) {
                $output = "<br/>" . $thisletter;
            }
            $previous = $thisletter;
            break;
        case 'category':
            $thiscategory = $post->cat_ID;
            if ($thiscategory != $previous) {
                $output = '<br/><strong><a href="' . get_category_link(false, $thiscategory) . '">' . get_catname($thiscategory) . '</a></strong>';
            }
            $previous = $thiscategory;
            break;
        case 'author':
            $thisauthor = $post->post_author;
            if ($thisauthor != $previous) {
                $output = '<br/><strong><a href="' . get_author_link(false, $thisauthor) . '">' . the_author('', false) . '</a></strong>';
            }
            $previous = $thisauthor;
            break;
        case 'date':
        case '':
            $thismonth = mysql2date('m', $post->post_date);
            $thisyear = mysql2date('Y', $post->post_date);
            $thisdate = $thisyear . $thismonth;
            if ($thisdate != $previous) {
                $monthstr = format_month(sprintf("%d", $thisyear), $GLOBALS['month'][zeroise($thismonth, 2)]);
                $output = '<strong><br/><a href="' . get_month_link($thisyear, $thismonth) . '">' . $monthstr . '</a></strong>';
            }
            $previous = $thisdate;
            break;
    }
    if (!empty($output)) {
        $output = $before . $output . $after . "\n";
        echo $output;
    }
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:58,代码来源:nkarchives.php


示例2: printf

    printf(__('Permalink to %s', 'rawdata'), the_title_attribute('echo=0'));
    ?>
"
						rel="bookmark"><?php 
    the_title();
    ?>
 </a>
				</h2>
	
				<div class="entry-meta">
					<span class="meta-prep meta-prep-author"><?php 
    _e('By ', 'rawdata');
    ?>
					</span> <span class="author vcard"><a class="url fn n"
						href="<?php 
    echo get_author_link(false, $authordata->ID, $authordata->user_nicename);
    ?>
"
						title="<?php 
    printf(__('View all posts by %s', 'rawdata'), $authordata->display_name);
    ?>
"><?php 
    the_author();
    ?>
					</a> </span> <span class="meta-sep"> | </span> <span
						class="meta-prep meta-prep-entry-date"><?php 
    _e('Published ', 'rawdata');
    ?>
					</span> <span class="entry-date"><abbr class="published"
						title="<?php 
    the_time('Y-m-d\\TH:i:sO');
开发者ID:visual000,项目名称:misc,代码行数:31,代码来源:author.php


示例3: flush_post

 /**
  * Flushes post cache
  *
  * @param integer $post_id
  * @return boolean
  */
 function flush_post($post_id = null)
 {
     if (!$post_id) {
         $post_id = $this->_detect_post_id();
     }
     if ($post_id) {
         $uris = array();
         $domain_url = w3_get_domain_url();
         $feeds = $this->_config->get_array('pgcache.purge.feed.types');
         if ($this->_config->get_boolean('pgcache.purge.terms') || $this->_config->get_boolean('pgcache.purge.feed.terms')) {
             $taxonomies = get_post_taxonomies($post_id);
             $terms = nxt_get_post_terms($post_id, $taxonomies);
         }
         switch (true) {
             case $this->_config->get_boolean('pgcache.purge.author'):
             case $this->_config->get_boolean('pgcache.purge.archive.daily'):
             case $this->_config->get_boolean('pgcache.purge.archive.monthly'):
             case $this->_config->get_boolean('pgcache.purge.archive.yearly'):
             case $this->_config->get_boolean('pgcache.purge.feed.author'):
                 $post = get_post($post_id);
         }
         /**
          * Home URL
          */
         if ($this->_config->get_boolean('pgcache.purge.home')) {
             $home_path = w3_get_home_path();
             $site_path = w3_get_site_path();
             $uris[] = $home_path;
             if ($site_path != $home_path) {
                 $uris[] = $site_path;
             }
         }
         /**
          * Post URL
          */
         if ($this->_config->get_boolean('pgcache.purge.post')) {
             $post_link = post_permalink($post_id);
             $post_uri = str_replace($domain_url, '', $post_link);
             $uris[] = $post_uri;
         }
         /**
          * Post comments URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.comments') && function_exists('get_comments_pagenum_link')) {
             $comments_number = get_comments_number($post_id);
             $comments_per_page = get_option('comments_per_page');
             $comments_pages_number = @ceil($comments_number / $comments_per_page);
             for ($pagenum = 1; $pagenum <= $comments_pages_number; $pagenum++) {
                 $comments_pagenum_link = $this->_get_comments_pagenum_link($post_id, $pagenum);
                 $comments_pagenum_uri = str_replace($domain_url, '', $comments_pagenum_link);
                 $uris[] = $comments_pagenum_uri;
             }
         }
         /**
          * Post author URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.author') && $post) {
             $posts_number = count_user_posts($post->post_author);
             $posts_per_page = get_option('posts_per_page');
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $author_link = get_author_link(false, $post->post_author);
             $author_uri = str_replace($domain_url, '', $author_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $author_pagenum_link = $this->_get_pagenum_link($author_uri, $pagenum);
                 $author_pagenum_uri = str_replace($domain_url, '', $author_pagenum_link);
                 $uris[] = $author_pagenum_uri;
             }
         }
         /**
          * Post terms URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.terms')) {
             $posts_per_page = get_option('posts_per_page');
             foreach ($terms as $term) {
                 $term_link = get_term_link($term, $term->taxonomy);
                 $term_uri = str_replace($domain_url, '', $term_link);
                 $posts_pages_number = @ceil($term->count / $posts_per_page);
                 for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                     $term_pagenum_link = $this->_get_pagenum_link($term_uri, $pagenum);
                     $term_pagenum_uri = str_replace($domain_url, '', $term_pagenum_link);
                     $uris[] = $term_pagenum_uri;
                 }
             }
         }
         /**
          * Daily archive URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.archive.daily') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $post_month = gmdate('m', $post_date);
             $post_day = gmdate('d', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year, $post_month, $post_day);
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:PgCacheFlush.php


示例4: aiosp_mrt_get_url

 function aiosp_mrt_get_url($query)
 {
     global $aioseop_options;
     if ($query->is_404 || $query->is_search) {
         return false;
     }
     $haspost = count($query->posts) > 0;
     $has_ut = function_exists('user_trailingslashit');
     if (get_query_var('m')) {
         $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
         switch (strlen($m)) {
             case 4:
                 $link = get_year_link($m);
                 break;
             case 6:
                 $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
                 break;
             case 8:
                 $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
                 break;
             default:
                 return false;
         }
     } elseif (($query->is_single || $query->is_page) && $haspost) {
         $post = $query->posts[0];
         $link = get_permalink($post->ID);
         $link = $this->yoast_get_paged($link);
         /*	        if ($page && $page > 1) {
         	            $link = trailingslashit($link) . "page/". "$page";
         	            if ($has_ut) {
         	                $link = user_trailingslashit($link, 'paged');
         	            } else {
         	                $link .= '/';
         	            }
         	        }
         	        if ($query->is_page && ('page' == get_option('show_on_front')) && 
         	            $post->ID == get_option('page_on_front'))
         	        {
         	            $link = trailingslashit($link);
         	        }*/
     } elseif ($query->is_author && $haspost) {
         global $wp_version;
         if ($wp_version >= '2') {
             $author = get_userdata(get_query_var('author'));
             if ($author === false) {
                 return false;
             }
             $link = get_author_link(false, $author->ID, $author->user_nicename);
         } else {
             global $cache_userdata;
             $userid = get_query_var('author');
             $link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
         }
     } elseif ($query->is_category && $haspost) {
         $link = get_category_link(get_query_var('cat'));
         $link = $this->yoast_get_paged($link);
     } else {
         if ($query->is_tag && $haspost) {
             $tag = get_term_by('slug', get_query_var('tag'), 'post_tag');
             if (!empty($tag->term_id)) {
                 $link = get_tag_link($tag->term_id);
             }
             $link = $this->yoast_get_paged($link);
         } elseif ($query->is_day && $haspost) {
             $link = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day'));
         } elseif ($query->is_month && $haspost) {
             $link = get_month_link(get_query_var('year'), get_query_var('monthnum'));
         } elseif ($query->is_year && $haspost) {
             $link = get_year_link(get_query_var('year'));
         } elseif ($query->is_home) {
             if (get_option('show_on_front') == 'page' && ($pageid = get_option('page_for_posts'))) {
                 $link = get_permalink($pageid);
                 $link = $this->yoast_get_paged($link);
                 $link = trailingslashit($link);
             } else {
                 $link = get_option('home');
                 $link = $this->yoast_get_paged($link);
                 $link = trailingslashit($link);
             }
         } else {
             return false;
         }
     }
     return $link;
 }
开发者ID:ryanurban,项目名称:Orbit,代码行数:85,代码来源:aioseop.class.php


示例5: guess_permalink

 function guess_permalink($query)
 {
     $haspost = count($query->posts) > 0;
     $has_ut = function_exists('user_trailingslashit');
     if (get_query_var('m')) {
         // Handling special case with '?m=yyyymmddHHMMSS'
         // Since there is no code for producing the archive links for
         // is_time, we will give up and not trying any redirection.
         $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
         switch (strlen($m)) {
             case 4:
                 // Yearly
                 $link = get_year_link($m);
                 break;
             case 6:
                 // Monthly
                 $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
                 break;
             case 8:
                 // Daily
                 $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
                 break;
             default:
                 return false;
         }
     } elseif (($query->is_single || $query->is_page) && $haspost) {
         $post = $query->posts[0];
         $link = get_permalink($post->ID);
         $page = get_query_var('page');
         if ($page && $page > 1) {
             $link = trailingslashit($link) . "{$page}";
             if ($has_ut) {
                 $link = user_trailingslashit($link, 'paged');
             } else {
                 $link .= '/';
             }
         }
         // WP2.2: In Wordpress 2.2+ is_home() returns false and is_page()
         // returns true if front page is a static page.
         if ($query->is_page && 'page' == get_option('show_on_front') && $post->ID == get_option('page_on_front')) {
             $link = trailingslashit($link);
         }
     } elseif ($query->is_author && $haspost) {
         global $wp_version;
         if ($wp_version >= '2') {
             $author = get_userdata(get_query_var('author'));
             if ($author === false) {
                 return false;
             }
             if (function_exists('get_author_posts_url')) {
                 $link = get_author_posts_url($author->ID, $author->user_nicename);
             } else {
                 $link = get_author_link(false, $author->ID, $author->user_nicename);
             }
             // XXX: get_author_link seems to always return one with
             // trailing slash. We have to call user_trailingslashit to
             // make it right.
             if ($has_ut) {
                 $link = user_trailingslashit($link);
             }
         } else {
             // XXX: get_author_link() bug in WP 1.5.1.2
             //      s/author_nicename/user_nicename/
             global $cache_userdata;
             $userid = get_query_var('author');
             $link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
         }
     } elseif ($query->is_category && $haspost) {
         $link = get_category_link(get_query_var('cat'));
     } elseif ($query->is_tag && $haspost) {
         $link = get_tag_link(get_query_var('tag_id'));
     } elseif ($query->is_day && $haspost) {
         $link = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day'));
     } elseif ($query->is_month && $haspost) {
         $link = get_month_link(get_query_var('year'), get_query_var('monthnum'));
     } elseif ($query->is_year && $haspost) {
         $link = get_year_link(get_query_var('year'));
     } elseif ($query->is_home) {
         // WP2.1: Handling "Posts page" option. In WordPress 2.1 is_home()
         // returns true and is_page() returns false if home page has been
         // set to a page, and we are getting the permalink of that page
         // here.
         if (get_option('show_on_front') == 'page' && ($pageid = get_option('page_for_posts'))) {
             $link = trailingslashit(get_permalink($pageid));
         } else {
             $link = trailingslashit(get_option('home'));
         }
     } else {
         return false;
     }
     if ($query->is_paged) {
         $paged = get_query_var('paged');
         if ($paged) {
             $link = trailingslashit($link) . "page/{$paged}";
             if ($has_ut) {
                 $link = user_trailingslashit($link, 'paged');
             } else {
                 $link .= '/';
             }
         }
//.........这里部分代码省略.........
开发者ID:christopherreay,项目名称:freeFreeCrowdfunding_ignitiondeck_crowdfunding,代码行数:101,代码来源:ylsy_permalink_redirect.php


示例6: widget

    function widget($args, $instance)
    {
        // prints the widget
        extract($args, EXTR_SKIP);
        $title = empty($instance['title']) ? '&nbsp;' : apply_filters('widget_title', $instance['title']);
        $desc1 = empty($instance['desc1']) ? '&nbsp;' : apply_filters('widget_desc1', $instance['desc1']);
        ?>
						
			<script  type="text/javascript" >
        function showhide_forgetpw()
        {
			if(document.getElementById('lostpassword_form').style.display=='none')
			{
				document.getElementById('lostpassword_form').style.display = ''
				document.getElementById('register_form').style.display = 'none'
			}else
			{
				document.getElementById('lostpassword_form').style.display = 'none';
				document.getElementById('register_form').style.display = 'none'
			}	
        }
		 function showhide_register()
        {
			if(document.getElementById('register_form').style.display=='none')
			{
				document.getElementById('register_form').style.display = ''
				document.getElementById('lostpassword_form').style.display = 'none'
			}else
			{
				document.getElementById('register_form').style.display = 'none';
				document.getElementById('lostpassword_form').style.display = 'none'
			}	
        }
        </script>
            <div class="widget login_widget" id="login_widget">
          <?php 
        global $current_user;
        if ($current_user->ID) {
            ?>
			<h3><?php 
            echo apply_filters('templ_login_widget_myaccount_text_filter', __('Dashboard', 'templatic'));
            ?>
</h3>
			<ul class="xoxo blogroll">
            	<?php 
            $authorlink = get_author_link($echo = false, $current_user->data->ID);
            echo apply_filters('templ_login_widget_dashboardlink_filter', '<li><a href="' . $authorlink . '">' . MYACCOUNT_TEXT . '</a></li>');
            echo apply_filters('templ_login_widget_editprofilelink_filter', '<li><a href="' . site_url('/?ptype=profile') . '">' . EDIT_PROFILE_TEXT . '</a></li>');
            echo apply_filters('templ_login_widget_logoutlink_filter', '<li><a href="' . wp_logout_url(get_option('siteurl')) . '">' . LOGOUT_TEXT . '</a></li>');
            ?>
			</ul>
			<?php 
        } else {
            ?>
			<?php 
            if ($title) {
                ?>
<h3><?php 
                echo $title;
                ?>
</h3><?php 
            }
            ?>
            <?php 
            global $errors, $reg_msg;
            if ($_REQUEST['widgetptype'] == 'login') {
                if (is_object($errors)) {
                    foreach ($errors as $errorsObj) {
                        foreach ($errorsObj as $key => $val) {
                            for ($i = 0; $i < count($val); $i++) {
                                echo "<p class=\"error_msg\">" . $val[$i] . '</p>';
                            }
                        }
                    }
                }
                $errors = new WP_Error();
            }
            ?>
		    <form name="loginform" id="loginwidgetform" action='<?php 
            echo get_settings('home') . "/index.php?ptype=register#login_widget";
            ?>
' method="post" >
            <input type="hidden" name="widgetptype" value="login" />
           		<div class="form_row"><label><?php 
            echo USER_NAME_TEXT;
            ?>
  <span>*</span></label>  <input name="log" id="widget_user_login" type="text" class="textfield" /> <span id="user_loginInfo"></span> </div>
                <div class="form_row"><label><?php 
            echo PWD_TEXT;
            ?>
  <span>*</span></label>  <input name="pwd" id="widget_user_pass" type="password" class="textfield" /><span id="user_passInfo"></span>  </div>
                
               	<input type="hidden" name="redirect_to" value="<?php 
            echo $_SERVER['HTTP_REFERER'];
            ?>
" />
				<input type="hidden" name="testcookie" value="1" />
                
				<div class="form_row clearfix">
                <input type="submit" name="submit" value="<?php 
//.........这里部分代码省略.........
开发者ID:annguyenit,项目名称:getdeal,代码行数:101,代码来源:login.php


示例7: the_title

the_title();
?>
</h2>
				<div class="entry-content">
<?php 
the_content('<span class="more-link">' . __('Read More &raquo;', 'sandbox') . '</span>');
?>

<?php 
link_pages('<div class="page-link">' . __('Pages: ', 'sandbox'), '</div>', 'number');
?>

				</div>
				<div class="entry-meta">
					<?php 
printf(__('This entry was written by %1$s and posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr> and filed under %6$s%10$s. Bookmark the <a href="%7$s" title="Permalink to %8$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%9$s" title="Comments RSS to %8$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'), '<a class="url fn" href="' . get_author_link(false, $authordata->ID, $authordata->user_nicename) . '" title="View all posts by ' . $authordata->display_name . '">' . get_the_author() . '</a>', get_the_time('Y-m-d'), get_the_time('H:i:sO'), the_date('', '', '', false), get_the_time(), get_the_category_list(', '), get_permalink(), wp_specialchars(get_the_title(), 'double'), comments_rss(), get_the_tag_list(__(' with tags '), ', '));
if (comments_open() && pings_open()) {
    // COMMENTS & PINGS OPEN
    ?>
					<?php 
    printf(__('<a href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a href="%s" rel="trackback" title="Trackback URL for your post">Trackback URL</a>.', 'sandbox'), get_trackback_url());
} elseif (!comments_open() && pings_open()) {
    // PINGS ONLY OPEN
    ?>
					<?php 
    printf(__('Comments are closed, but you can leave a trackback: <a href="%s" rel="trackback" title="Trackback URL for your post">Trackback URL</a>.', 'sandbox'), get_trackback_url());
} elseif (comments_open() && !pings_open()) {
    // COMMENTS OPEN
    ?>
					<?php 
    printf(__('Trackbacks are closed, but you can <a href="#respond" title="Post a comment">post a comment</a>.', 'sandbox'));
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:single.php


示例8: printGeneral

 function printGeneral()
 {
     $obj_ac = new LcmExpenseCommentAccess(0, $this);
     echo "<!-- ID: " . $this->getDataInt('id_comment') . " -->\n";
     echo "<div style='border-bottom: 1px solid #ccc;'>";
     // CSS
     echo '<p class="normal_text">' . get_author_link($this->data) . ' @ ' . format_date($this->getDataString('date_creation'));
     if ($this->getDataString('date_update') != $this->getDataString('date_creation')) {
         echo ' (' . _Ti('time_input_date_updated') . format_date($this->getDataString('date_update')) . ')';
     }
     echo "</p>\n";
     // Allow edit if author of comment + if expense is pending
     if ($obj_ac->getEdit()) {
         echo "<div style='float: right;'>";
         echo '<a title="Edit this comment" ' . 'class="edit_lnk" href="edit_exp.php?expense=' . $this->getDataInt('id_expense', '__ASSERT__') . '&amp;c=' . $this->getDataInt('id_comment', '__ASSERT__') . '">' . _T('edit') . '</a>';
         // TRAD
         echo "</div>\n";
     }
     echo '<p class="normal_text">' . nl2br($this->getDataString('comment')) . "</p>\n";
     echo "</div>\n";
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:21,代码来源:inc_obj_exp.php


示例9: get_property_info_li


//.........这里部分代码省略.........
    }
    if (get_post_meta($post->ID, 'add_country', true)) {
        $address .= get_post_meta($post->ID, 'add_country', true);
    }
    if (get_post_meta($post->ID, 'add_zip_code', true)) {
        $address .= ' - ' . get_post_meta($post->ID, 'add_zip_code', true);
    }
    if ($address) {
        echo '<p class="address">' . $address . '</p>';
    }
    ?>

                        <?php 
    $cat_info_arr = get_property_cat_id_name($post->ID);
    ?>

                        <div class="property_detail"> 
                        <p> <span class="field"> <?php 
    _e(AREA_TEXT);
    ?>
 </span> <span>: <?php 
    echo get_post_meta($post->ID, 'area', true);
    ?>
 (<?php 
    echo get_area_unit();
    ?>
) </span> </p> 
                       <p> <span class="field"> <?php 
    _e(BEDS_TEXT);
    ?>
 </span> <span>:  <?php 
    echo get_post_meta($post->ID, 'bed_rooms', true);
    //echo $cat_info_arr['bed']['name'];
    ?>
 </span></p> 
                         <p><span class="field"> <?php 
    _e(BATHS_TEXT);
    ?>
 </span> <span>:  <?php 
    echo get_post_meta($post->ID, 'bath_rooms', true);
    ?>
 </span></p> 
                         
                        </div>
                        
                        <div class="property_detail"> 
                        <p> <span class="field"> <?php 
    _e(PRO_MLS_TEXT);
    ?>
 </span> <span>: <?php 
    echo get_post_meta($post->ID, 'mlsno', true);
    ?>
 </span> </p> 
                       <p> <span class="field"> <?php 
    _e(PRO_PROPERTY_ID_TEXT);
    ?>
 </span> <span>:  <?php 
    echo $post->ID;
    ?>
 </span></p> 
                         <p><span class="field"> <?php 
    _e(PRO_POSTED_ON_TEXT);
    ?>
  </span> <span>:  <?php 
    the_time('F j, Y');
    ?>
 </span></p> 
                         
                        </div>
                       
                        <p class="propertylistinglinks">
 						  <span class="agent"> <?php 
    _e(AGENT_TITLE);
    ?>
 : <a href="<?php 
    echo get_author_link($echo = false, $post->post_author, $author_nicename = '');
    ?>
" class="emailagent"><?php 
    echo get_the_author_meta('display_name', $post->post_author);
    ?>
 </a> </span>
							  
                        <span><a href="<?php 
    the_permalink();
    ?>
"><?php 
    _e(VIEW_MORE_DETAILS_TEXT);
    ?>
 &raquo;</a></span>
                        <?php 
    favourite_html($post->post_author, $post->ID);
    ?>

						
						</p> 
					</div>
				</div>
			</li>
<?php 
}
开发者ID:jitendra2u,项目名称:MCT,代码行数:101,代码来源:custom_functions.php


示例10: list_authors2

function list_authors2($optioncount = false, $exclude_admin = true, $idmode = '', $hide_empty = true, $feed = '', $feed_image = '')
{
    global $wp_id, $wpdb, $blogfilename;
    $query = "SELECT ID, user_idmode, user_nickname, user_firstname, user_lastname, user_login from {$wpdb->users[$wp_id]} " . ($exclude_admin ? "WHERE ID <> 1 " : '') . "ORDER BY user_nickname";
    $authors = $wpdb->get_results($query);
    foreach ($authors as $author) {
        $posts = get_usernumposts($author->ID, true);
        $name = $author->user_nickname;
        if (empty($idmode)) {
            $idmode = $author->user_idmode;
        }
        if ($idmode == 'nickname') {
            $name = $author->user_nickname;
        }
        if ($idmode == 'login') {
            $name = $author->user_login;
        }
        if ($idmode == 'firstname') {
            $name = $author->user_firstname;
        }
        if ($idmode == 'lastname') {
            $name = $author->user_lastname;
        }
        if ($idmode == 'namefl') {
            $name = $author->user_firstname . ' ' . $author->user_lastname;
        }
        if ($idmode == 'namelf') {
            $name = $author->user_lastname . ' ' . $author->user_firstname;
        }
        if (!$idmode) {
            $name = $author->user_nickname;
        }
        if (!($posts == 0 && $hide_empty)) {
            echo "<li>";
        }
        if ($posts == 0) {
            if (!$hide_empty) {
                echo $name;
            }
        } else {
            $link = '<a href="' . get_author_link(0, $author->ID, $author->user_login) . '" title="' . sprintf("Posts by %s", htmlspecialchars($author->user_nickname)) . '">' . stripslashes($name) . '</a>';
            if (!empty($feed_image) || !empty($feed)) {
                $link .= ' ';
                if (empty($feed_image)) {
                    $link .= '(';
                }
                $link .= '<a href="' . get_author_rss_link(0, $author->ID, $author->user_login) . '"';
                if (!empty($feed)) {
                    $title = ' title="' . stripslashes($feed) . '"';
                    $alt = ' alt="' . stripslashes($feed) . '"';
                    $name = stripslashes($feed);
                    $link .= $title;
                }
                $link .= '>';
                if (!empty($feed_image)) {
                    $link .= "<img src=\"{$feed_image}\" border=\"0\" align=\"absbottom\"{$alt}{$title}" . ' />';
                } else {
                    $link .= $name;
                }
                $link .= '</a>';
                if (empty($feed_image)) {
                    $link .= ')';
                }
            }
            if ($optioncount) {
                $link .= ' (' . $posts . ')';
            }
        }
        if (!($posts == 0 && $hide_empty)) {
            echo "{$link}</li>";
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:73,代码来源:template-functions-author.php


示例11: vanilla_postheader

function vanilla_postheader()
{
    global $id, $post, $authordata;
    // Create $posteditlink
    $posteditlink .= '<a href="' . get_bloginfo('wpurl') . '/wp-admin/post.php?action=edit&post=' . $id;
    $posteditlink .= '" title="' . __('Edit post', 'thematic') . '" class="edit-link">';
    $posteditlink .= __('Edit', 'thematic') . '</a>';
    if (is_single() || is_page()) {
        $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
    } elseif (is_404()) {
        $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
    } else {
        $posttitle = '<h2 class="entry-title"><a href="';
        $posttitle .= get_permalink();
        $posttitle .= '" title="';
        $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
        $posttitle .= '" rel="bookmark">';
        $posttitle .= get_the_title();
        $posttitle .= "</a></h2>\n";
    }
    $postmeta = '<div class="entry-meta">';
    // Display edit link
    if (current_user_can('edit_posts')) {
        $postmeta .= $posteditlink;
    }
    $postmeta .= '<em>' . __('by', 'thematic') . '</em> ';
    $postmeta .= '<span class="author vcard"><a class="url fn n" href="';
    $postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename);
    $postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">';
    $postmeta .= get_the_author();
    $postmeta .= "</a></span>\n";
    // Display the post category/ies
    if (!is_category()) {
        $postmeta .= '<span class="cat-links"><em>' . __('in', 'thematic') . '</em> ';
        $postmeta .= get_the_category_list(', ') . "</span>\n";
    }
    $postmeta .= '<em>' . __('on', 'thematic') . '</em> ';
    $postmeta .= '<span class="entry-date"><abbr class="published" title="';
    $postmeta .= get_the_time('Y-m-d\\TH:i:sO') . '">';
    $postmeta .= the_date('', '', '', false);
    $postmeta .= '</abbr></span>';
    $postmeta .= "</div><!-- .entry-meta -->\n";
    if ($post->post_type == 'page' || is_404()) {
        $postheader = $posttitle;
    } else {
        $postheader = $posttitle . $postmeta;
    }
    echo apply_filters('vanilla_postheader', $postheader);
    // Filter to override default post header
}
开发者ID:alicam,项目名称:vanilla-theme,代码行数:50,代码来源:hooks-filters.php


示例12: printGeneral

 function printGeneral($show_subtitle = true, $allow_edit = true)
 {
     if ($show_subtitle) {
         show_page_subtitle(_T('generic_subtitle_general'), 'cases_intro');
     }
     echo '<ul class="info">';
     // TODO: fix html
     // Author
     echo '<li>' . '<span class="label2">' . _Ti('case_input_author') . '</span>' . '<span class="value2">' . get_author_link($this->data) . '</span>' . "</li>\n";
     // Date start
     echo '<li>' . '<span class="label2">' . _Ti('time_input_date_start') . '</span>' . '<span class="value2">' . format_date($this->data['date_start']) . '</span>' . "</li>\n";
     // Date end
     echo '<li>' . '<span class="label2">' . _Ti('time_input_date_end') . '</span>' . '<span class="value2">' . format_date($this->data['date_end']) . '</span>' . "</li>\n";
     // Date length
     echo '<li>' . '<span class="label2">' . _Ti('time_input_length') . '</span>' . '<span class="value2">' . format_time_interval_prefs($this->data['length']) . '</span>' . "</li>\n";
     // FU type
     echo '<li>' . '<span class="label2">' . _Ti('fu_input_type') . '</span>' . '<span class="value2">' . _Tkw('followups', $this->data['type']) . '</span>' . "</li>\n";
     // Keywords
     show_all_keywords('followup', $this->getDataInt('id_followup'));
     // Conclusion for case/status change
     /* [ML] 2008-01-30 Should not be necessary, done by get_fu_description()
     		if ($this->data['type'] == 'status_change' || $this->data['type'] == 'stage_change') {
     			$tmp = lcm_unserialize($this->data['description']);
     
     			var_dump($tmp);
     
     			echo '<li>'
     				. '<span class="label2">' . _Ti('fu_input_conclusion') .  '</span>';
     
     			echo '<span class="value2">';
     		
     			if (read_meta('case_result') == 'yes' && $tmp['result'])
     				echo _Tkw('_crimresults', $tmp['result']) . "<br />\n";
     			
     			echo _Tkw('conclusion', $tmp['conclusion']) . '</span>';
     			echo "</li>\n";
     		
     			echo '<li>'
     				. '<span class="label2">' . _Ti('fu_input_sentence') . '</li>'
     				. '<span class="value2">' . _Tkw('sentence', $tmp['sentence']) . '</span>'
     				. "</li>\n";
     		}
     		*/
     // Description
     $desc = get_fu_description($this->data, false);
     echo '<li class="large">' . '<span class="label2">' . _Ti('fu_input_description') . '</span>' . '<span class="value2">' . $desc . '</span>' . "</li>\n";
     // Sum billed (if activated from policy)
     if ($this->show_sum_billed == 'yes') {
         echo '<li>' . '<span class="label2">' . _T('fu_input_sum_billed') . '</span>' . '<span class="value2">';
         echo format_money(clean_output($this->data['sumbilled']));
         $currency = read_meta('currency');
         echo htmlspecialchars($currency);
         echo '</span>';
         echo "</li>\n";
     }
     echo "</ul>\n";
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:57,代码来源:inc_obj_fu.php


示例13: the_permalink

        the_permalink();
        ?>
" rel="bookmark" title='<?php 
        printf(__('Permanent Link to "%s"', 'k2_domain'), wp_specialchars(get_the_title(), 1));
        ?>
'><?php 
        the_title();
        ?>
</a></h3>

						<small class="entry-meta">
							<span class="chronodata">
<?php 
        /* Date & Author */
        $count_users = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE `meta_key` = '" . $table_prefix . "user_level' AND `meta_value` > 1");
        printf(__('Published %1$s %2$s', 'k2_domain'), $count_users > 1 ? sprintf(__('by %s', 'k2_domain'), '<a href="' . get_author_link(0, $authordata->ID, $authordata->user_nicename) . '">' . get_the_author() . '</a>') : '', function_exists('time_since') ? sprintf(__('%s ago', 'k2_domain'), time_since(abs(strtotime($post->post_date_gmt . " GMT")), time())) : get_the_time(get_option('date_format')));
        ?>
							</span>
						</small>
					</div> <!-- .entry-head -->

					<div class="entry-content">
						<p class="<?php 
        echo $classname;
        ?>
"><?php 
        echo $attachment_link;
        ?>
<br /><?php 
        echo basename($post->guid);
        ?>
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:attachment.php


示例14: cfct_banner

	Australis Media Pty Ltd has made the contents of this file
	available under a CC-GNU-GPL license:
	
	 http://creativecommons.org/licenses/GPL/2.0/
	
	 A copy of the full license can be found as part of this
	 distribution in the file LICENSE.TXT
	
	You may use the Vanilla theme software in accordance with the
	terms of that license. You agree that you are solely responsible
	for your use of the Vanilla theme software and you represent and 
	warrant to Australis Media Pty Ltd that your use of the Vanilla
	theme software will comply with the CC-GNU-GPL.
*/
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
    die;
}
if (CFCT_DEBUG) {
    cfct_banner(__FILE__);
}
global $previousday, $authordata, $tpl;
$previousday = -1;
$tpl_tags_list = get_the_tag_list("", ",", "");
$tpl_edit_link = get_edit_post_link();
$tpl_pages_link = wp_link_pages('before=&after=&echo=0');
$content = get_the_content('<span class="more-link">' . __('Continued...', 'carrington') . '</span>');
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
$tpl["content"] = array("tpl_file" => "content-default.html");
$tpl["entries"][] = array("id" => get_the_ID(), "class" => sandbox_post_class(false), "permalink" => get_permalink(), "title_attribute" => the_title_attribute('echo=0'), "title" => the_title("", "", false), "content" => $content, "pages_link" => $tpl_pages_link == '' ? false : $tpl_pages_link, "categories_list" => get_the_category_list(', '), "tags_list" => $tpl_tags_list == '' ? false : $tpl_tags_list, "author" => array("link" => get_author_link(false, get_the_author_ID(), $authordata->user_nicename), "name_attribute" => attribute_escape($authordata->display_name), "name" => get_the_author()), "date_time" => get_the_time('Y-m-d\\TH:i:sO'), "date" => the_date("", "", "", false), "comments_link" => vanilla_comments_popup_link(__('No comments', 'carrington'), __('1 comment', 'carrington'), __('% comments', 'carrington')), "edit_link" => $tpl_edit_link == '' ? false : $tpl_edit_link, "edit_link_text" => __('Edit This', 'carrington'));
开发者ID:alicam,项目名称:vanilla-theme,代码行数:30,代码来源:content-default.php


示例15: BuildSitemap


//.........这里部分代码省略.........
         //nxt2.1 introduced post_status='future', for earlier nxt versions we need to check the post_date_gmt
         $arcresults = $nxtdb->get_results("\r\n\t\t\t\t\t\tSELECT DISTINCT\r\n\t\t\t\t\t\t\tYEAR(post_date_gmt) AS `year`,\r\n\t\t\t\t\t\t\tMONTH(post_date_gmt) AS `month`,\r\n\t\t\t\t\t\t\tMAX(post_date_gmt) as last_mod,\r\n\t\t\t\t\t\t\tcount(ID) as posts\r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t{$nxtdb->posts}\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tpost_date < '{$now}'\r\n\t\t\t\t\t\t\tAND post_status = 'publish'\r\n\t\t\t\t\t\t\tAND post_type = 'post'\r\n\t\t\t\t\t\t\t" . (floatval($nxt_version) < 2.1 ? "AND {$nxtdb->posts}.post_date_gmt <= '" . gmdate('Y-m-d H:i:59') . "'" : "") . "\r\n\t\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\t\tYEAR(post_date_gmt),\r\n\t\t\t\t\t\t\tMONTH(post_date_gmt)\r\n\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t\tpost_date_gmt DESC");
         if ($arcresults) {
             foreach ($arcresults as $arcresult) {
                 $url = get_month_link($arcresult->year, $arcresult->month);
                 $changeFreq = "";
                 //Archive is the current one
                 if ($arcresult->month == date("n") && $arcresult->year == date("Y")) {
                     $changeFreq = $this->GetOption("cf_arch_curr");
                 } else {
                     // Archive is older
                     $changeFreq = $this->GetOption("cf_arch_old");
                 }
                 if (!$qt["enabled"]) {
                     $this->AddUrl($url, $this->GetTimestampFro 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_author_name函数代码示例发布时间:2022-05-15
下一篇:
PHP get_author_feed_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap