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

PHP get_the_author_ID函数代码示例

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

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



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

示例1: get_author_avatar

function get_author_avatar()
{
    global $default;
    $avatar = '';
    if (class_exists('author_image')) {
        $avatar = author_image::get();
    }
    if ($avatar == '') {
        if (in_the_loop()) {
            $author_id = get_the_author_ID();
        } elseif (is_singular()) {
            global $wp_the_query;
            $author_id = $wp_the_query->posts[0]->post_author;
        } elseif (is_author()) {
            global $wp_the_query;
            $author_id = $wp_the_query->get_queried_object_id();
        }
        $author = get_userdata($author_id);
        if (!empty($author)) {
            $avatar = get_avatar($author->user_email, 64, $default, $author->display_name);
        } else {
            $avatar = '<img src="' . esc_url($default) . '" alt="' . $author->display_name . '" />';
        }
    }
    return $avatar;
}
开发者ID:jaroche,项目名称:mdw,代码行数:26,代码来源:wp-rsscredit.php


示例2: be_author_box

/**
 * Load Author Boxes
 *
 * @author Bill Erickson
 * @link http://www.billerickson.net/wordpress-post-multiple-authors/
 */
function be_author_box()
{
    if (!is_single()) {
        return;
    }
    if (function_exists('get_coauthors')) {
        $authors = get_coauthors();
        foreach ($authors as $author) {
            be_do_author_box($author->data->ID);
        }
    } else {
        be_do_author_box(get_the_author_ID());
    }
}
开发者ID:generationentandem,项目名称:website,代码行数:20,代码来源:co-authors.php


示例3: get_image

function get_image($field, $width)
{
    $image = get_newspapermeta($field, 0);
    if (!empty($image)) {
        if ($_SERVER['SERVER_NAME'] == 'localhost') {
            echo $image . '" width="' . $width . 'px"';
        } else {
            preg_match('/[0-9]{4}\\/[0-9]{2}\\/.+\\.jpg/', $image, $matches);
            $image_scaled = get_bloginfo('url') . '/t/i/' . $width . '/' . $matches[0];
            echo $image_scaled . '" width="' . $width . 'px"';
        }
    } else {
        echo get_bloginfo('url') . '/wp-content/themes/fokus/images/portraits/' . $width . '/' . get_the_author_ID() . '.jpg"';
    }
    echo '"alt="';
    the_title_attribute();
    echo '"';
}
开发者ID:Jonatan,项目名称:wp-newspapermeta,代码行数:18,代码来源:newspapermeta.php


示例4: cfct_choose_single_template

function cfct_choose_single_template($files = array(), $filter = '*')
{
    // must be called within the_loop - cfct_choose_general_template_single() approximates a loop for this reason.
    $exec_order = array('author', 'meta', 'category', 'role', 'tag', 'parent', 'default');
    $exec_order = apply_filters('cfct_single_match_order', $exec_order);
    $filename = false;
    global $post;
    foreach ($exec_order as $type) {
        switch ($type) {
            case 'author':
                $author_files = cfct_author_templates('', $files);
                if (count($author_files)) {
                    $author = get_the_author_login();
                    $file = cfct_filename_filter('author-' . $author . '.php', $filter);
                    if (in_array($file, $author_files)) {
                        $filename = $file;
                    }
                }
                break;
            case 'meta':
                $meta_files = cfct_meta_templates('', $files);
                if (count($meta_files)) {
                    $meta = get_post_custom($post->ID);
                    if (count($meta)) {
                        // check key, value matches first
                        foreach ($meta as $k => $v) {
                            $val = $v[0];
                            $file = cfct_filename_filter('meta-' . $k . '-' . $val . '.php', $filter);
                            if (in_array($file, $meta_files)) {
                                $filename = $file;
                                break;
                            }
                        }
                        // check key matches only
                        if (!$filename) {
                            foreach ($meta as $k => $v) {
                                $file = cfct_filename_filter('meta-' . $k . '.php', $filter);
                                if (in_array($file, $meta_files)) {
                                    $filename = $file;
                                    break;
                                }
                            }
                        }
                    }
                }
                break;
            case 'category':
                $cat_files = cfct_cat_templates($type, $files);
                if (count($cat_files)) {
                    foreach ($cat_files as $file) {
                        $cat_id = cfct_cat_filename_to_id($file);
                        if (in_category($cat_id)) {
                            $filename = $file;
                            break;
                        }
                    }
                }
                break;
            case 'role':
                $role_files = cfct_role_templates($type, $files);
                if (count($role_files)) {
                    $user = new WP_User(get_the_author_ID());
                    if (count($user->roles)) {
                        foreach ($role_files as $file) {
                            foreach ($user->roles as $role) {
                                if (cfct_role_filename_to_name($file) == $role) {
                                    $filename = $file;
                                    break;
                                }
                            }
                        }
                    }
                }
                break;
            case 'tag':
                $tag_files = cfct_tag_templates($type, $files);
                if (count($tag_files)) {
                    $tags = get_the_tags($post->ID);
                    if (is_array($tags) && count($tags)) {
                        foreach ($tag_files as $file) {
                            foreach ($tags as $tag) {
                                if ($tag->slug == cfct_tag_filename_to_name($file)) {
                                    $filename = $file;
                                    break;
                                }
                            }
                        }
                    }
                }
                break;
            case 'parent':
                $parent_files = cfct_parent_templates($type, $files);
                if (count($parent_files) && $post->post_parent > 0) {
                    $parent = cfct_post_id_to_slug($post->post_parent);
                    $file = cfct_filename_filter('parent-' . $parent . '.php', $filter);
                    if (in_array($file, $parent_files)) {
                        $filename = $file;
                    }
                }
                break;
//.........这里部分代码省略.........
开发者ID:rascoop,项目名称:carrington,代码行数:101,代码来源:utility.php


示例5: while

?>
">RSS</a></h2>
  <ul>

<?php 
if (have_posts()) {
    $previous_user_id = 0;
    while (have_posts()) {
        the_post();
        ?>

<li>

<?php 
        // Don't show the avatar if the previous post was by the same user
        $current_user_id = get_the_author_ID();
        if ($previous_user_id !== $current_user_id) {
            echo prologue_get_avatar($current_user_id, get_the_author_email(), 48);
        }
        $previous_user_id = $current_user_id;
        ?>

  <h4>
    <?php 
        the_author_posts_link();
        ?>
    <span class="meta">
      <?php 
        the_time("h:i:s a");
        ?>
 on <?php 
开发者ID:Br3nda,项目名称:openmicroblogger,代码行数:31,代码来源:tag.php


示例6: md5

        $email_md5 = md5(get_the_author_email());
        $default_img = urlencode('http://use.perl.org/images/pix.gif');
        ?>
<div class="sleeve_main">
<div id="postpage">
<div id="main">
	<ul id="postlist">
		<li>
			<h2 class="title">
				<?php 
        the_title();
        ?>
			</h2>
			<h4>
				<?php 
        echo prologue_get_avatar(get_the_author_ID(), get_the_author_email(), 48);
        ?>
				<?php 
        the_author_posts_link();
        ?>
				
				<span class="meta">
			<?php 
        the_time();
        ?>
 <em>on</em> <?php 
        the_time('F j, Y');
        ?>
 |
			<?php 
        comments_number(__('0'), __('1'), __('%'));
开发者ID:Br3nda,项目名称:openmicroblogger,代码行数:31,代码来源:single.php


示例7: get_avatar

</a></h2>
                                            </div>
                                            <div class="col-5 last">
                                                <div class="media mhn mtl ptm">
                                                    <div class="img-ext mlm">
                                                        <?php 
            echo get_avatar(get_the_author_id(), 38);
            ?>
                                                    </div>
                                                    <div class="bd font-small tar" style="display: block;">
                                                        <?php 
            the_time('F jS, Y');
            ?>
<br />
                                                        <?php 
            printf('<a class="wplnk-bold" href="' . get_author_posts_url(get_the_author_ID()) . '" title="' . sprintf(__("Posts by %s", "uxebu"), attribute_escape(get_the_author())) . ' ">' . get_the_author() . '</a>');
            ?>
                                                    </div>
                                                </div><!-- end media -->
                                            </div><!-- end col -->
                                        </div><!-- end hd -->
                                        <div class="bd">
                                        <?php 
            the_content('read more...');
            ?>
                                        <!--<?php 
            trackback_rdf();
            ?>
-->

                                        </div><!-- end bd -->
开发者ID:ciaranlm,项目名称:uxebu.com,代码行数:31,代码来源:index.php


示例8: the_author_url

/**
 * @package WordPress
 * @subpackage HivistaSoft_Theme
 */
?>
<div id="sidebar">
	<?php 
if (is_singular()) {
    ?>
		<div class="widget-container">
			<div class="box-author">
				<a href="<?php 
    the_author_url();
    ?>
" target="_blank"><?php 
    echo get_avatar(get_the_author_ID(), 70);
    ?>
</a>
				<div class="info">
					<span>About the author:</span>
					<p><?php 
    echo short_content(get_the_author_meta('description'), 70, '(...)');
    ?>
</p>
				</div>
			</div>
		</div>
	<?php 
}
?>
	<?php 
开发者ID:Vultur,项目名称:imcreator.com,代码行数:31,代码来源:sidebar.php


示例9: _e

        ?>
" rel="bookmark" title="<?php 
        _e('Permanent Link:', 'fusion');
        echo ' ';
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
        <!-- story header -->
        <div class="postheader">
            <div class="postinfo">
            <p>
            <?php 
        printf(__('Posted by %s in %s on %s', 'fusion'), '<a href="' . get_author_posts_url(get_the_author_ID()) . '" title="' . sprintf(__("Posts by %s", "fusion"), attribute_escape(get_the_author())) . ' ">' . get_the_author() . '</a>', get_the_category_list(', '), get_the_time(__('F jS, Y', 'fusion')));
        ?>
 <span class="editlink"><?php 
        edit_post_link('');
        ?>
</span></p>
            </div>
        </div>
        <!-- /story header -->
      <div class="postbody entry clearfix">
        <?php 
        if (get_option('fusion_indexposts') == 'excerpt') {
            the_excerpt();
        } else {
            the_content(__('Read the rest of this entry &raquo;', 'fusion'));
        }
开发者ID:jinpingv,项目名称:website_wrapper,代码行数:31,代码来源:archive.php


示例10: wpi_template_comment_trackback

function wpi_template_comment_trackback($post, $comment, $cnt)
{
    $author_id = get_the_author_ID();
    $wauthor_name = wpi_get_comment_author();
    $author_uri = get_comment_author_url();
    $author_uri = $author_uri != '' && $author_uri != 'http://' ? $author_uri : get_permalink($post->ID) . '#comment-' . get_comment_ID();
    $microid = wpi_get_microid_hash(get_comment_author_email(), $author_uri);
    ?>
	
						<li id="comment-<?php 
    comment_ID();
    ?>
" class="<?php 
    wpi_comment_root_class($cnt, get_comment_author());
    ?>
">
							<ul class="reviewier-column cf r">
								<li class="span-1 fl">&nbsp;
				<!--
				<rdf:RDF xmlns="http://web.resource.org/cc/"
				    xmlns:dc="http://purl.org/dc/elements/1.1/"
				    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
				<Work rdf:about="<?php 
    the_permalink();
    ?>
#comment-<?php 
    comment_ID();
    ?>
">
				<license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
				</Work>
				<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
				   <requires rdf:resource="http://web.resource.org/cc/Attribution" />
				   <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
				   <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
				   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
				   <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
				   <requires rdf:resource="http://web.resource.org/cc/Notice" />
				</License>
				</rdf:RDF>
				-->									
								</li>
								<li class="<?php 
    wpi_comment_content_width();
    ?>
 fl review-content dc-source">
								
								<dl class="review r cf">				
								<dt class="item title summary ox">
<a rel="dc:source robots-anchortext" href="#comment-<?php 
    comment_ID();
    ?>
" class="url fn" title="<?php 
    the_title();
    ?>
">permalink</a> 
								</dt>	
								<dd class="reviewer-meta vcard microid-<?php 
    echo $microid;
    ?>
 db">									<span class="note dn"><?php 
    the_title();
    ?>
</span>
									<a href="<?php 
    wpi_curie_url($author_uri);
    ?>
" class="url fn reviewer" rel="contact noarchive robots-noarchive" title="<?php 
    attribute_escape($wauthor_name);
    ?>
">
									<strong class="org" style="background-image:url('<?php 
    echo wpi_comment_pingback_favicon($comment);
    ?>
')">
									<?php 
    echo $wauthor_name;
    ?>
									</strong>
									</a>&nbsp;			
									 <abbr class="dtreviewed" title="<?php 
    comment_date('Y-m-dTH:i:s:Z');
    ?>
">
									<?php 
    wpi_comment_date();
    ?>
									</abbr>	
								<span class="rating dn">3</span>
								<span class="type dn">url</span>					
								<?php 
    edit_comment_link(__('edit', WPI_META), '&middot; <span class="edit-comment">', '</span>');
    ?>
			 				 
								</dd>
								
								<dd class="reviewer-entry">						
									<div class="description">
										<p class="br rn r">				
											<?php 
//.........这里部分代码省略.........
开发者ID:Creativebq,项目名称:wp-istalker,代码行数:101,代码来源:template.php


示例11: get_posts

 /**
  * Gets posts, based on the params provided
  *
  * @package Invite Anyone
  * @since 0.9
  */
 function get_posts()
 {
     global $wpdb;
     // $posts is a multidimensional array, containing all different time periods
     $posts = array();
     foreach ($this->time_periods as $tp => $period) {
         $invite = new Invite_Anyone_Invitation();
         // Will be populated out of $this->params. Defaults to none?
         $args = array('posts_per_page' => '-1', 'status' => 'pending,draft,future,publish,trash');
         // Create the date filter
         if ($tp) {
             $since = time() - $tp;
             $this->date_sql = $wpdb->prepare(" AND post_date > %s", date('Y-m-d H:i:s', $since));
             add_filter('posts_where_paged', array($this, 'where_filter'));
         }
         $invites = $invite->get($args);
         // Remove the filter
         if ($tp) {
             remove_filter('posts_where_paged', array($this, 'where_filter'));
         }
         $period['total_count'] = 0;
         $period['accepted_count'] = 0;
         $period['total_count_cs'] = 0;
         $period['accepted_count_cs'] = 0;
         $period['unique_emails'] = 0;
         $period['unique_inviters'] = 0;
         $period['unique_emails'] = array();
         $period['unique_inviters'] = array();
         if ($invites->have_posts()) {
             while ($invites->have_posts()) {
                 $invites->the_post();
                 // Increase the total count
                 $period['total_count']++;
                 $author_key = get_the_author_ID();
                 // If it's a new sender, add them to $unique_inviters
                 if (!isset($period['unique_inviters'][$author_key])) {
                     $period['unique_inviters'][$author_key] = array('overall' => array('sent' => 0, 'accepted' => 0), 'cloudsponge' => array('sent' => 0, 'accepted' => 0));
                 }
                 // Bump the inviter's count
                 $period['unique_inviters'][$author_key]['overall']['sent']++;
                 // Is it accepted?
                 $accepted = get_post_meta(get_the_ID(), 'bp_ia_accepted', true);
                 if ($accepted) {
                     // Total accepted count
                     $period['accepted_count']++;
                     // Author's accepted count
                     $period['unique_inviters'][$author_key]['overall']['accepted']++;
                 }
                 // Is it a CloudSponge invite?
                 $is_cloudsponge = get_post_meta(get_the_ID(), 'bp_ia_is_cloudsponge', true);
                 if (__('Yes', 'invite-anyone') == $is_cloudsponge) {
                     $period['total_count_cs']++;
                     // Author count
                     $period['unique_inviters'][$author_key]['cloudsponge']['sent']++;
                     if ($accepted) {
                         // Total accepted count
                         $period['accepted_count_cs']++;
                         // Author's accepted count
                         $period['unique_inviters'][$author_key]['cloudsponge']['accepted']++;
                     }
                 }
             }
         }
         // With all the data tallied, we can come up with some percentages
         // Overall acceptance rate
         if ($period['total_count']) {
             $period['acceptance_rate'] = round($period['accepted_count'] / $period['total_count'] * 100);
             $period['acceptance_rate'] .= '%';
         } else {
             $period['acceptance_rate'] = __('n/a', 'invite-anyone');
         }
         // CS percentage
         if ($period['total_count']) {
             $period['cs_percentage'] = round($period['total_count_cs'] / $period['total_count'] * 100);
             $period['cs_percentage'] .= '%';
         } else {
             $period['cs_percentage'] = __('n/a', 'invite-anyone');
         }
         // CS acceptance rate
         if ($period['total_count_cs']) {
             $period['acceptance_rate_cs'] = round($period['accepted_count_cs'] / $period['total_count_cs'] * 100);
             $period['acceptance_rate_cs'] .= '%';
         } else {
             $period['acceptance_rate_cs'] = __('n/a', 'invite-anyone');
         }
         // Find the most active user
         $leader_user_id_pct = 0;
         $leader_val_pct = 0;
         $leader_user_id_num = 0;
         $leader_val_num = 0;
         $leader_user_id_pct_cs = 0;
         $leader_val_pct_cs = 0;
         $leader_user_id_num_cs = 0;
         $leader_val_num_cs = 0;
//.........这里部分代码省略.........
开发者ID:socialray,项目名称:surfied-2-0,代码行数:101,代码来源:admin-stats.php


示例12: sa_entry_author

function sa_entry_author()
{
    return '<span class="vcard author entry-author"><a href="' . get_author_posts_url(get_the_author_ID()) . '" class="url fn" title="' . sprintf('View all posts by %s', esc_attr(get_the_author())) . '">' . get_the_author() . '</a></span>';
}
开发者ID:xentek,项目名称:shopp-architect,代码行数:4,代码来源:formatting.php


示例13: get_header

get_header();
?>

<div id="userpage">
<div id="main">

<?php 
if (have_posts()) {
    $first_post = true;
    while (have_posts()) {
        the_post();
        $author_feed_url = '';
        if (function_exists('get_author_feed_link')) {
            $author_feed_url = get_author_feed_link(get_the_author_ID());
        } else {
            $author_feed_url = get_author_rss_link(false, get_the_author_ID(), get_the_author_nickname());
        }
        ?>

<?php 
        if ($first_post === true) {
            ?>
	<h2>
		<?php 
            echo get_avatar(get_the_author_email(), 48);
            ?>
		Updates from <?php 
            the_author_posts_link();
            ?>
		<a class="rss" href="<?php 
            echo $author_feed_url;
开发者ID:alx,项目名称:pressmark,代码行数:31,代码来源:author.php


示例14: queryposts

function queryposts($atts)
{
    extract(shortcode_atts(array('category_id' => '', 'category_name' => '', 'tag' => '', 'day' => '', 'month' => '', 'year' => '', 'count' => '5', 'author_id' => '', 'author_name' => '', 'order_by' => 'date'), $atts));
    $output = '';
    $query = array();
    if ($category_id != '') {
        $query[] = 'cat=' . $category_id;
    }
    if ($category_name != '') {
        $query[] = 'category_name=' . $category_name;
    }
    if ($tag != '') {
        $query[] = 'tag=' . $tag;
    }
    if ($day != '') {
        $query[] = 'day=' . $day;
    }
    if ($month != '') {
        $query[] = 'monthnum=' . $month;
    }
    if ($year != '') {
        $query[] = 'year=' . $year;
    }
    if ($count) {
        $query[] = 'posts_per_page=' . $count;
    }
    if ($author_id != '') {
        $query[] = 'author=' . $author_id;
    }
    if ($author_name != '') {
        $query[] = 'author_name=' . $author_name;
    }
    if ($order_by) {
        $query[] = 'orderby=' . $order_by;
    }
    $posts = new WP_Query(implode('&', $query));
    while ($posts->have_posts()) {
        $posts->the_post();
        $output .= '<div class="post">';
        $output .= '<div class="post-header"><h3 class="post-title"><a href="' . get_permalink() . '" rel="bookmark" title="' . __('Permanent Link:', 'arclite') . ' ' . get_the_title() . '">' . get_the_title() . '</a></h3>';
        $output .= '<p class="post-date"><span class="month">' . get_the_time(__('M', 'arclite')) . '</span><span class="day">' . get_the_time(__('j', 'arclite')) . '</span></p>';
        $output .= '<p class="post-author"><span class="info">' . sprintf(__('Posted by %s in %s', 'arclite'), '<a href="' . get_author_posts_url(get_the_author_ID()) . '" title="' . sprintf(__("Posts by %s", "arclite"), attribute_escape(get_the_author())) . ' ">' . get_the_author() . '</a>', get_the_category_list(', ')) . ' | ';
        if (comments_open()) {
            // global $id, $comment;
            $comments_number = get_comments_number();
            $output .= '<a href="' . get_permalink() . '#comments" class="';
            if ($comments_number == 0) {
                $output .= 'no ';
            }
            $output .= 'comments">';
            if ($comments_number > 1) {
                $output .= sprintf(__('%s comments'), $comments_number);
            } else {
                if ($comments_number == 1) {
                    $output .= __('1 comment');
                } else {
                    $output .= __('No comments');
                }
            }
            $output .= '</a>';
        } else {
            $output .= __("Comments Off", "arclite");
        }
        $output .= '</span></p></div>';
        $output .= '<div class="post-content clearfix">';
        $post_preview = get_arclite_option('post_preview');
        if ($post_preview == 'excerpt') {
            $output .= get_the_excerpt();
        } else {
            $output .= get_the_content(__('Read the rest of this entry &raquo;', 'arclite'));
        }
        $output .= '</div>';
        $post_tags = get_the_tags();
        if ($post_tags) {
            $output .= '<p class="tags">';
            $tags = array();
            $i = 0;
            foreach ($post_tags as $tag) {
                $tags[$i] .= '<a href="' . get_tag_link($tag->term_id) . '" rel="tag" title="' . sprintf(__('%s (%s topics)'), $tag->name, $tag->count) . '">' . $tag->name . '</a>';
                $i++;
            }
            $output .= implode(', ', $tags);
            $output .= '</p>';
        }
        $output .= '</div>';
    }
    return $output;
}
开发者ID:jun200,项目名称:wordpress,代码行数:88,代码来源:functions.php


示例15: 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


示例16: thesis_author

function thesis_author()
{
    global $thesis;
    if ($thesis['display']['byline']['author']['link']) {
        if ($thesis['display']['byline']['author']['nofollow']) {
            $nofollow = ' rel="nofollow"';
        }
        $author = '<a href="' . get_author_posts_url(get_the_author_ID()) . '" class="url fn"' . $nofollow . '>' . get_the_author() . '</a>';
    } else {
        $author = get_the_author();
        $fn = ' fn';
    }
    echo __('by', 'thesis') . ' <span class="author vcard' . $fn . '">' . $author . '</span>';
}
开发者ID:billerby,项目名称:Surdeg,代码行数:14,代码来源:content.php


示例17: invite_anyone_settings_mi_content

function invite_anyone_settings_mi_content()
{
    // Load the pagination helper
    if (!class_exists('BBG_CPT_Pag')) {
        require_once dirname(__FILE__) . '/../lib/bbg-cpt-pag.php';
    }
    $pagination = new BBG_CPT_Pag();
    // Load the sortable helper
    if (!class_exists('BBG_CPT_Sort')) {
        require_once dirname(__FILE__) . '/../lib/bbg-cpt-sort.php';
    }
    $cols = array(array('name' => 'author', 'title' => __('Inviter', 'invite-anyone'), 'css_class' => 'ia-inviter'), array('name' => 'ia_invitees', 'title' => __('Invited Email', 'invite-anyone'), 'css_class' => 'ia-invited-email'), array('name' => 'sent', 'title' => __('Sent', 'invite-anyone'), 'css_class' => 'ia-sent', 'default_order' => 'desc', 'posts_column' => 'post_date', 'is_default' => true), array('name' => 'accepted', 'title' => __('Accepted', 'invite-anyone'), 'css_class' => 'ia-accepted', 'default_order' => 'desc'), array('name' => 'cloudsponge', 'title' => __('CloudSponge', 'invite-anyone'), 'css_class' => 'ia-cloudsponge'));
    $sortable = new BBG_CPT_Sort($cols);
    $args = array('orderby' => $sortable->get_orderby, 'order' => $sortable->get_order, 'posts_per_page' => $pagination->get_per_page, 'paged' => $pagination->get_paged, 'status' => 'trash,publish,pending,draft,future');
    // Get the invites
    $invite = new Invite_Anyone_Invitation();
    $invites = $invite->get($args);
    // Complete the pagination setup
    $pagination->setup_query($invites);
    ?>

	<?php 
    if ($invites->have_posts()) {
        ?>
		<div class="ia-admin-pagination">
			<div class="currently-viewing">
				<?php 
        $pagination->currently_viewing_text();
        ?>
			</div>

			<div class="pag-links">
				<?php 
        $pagination->paginate_links();
        ?>
			</div>
		</div>

		<table class="wp-list-table widefat ia-invite-list">

		<thead>
			<tr>
				<th scope="col" id="cb" class="check-column">
					<input type="checkbox" />
				</th>

				<?php 
        if ($sortable->have_columns()) {
            while ($sortable->have_columns()) {
                $sortable->the_column();
                ?>
					<?php 
                $sortable->the_column_th();
                ?>
				<?php 
            }
        }
        ?>

			</tr>
		</thead>

		<tbody>
			<?php 
        while ($invites->have_posts()) {
            $invites->the_post();
            ?>
			<tr>
				<th scope="row" class="check-column">
					<input type="checkbox" />
				</th>

				<td class="ia-inviter">
					<?php 
            echo bp_core_get_userlink(get_the_author_ID());
            ?>

					<div class="row-actions">
						<span class="edit"><a href="<?php 
            echo add_query_arg(array('post' => get_the_ID(), 'action' => 'edit'), admin_url('post.php'));
            ?>
"><?php 
            _e('View Invitation', 'invite-anyone');
            ?>
</a></span>
					</div>
				</td>

				<td class="ia-invited-email">
					<?php 
            $emails = wp_get_post_terms(get_the_ID(), invite_anyone_get_invitee_tax_name());
            foreach ($emails as $email) {
                // Before storing taxonomy terms in the db, we replace "+" with ".PLUSSIGN.", so we need to reverse that before displaying the email address.
                $email_address = str_replace('.PLUSSIGN.', '+', $email->name);
                echo esc_html($email_address);
            }
            ?>
				</td>

				<td class="ia-sent">
//.........这里部分代码省略.........
开发者ID:socialray,项目名称:surfied-2-0,代码行数:101,代码来源:admin-panel.php


示例18: the_post

<div class="pp-project-main">
	<div class="pp-project-tabs">

<?php 
    the_post();
    ?>

		<h3>Latest Updates</h3>
	
		<ul class="pp-updates">
			<li id="pp-update-<?php 
    the_ID();
    ?>
" class="pp-update">
				<?php 
    echo get_avatar(get_the_author_ID(), 48);
    ?>
				<h4>
					<?php 
    the_author_posts_link();
    ?>
					<span class="meta">
						<?php 
    printf(__('%1$s on %2$s'), get_the_time(), the_date('', '', '', false));
    ?>
 |
						<a href="<?php 
    the_permalink();
    ?>
">#</a> |
						<?php 
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:single.php


示例19: cfct_choose_content_template_role

function cfct_choose_content_template_role($type = 'content', $files = null)
{
    $files = cfct_role_templates($type, $files);
    if (count($files)) {
        $user = new WP_User(get_the_author_ID());
        if (count($user->roles)) {
            foreach ($files as $file) {
                foreach ($user->roles as $role) {
                    if (cfct_role_filename_to_name($file) == $role) {
                        $keys = array($role);
                        return cfct_filename($type, 'role', $keys);
                    }
                }
            }
        }
    }
    return false;
}
开发者ID:alicam,项目名称:vanilla-theme,代码行数:18,代码来源:utility.php


示例20: the_permalink

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

						<div class="entry-meta">
							<span class="chronodata">
								<?php 
        /* Date & Author */
        printf(__('Published %1$s %2$s', 'k2_domain'), $multiple_users ? sprintf(__('by %s', 'k2_domain'), '<span class="vcard author"><a href="' . get_author_posts_url(get_the_author_ID()) . '" class="url fn" title="' . sprintf(__('View all posts by %s', 'k2_domain'), attribute_escape(get_the_author())) . '">' . get_the_author() . '</a></span>') : '', '<abbr class="published" title="' . get_the_time('Y-m-d\\TH:i:sO') . '">' . (function_exists('time_since') ? sprintf(__('%s ago', 'k2_domain'), time_since(abs(strtotime($post->post_date_gmt . " GMT")), time())) : get_the_time($dateformat)) . '</abbr>');
        ?>
							</span>
						</div>
					</div> <!-- .entry-head -->

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



注:本文中的get_the_author_ID函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_the_author_description函数代码示例发布时间:2022-05-15
下一篇:
PHP get_the_author函数代码示例发布时间: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