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

PHP the_author_meta函数代码示例

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

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



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

示例1: restful_post_meta_above

/**
 * Post meta for above the post.
 */
function restful_post_meta_above()
{
    global $post;
    ?>

  <div class="entry__meta-item">
    <i class="fa fa-calendar"></i>
    <a href="<?php 
    esc_url(get_permalink());
    ?>
"><?php 
    the_time(get_option('date_format'));
    ?>
</a>
  </div>

  <div class="entry__meta-item">
    <i class="fa fa-user"></i>
    <a href="<?php 
    echo esc_url(get_author_posts_url($post->post_author));
    ?>
"><?php 
    the_author_meta('display_name', $post->post_author);
    ?>
</a>
  </div>

  <?php 
    if (comments_open() || have_comments()) {
        ?>
    <div class="entry__meta-item">
      <i class="fa fa-comment"></i>
      <a href="<?php 
        esc_url(comments_link());
        ?>
"><?php 
        comments_number();
        ?>
</a>
    </div>
  <?php 
    }
    ?>

<?php 
}
开发者ID:themebright,项目名称:Restful,代码行数:49,代码来源:template-tags.php


示例2: widget

    function widget($args, $instance)
    {
        extract($args);
        $instance[width] = $grid_width;
        if (get_the_author_meta('description')) {
            ?>
				<div id="author-info">
					<div id="author-avatar">
						<?php 
            echo get_avatar(get_the_author_meta('user_email'), 60);
            ?>
					</div><!-- #author-avatar -->
					<div id="author-description">
						<h2><?php 
            printf(__('About %s', THEME_ADMIN_LANG_DOMAIN), get_the_author());
            ?>
</h2>
						<?php 
            the_author_meta('description');
            ?>
					</div><!-- #author-description	-->
				</div><!-- #entry-author-info -->
				<?php 
        }
    }
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:25,代码来源:the-cored.php


示例3: post_excerpts_here

function post_excerpts_here()
{
    //posts with date, author, time, content excerpts, and title..
    if (have_posts()) {
        while (have_posts()) {
            echo '<div class="excerpt-div">';
            the_post();
            echo '<h2 class="post-title"><a href="';
            the_permalink();
            echo '" title="';
            the_title();
            echo '">';
            the_title();
            echo '</a></h2>';
            echo '<h4 class="post-info">';
            echo 'Created on ';
            the_date();
            echo ' at ';
            the_time();
            echo ' by ';
            the_author_meta(first_name);
            echo '.</h4>';
            echo '<p class="post-excerpt">';
            the_excerpt();
            echo '</p>';
            echo '</div>';
        }
        // end while
    }
    // end if
}
开发者ID:jbrown25,项目名称:Apicat-WP-theme,代码行数:31,代码来源:functions.php


示例4: widget

    public function widget($args, $instance)
    {
        // outputs the content of the widget
        global $post;
        if (!empty($post)) {
        }
        echo $args['before_widget'];
        echo get_avatar(get_the_author_meta('ID'), 40);
        ?>
		<div class="author-text">
			<div class="title"><?php 
        echo esc_html(siteorigin_setting('video_by_text', __('Video By', 'focus')));
        ?>
</div>
			<div class="author"><?php 
        the_author_meta('display_name');
        ?>
</div>
		</div>
		<div class="clear"></div>
		<div class="post-info"><?php 
        focus_posted_on();
        ?>
</div>
		<?php 
        echo $args['after_widget'];
    }
开发者ID:siteorigin,项目名称:focus,代码行数:27,代码来源:widgets.php


示例5: contributors

function contributors()
{
    $contributors = get_users('orderby=nicename&role=contributor');
    // Array of WP_User objects.
    foreach ($contributors as $user) {
        echo "<div class='author'>";
        echo "<div class='author-image'><a href='" . get_author_posts_url($user->ID) . "'>" . get_avatar($user->ID) . "</a></div>";
        echo "<div class='author-name'>" . the_author_meta('display_name', $user->ID) . "</div>";
        echo "</div>";
    }
}
开发者ID:benjohnstone,项目名称:companytheatre,代码行数:11,代码来源:functions.php


示例6: section_template

    /**
     * Section template.
     */
    function section_template()
    {
        global $post;
        setup_postdata($post);
        ob_start();
        the_author_meta('url');
        $link = ob_get_clean();
        $default_avatar = PL_IMAGES . '/avatar_default.gif';
        $author_email = get_the_author_meta('email', $post->post_author);
        $author_name = get_the_author();
        $author_desc = get_the_author_meta('description', $post->post_author);
        $google_profile = get_the_author_meta('google_profile');
        ?>
		<div class="media author-info">
			<div class="img thumbnail author-thumb">
				<a class="thumbnail" href="<?php 
        echo $link;
        ?>
" target="_blank">
					<?php 
        echo get_avatar($author_email, '120', $default_avatar);
        ?>
				</a>
			</div>
			<div class="bd">
				<small class="author-note"><?php 
        _e('Author', 'pagelines');
        ?>
</small>
				<h2>
					<?php 
        echo $author_name;
        ?>
				</h2>
				<p><?php 
        echo $author_desc;
        ?>
</p>
				<p class="author-details">
					<?php 
        if ($link != '') {
            printf('<a href="%s" class="btn" target="_blank"><i class="icon icon-external-link"></i> %s</a> ', $link, __('Visit Authors Website &rarr;', 'pagelines'));
        }
        if ($google_profile) {
            printf('<a href="%s" class="btn" rel="me"><i class="icon icon-google-plus"></i> %s</a>', $google_profile, __('Authors Google Profile &rarr;', 'pagelines'));
        }
        ?>
				</p>
			</div>

		</div>
		<div class="clear"></div>
<?php 
    }
开发者ID:taeche,项目名称:SoDoEx,代码行数:57,代码来源:section.php


示例7: widget

    function widget($args, $instance)
    {
        extract($args);
        if (!is_single()) {
            return;
        }
        $title = apply_filters('widget_title', $instance['title']);
        if (empty($title)) {
            $title = false;
        }
        $show_gravatar = $instance['show_gravatar'] == 1 ? true : false;
        $show_bio = $instance['show_bio'] == 1 ? true : false;
        echo $before_widget;
        if ($title) {
            echo $before_title;
            echo $title;
            echo $after_title;
        }
        ?>

	<div class="author-info cf">

		<?php 
        if ($show_gravatar) {
            echo get_avatar(get_the_author_meta('email'), '60');
        }
        ?>

		<span><?php 
        echo stripslashes(get_option('dt_lang_gen_postedby'));
        ?>
 <?php 
        the_author_posts_link();
        ?>
</span>

		<?php 
        if ($show_bio) {
            ?>
			<p><?php 
            the_author_meta('description');
            ?>
</p>
		<?php 
        }
        ?>

	</div><!-- .author-info -->
<?php 
        echo $after_widget;
    }
开发者ID:jainankit,项目名称:suggstme,代码行数:51,代码来源:widget-authorinfo.php


示例8: jdh_toc_list_posts

function jdh_toc_list_posts($posts)
{
    global $post;
    foreach ($posts as $post) {
        setup_postdata($post);
        echo '<p><a href="' . get_permalink() . '">' . $post->post_title . '</a><br>';
        if (function_exists('coauthors')) {
            coauthors(',<br>');
        } else {
            echo the_author_meta('first_name') . ' ' . the_author_meta('last_name');
        }
        echo '</p>';
    }
}
开发者ID:arshanam,项目名称:JDH-theme,代码行数:14,代码来源:functions.php


示例9: widget

	function widget($args, $instance) {
		global $post;
		
		$posts = get_field('post', 'widget_'.$args['widget_id']);


		if( $posts ) :
			echo $args['before_widget']; 
			?>

				<?php foreach($posts as $post) : ?>
				<?php setup_postdata($post); ?>
				<?php 
					$author_id = get_the_author_meta('ID');
					$author_image = get_field('image', 'user_'. $author_id);
					$author_img_url = get_avatar_url ( $author_id, $size = '40' );
					$author_url = get_author_posts_url($author_id);
					$excerpt = get_the_excerpt();
					$excerpt = (strlen($excerpt) > 150) ? '"'.substr($excerpt,0,150).'" ...' : $excerpt;

				 ?>

					<img class="image" src="<?php echo get_image(get_post_thumbnail_id($post->ID), array(180, 180)); ?>">
					<div class="script">
						<img src="<?php bloginfo('template_directory'); ?>/images/misc/editors-letter.png" alt="">	
					</div>
					<a href="<?php echo $author_url; ?>">
						<div class="author">
								<div class="image circle">
										<img src="<?php echo $author_img_url; ?>" />
								</div>
								<span class="name"><?php echo the_author_meta( "display_name", $author_id ); ?></span>
						</div>	
					</a>
					<div class="date">
						february 01,2015
					</div>
					
					<div class="bio">
						<?php echo $excerpt; ?>	
						<a class="read-more" href="<?php the_permalink(); ?>">Read Further &raquo;</a>	
					</div>
				<?php endforeach;	?>
			<? 
			echo $args['after_widget'];	
		endif;
		
		
	}
开发者ID:kishandchips,项目名称:thebankcorporate,代码行数:49,代码来源:editor.php


示例10: get_vendors_from_order

 /**
  * Vendor IDs and PayPal addresses from an order
  *
  * @param object  $order
  * @param unknown $items (optional)
  *
  * @return array
  */
 public function get_vendors_from_order($order, $items = false)
 {
     if (!$items) {
         $items = $order->get_items();
     }
     $vendors = array();
     foreach ($items as $key => $product) {
         $author = PV_Vendors::get_vendor_from_product($product['product_id']);
         // Only store the vendor authors
         if (!PV_Vendors::is_vendor($author)) {
             continue;
         }
         $vendors[$author] = the_author_meta('author_paypal', $author);
     }
     return apply_filters('pv_vendors_from_order', $vendors, $order);
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:24,代码来源:class-vendors.php


示例11: ait_type_custom_columns

function ait_type_custom_columns($column, $post_id)
{
    switch ($column) {
        case "thumbnail":
            $width = (int) 100;
            $height = (int) 100;
            // thumbnail of WP 2.9
            $thumbnail_id = get_post_meta($post_id, '_thumbnail_id', true);
            // image from gallery
            $attachments = get_children(array('post_parent' => $post_id, 'post_type' => 'attachment', 'post_mime_type' => 'image'));
            if ($thumbnail_id) {
                $thumb = @wp_get_attachment_image($thumbnail_id, array($width, $height), true);
            } elseif ($attachments) {
                foreach ($attachments as $attachment_id => $attachment) {
                    $thumb = @wp_get_attachment_image($attachment_id, array($width, $height), true);
                }
            }
            if (isset($thumb) && $thumb) {
                echo $thumb;
            } else {
                echo __('None', 'ait');
            }
            break;
        case "menu_order":
            $post = get_post($post_id);
            echo $post->menu_order;
            unset($post);
            break;
        case "content":
            $post = get_post($post_id);
            echo strip_tags($post->post_content);
            unset($post);
            break;
        case "category":
            $post_type = get_post_type($post_id);
            echo get_the_term_list($post_id, $post_type . '-category', '', ', ');
            break;
        case "author":
            $post = get_post($post_id);
            the_author_meta('user_nicename', $post->post_author);
            break;
    }
}
开发者ID:simeont9,项目名称:stoneopen,代码行数:43,代码来源:default-custom-type.php


示例12: members_author_profile

/**
 * Use to put an author box at the end/beginning of a post.  This template
 * tag should be used within The Loop.
 *
 * @since 0.1
 * @uses get_avatar() Gets the current author's avatar.
 * @uses get_the_author_meta() Grabs information about the author.
 */
function members_author_profile()
{
    ?>
	<div class="author-profile vcard">
		<?php 
    echo get_avatar(get_the_author_meta('user_email'), '100', '', get_the_author_meta('display_name'));
    ?>
		<h4 class="author-name fn n"><?php 
    the_author_posts_link();
    ?>
</h4>
		<p class="author-description author-bio">
			<?php 
    the_author_meta('description');
    ?>
		</p>
	</div>
<?php 
}
开发者ID:fwelections,项目名称:fwelections,代码行数:27,代码来源:template-tags.php


示例13: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     if (is_single()) {
         echo $before_widget;
         $title = apply_filters('widget_title', $instance['title']);
         if (!empty($title)) {
             echo $before_title . $title . $after_title;
         }
         echo '<div class="author-data">';
         echo get_avatar(get_the_author_meta('user_email'), 150);
         echo '<h4>' . the_author_meta('display_name') . '</h4>';
         // Is there an author description?
         if (get_the_author_meta('description')) {
             echo '<div class="description"><p>' . get_the_author_meta('description') . '</p></div>';
         }
         echo '</div>';
         echo $after_widget;
     }
 }
开发者ID:jmawebco,项目名称:wordpress1,代码行数:20,代码来源:author-data.php


示例14: bwpp_entry_footer

    /**
     * Prints HTML with meta information for the categories, tags and comments.
     */
    function bwpp_entry_footer()
    {
        // Hide category and tag text for pages.
        if ('post' === get_post_type()) {
            /* translators: used between list items, there is a space after the comma */
            $categories_list = get_the_category_list(esc_html__(', ', 'bwpp'));
            if ($categories_list && bwpp_categorized_blog()) {
                printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'bwpp') . '</span>', $categories_list);
                // WPCS: XSS OK.
            }
            /* translators: used between list items, there is a space after the comma */
            $tags_list = get_the_tag_list('', esc_html__(', ', 'bwpp'));
            if ($tags_list) {
                printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'bwpp') . '</span>', $tags_list);
                // WPCS: XSS OK.
            }
        }
        if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
            echo '<span class="comments-link">';
            comments_popup_link(esc_html__('Leave a comment', 'bwpp'), esc_html__('1 Comment', 'bwpp'), esc_html__('% Comments', 'bwpp'));
            echo '</span>';
        }
        if (is_single() || is_singular()) {
            ?>
		<div class="author-overview clear">
			<?php 
            echo get_avatar(get_the_author_meta('ID'), 100);
            ?>
			<div class="author-name"><?php 
            the_author_meta('display_name');
            ?>
</div>
			<p><?php 
            the_author_meta('description');
            ?>
</p>
		</div>
	<?php 
        }
        edit_post_link(sprintf(esc_html__('Edit %s', 'bwpp'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
    }
开发者ID:buildwpplugins,项目名称:bwpp-theme,代码行数:44,代码来源:template-tags.php


示例15: section_template

    function section_template()
    {
        global $post;
        setup_postdata($post);
        ?>
		
		<div class="author-info">
			<div class="author-thumb">
				<?php 
        echo get_avatar(get_the_author_meta('email', $post->post_author), $size = '80', $default = CORE_IMAGES . '/avatar_default.gif');
        ?>
			</div>
			<small class="subtext"><?php 
        _e('About The Author', 'pagelines');
        ?>
</small>
			<h2>
				<?php 
        echo get_the_author();
        ?>
			</h2>
			<p><?php 
        the_author_meta('description', $post->post_author);
        ?>
</p>
			<div class="author-details">
				<a href="<?php 
        the_author_meta('url');
        ?>
" target="_blank">
				<?php 
        _e('Visit Authors Website', 'pagelines');
        ?>
 &rarr;
				</a>
			</div>
		
		</div>
		<div class="clear"></div>
<?php 
    }
开发者ID:rohans,项目名称:tradeinbooks,代码行数:41,代码来源:section.postauthor.php


示例16: random_groups

function random_groups()
{
    global $wpdb;
    $authors = get_users('orderby=post_count&order=desc&number=4&role=contributor');
    foreach ($authors as $author) {
        echo "<li class=\"guest-entry\">";
        echo '<div><h3>';
        echo "<a href=\"" . get_bloginfo('url') . "/?author=";
        echo $author->ID;
        echo "\">";
        the_author_meta('display_name', $author->ID);
        echo "</a>";
        echo "</h3>";
        echo "<a href=\"" . get_bloginfo('url') . "/?author=";
        echo $author->ID;
        echo "\">";
        echo userphoto($author->ID);
        echo "</a></div>";
        echo "</li>";
    }
}
开发者ID:almcd,项目名称:brittenandbeyond,代码行数:21,代码来源:random_groups.php


示例17: wp_link_pages

    }
}
?>
		</div><!-- .entry-content -->
		<?php 
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'bluth'), 'after' => '</div>'));
?>
		<footer class="entry-meta clearfix" style="padding:25px 50px;">
			<?php 
get_template_part('inc/meta-bottom');
?>
		</footer><!-- .entry-meta -->
	</div><!-- .entry-container -->
	<span class="vcard" style="display: none;">
		<span class="fn">													
			<a href="<?php 
echo get_author_posts_url(get_the_author_meta('ID'));
?>
" class="author"><?php 
the_author_meta('first_name');
?>
 <?php 
the_author_meta('last_name');
?>
</a>
		</span>
	</span>
</article><!-- #post-<?php 
the_ID();
?>
 -->
开发者ID:aaronramirez,项目名称:ssbd,代码行数:31,代码来源:single-status.php


示例18: printf

}
?>
		</div>		
	</div>
	
	<div class="col-md-9 col-sm-9 col-xs-12">
		<h3 class="author-name">
			<?php 
printf(__('About %s', 'moesia'), esc_html($author_name));
?>
				
		</h3>
	
		<div class="author-desc">
			<?php 
esc_html(the_author_meta('description'));
?>
		</div>
		
		<div class="view-all"><a href="<?php 
echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
?>
"><?php 
printf(__('See all posts by %s', 'moesia'), esc_html($author_name));
?>
</a>&nbsp;<i class="fa fa-long-arrow-right"></i></div>
	</div>
</div> 


开发者ID:tlan16,项目名称:Moesia,代码行数:28,代码来源:author-bio.php


示例19: the_title

        the_title();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
                    <aside class="post_author clearfix" itemscope itemtype="http://data-vocabulary.org/Person">
                        <figure itemprop="photo"><?php 
        echo get_avatar(get_the_author_meta('user_email'));
        ?>
</figure>
                        <h4 rel="author"><a target="_blank" title="Google Plus de <?php 
        echo get_the_author();
        ?>
" href="<?php 
        the_author_meta('google_plus');
        ?>
?rel=author" itemprop="contact"> de <span itemprop="name"><?php 
        echo get_the_author();
        ?>
</span></a></h4>
                        <time datetime="<?php 
        the_time('Y/m/d g:i:s A');
        ?>
" pubdate><?php 
        the_date('j F Y');
        ?>
</time>
                    </aside>
                    <?php 
        echo excerpt_count(160);
开发者ID:podemosfrance,项目名称:podemosfrance.info,代码行数:31,代码来源:tag.php


示例20: the_author_meta

    ?>
</h3>

    <?php 
    if (get_the_author_meta('description')) {
        ?>
    <div class="profile-desc">
      <?php 
        the_author_meta('description');
        ?>
    </div>
    <?php 
    }
    ?>

    <?php 
    if (get_the_author_meta('user_url')) {
        ?>
    <span class="profile-url">
      <?php 
        the_author_meta('user_url');
        ?>
    </span>
    <?php 
    }
    ?>

  </div>
</div>
<?php 
}
开发者ID:katrinagd,项目名称:wp-flex,代码行数:31,代码来源:author_meta.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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