本文整理汇总了PHP中get_the_author_posts函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_author_posts函数的具体用法?PHP get_the_author_posts怎么用?PHP get_the_author_posts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_the_author_posts函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: test_get_the_author_posts
function test_get_the_author_posts()
{
// Test with no global post, result should be 0 because no author is found
$this->assertEquals(0, get_the_author_posts());
$GLOBALS['post'] = $this->post_id;
$this->assertEquals(1, get_the_author_posts());
}
开发者ID:boonebgorges,项目名称:wp,代码行数:7,代码来源:author.php
示例2: wp_about_author_display
function wp_about_author_display($for_feed = false)
{
global $post;
$wp_about_author_settings = array();
$wp_about_author_settings = get_option('wp_about_author_settings');
$wp_about_author_content = "";
$wp_about_author_links = "";
$wp_about_author_social = "";
$wp_about_author_author_pic = "";
$wp_about_author_author = array();
$wp_about_author_author['name'] = get_the_author();
$wp_about_author_author['description'] = get_the_author_meta('description');
$wp_about_author_author['website'] = get_the_author_meta('url');
$wp_about_author_author['posts'] = (int) get_the_author_posts();
$wp_about_author_author['posts_url'] = get_author_posts_url(get_the_author_meta('ID'));
$wp_about_author_author_pic = get_avatar(get_the_author_meta('email'), '100');
// About Author Title
$wp_about_author_content .= "<h3><a href='" . $wp_about_author_author['posts_url'] . "' title='" . $wp_about_author_author['name'] . "'>" . apply_filters('wp_about_author_name', $wp_about_author_author['name']) . "</a></h3>";
// About Author Description
$wp_about_author_content .= "<p>" . apply_filters('wp_about_author_description', $wp_about_author_author['description']) . "</p>";
// About Author Links
if (!empty($wp_about_author_author['posts_url'])) {
$wp_about_author_links .= "<a href='" . $wp_about_author_author['posts_url'] . "' title='More posts by " . $wp_about_author_author['name'] . "'>" . apply_filters('wp_about_author_more_posts', "More Posts") . "</a> ";
}
if (!empty($wp_about_author_author['website'])) {
if ($wp_about_author_links != "") {
$wp_about_author_links .= apply_filters('wp_about_author_separator', " - ");
}
$wp_about_author_links .= "<a href='" . $wp_about_author_author['website'] . "' title='" . $wp_about_author_author['name'] . "'>" . apply_filters('wp_about_author_website', "Website") . "</a> ";
}
// About Author Social
$wp_about_author_social .= wp_about_author_get_social_links($wp_about_author_settings);
if (isset($wp_about_author_settings['wp_author_social_images']) && $wp_about_author_settings['wp_author_social_images']) {
$wp_about_author_content .= "<p>" . $wp_about_author_links . "</p>";
if ($wp_about_author_social != "") {
$wp_about_author_content .= '<p class="wpa-nomargin">' . apply_filters('wp_about_author_follow_me', "Follow Me:") . '<br />' . $wp_about_author_social . '</p>';
}
} else {
$wp_about_author_content .= "<p class='wpa-nomargin'>";
$wp_about_author_content .= $wp_about_author_links;
if ($wp_about_author_social != "") {
$wp_about_author_content .= apply_filters('wp_about_author_separator', " - ") . $wp_about_author_social;
}
$wp_about_author_content .= "</p>";
}
// Create output
$return_content = '';
// Allow filters to create new templates for output
if (!$for_feed) {
$return_content = apply_filters('wp_about_author_template', '<div class="wp-about-author-containter-%%bordertype%%" style="background-color:%%borderbg%%;"><div class="wp-about-author-pic">%%authorpic%%</div><div class="wp-about-author-text">%%content%%</div></div>');
} else {
$return_content = apply_filters('wp_about_author_feed_template', '<p><div style="float:left; text-align:left;>%%authorpic%%</div>%%content%%</p>');
}
$replace_array = array('%%bordertype%%' => $wp_about_author_settings['wp_author_alert_border'], '%%borderbg%%' => $wp_about_author_settings['wp_author_alert_bg'], '%%authorpic%%' => $wp_about_author_author_pic, '%%content%%' => $wp_about_author_content);
foreach ($replace_array as $search => $replace) {
$return_content = str_replace($search, $replace, $return_content);
}
return apply_filters('wp_about_author_display', $return_content);
}
开发者ID:par-orillonsoft,项目名称:elearning-wordpress,代码行数:59,代码来源:wp-about-author.php
示例3: test_get_the_author_posts_with_custom_post_type
/**
* @ticket 30904
*/
function test_get_the_author_posts_with_custom_post_type()
{
register_post_type('wptests_pt');
$cpt_ids = self::factory()->post->create_many(2, array('post_author' => $this->author_id, 'post_type' => 'wptests_pt'));
$GLOBALS['post'] = $cpt_ids[0];
$this->assertEquals(2, get_the_author_posts());
_unregister_post_type('wptests_pt');
}
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:11,代码来源:author.php
示例4: wp_about_author_display
function wp_about_author_display($for_feed = false)
{
global $post;
$wp_about_author_settings = array();
$wp_about_author_settings = get_option('wp_about_author_settings');
$wp_about_author_content = "";
$wp_about_author_author_pic = "";
$wp_about_author_author = array();
$wp_about_author_author['name'] = get_the_author();
$wp_about_author_author['description'] = get_the_author_meta('description');
$wp_about_author_author['twitter'] = get_the_author_meta('twitter');
$wp_about_author_author['facebook'] = get_the_author_meta('facebook');
$wp_about_author_author['website'] = get_the_author_meta('url');
$wp_about_author_author['posts'] = (int) get_the_author_posts();
$wp_about_author_author['posts_url'] = get_author_posts_url(get_the_author_meta('ID'));
$wp_about_author_author_pic = get_avatar(get_the_author_email(), '100');
$wp_about_author_content .= "<h3><a href='" . $wp_about_author_author['posts_url'] . "' title='" . $wp_about_author_author['name'] . "'>" . $wp_about_author_author['name'] . "</a></h3>";
$wp_about_author_content .= "<p>" . $wp_about_author_author['description'] . "</p>";
$wp_about_author_link = '';
if (!empty($wp_about_author_author['website']) || !empty($wp_about_author_author['twitter']) || !empty($wp_about_author_author['facebook'])) {
$wp_about_author_content .= "<p>";
if (!empty($wp_about_author_author['website'])) {
$wp_about_author_link .= "<a href='" . $wp_about_author_author['website'] . "' title='" . $wp_about_author_author['name'] . "'>Website</a> ";
}
if (!empty($wp_about_author_author['twitter'])) {
if ($wp_about_author_link != "") {
$wp_about_author_link .= "- ";
}
$wp_about_author_link .= "<a href='" . $wp_about_author_author['twitter'] . "' title='" . $wp_about_author_author['name'] . "on Twitter'>Twitter</a> ";
}
if (!empty($wp_about_author_author['facebook'])) {
if ($wp_about_author_link != "") {
$wp_about_author_link .= "- ";
}
$wp_about_author_link .= "<a href='" . $wp_about_author_author['facebook'] . "' title='" . $wp_about_author_author['name'] . " on Facebook'>Facebook</a> ";
}
if (!empty($wp_about_author_author['posts_url'])) {
if ($wp_about_author_link != "") {
$wp_about_author_link .= "- ";
}
$wp_about_author_link .= "<a href='" . $wp_about_author_author['posts_url'] . "' title='More posts by " . $wp_about_author_author['name'] . "'>More Posts</a> ";
}
$wp_about_author_content .= $wp_about_author_link;
$wp_about_author_content .= "</p>";
}
if (!$for_feed) {
return '<div class="wp-about-author-containter-' . $wp_about_author_settings['wp_author_alert_border'] . '" style="background-color:' . $wp_about_author_settings['wp_author_alert_bg'] . ';"><div class="wp-about-author-pic">' . $wp_about_author_author_pic . '</div><div class="wp-about-author-text">' . $wp_about_author_content . '</div></div>';
} else {
return '<p><div style="float:left; text-align:left;>' . $wp_about_author_author_pic . '</div>' . $wp_about_author_content . '</p>';
}
}
开发者ID:revathskumar,项目名称:Coderepo,代码行数:51,代码来源:wp-about-author.php
示例5: mantra_the_author_fn
/**
* Returns current user information
* Example of use:
* [mantra-author display='attr'] where attr can be author / description / login / first-name / last-name / nickname / id / url / link / aim / yim / posts / posts-url
* Attributes:
* "display" - optional
*/
function mantra_the_author_fn($attr)
{
global $mantra_social_networks;
$id = get_the_author_meta('ID');
if ($id) {
if (isset($attr['display'])) {
$display = $attr['display'];
switch ($display) {
case 'author':
return get_the_author();
case 'description':
return get_the_author_meta('description', $id);
case 'login':
return get_the_author_meta('user_login', $id);
case 'first-name':
return get_the_author_meta('first_name', $id);
case 'last-name':
return get_the_author_meta('last_name', $id);
case 'nickname':
return get_the_author_meta('nickname', $id);
case 'id':
return $id;
case 'url':
return get_the_author_meta('user_url', $id);
case 'email':
return get_the_author_meta('user_email', $id);
case 'link':
if (get_the_author_meta('user_url', $id)) {
return '<a href="' . get_the_author_meta('user_url', $id) . '" title="' . esc_attr(get_the_author()) . '" rel="external">' . get_the_author() . '</a>';
} else {
return get_the_author();
}
case 'aim':
return get_the_author_meta('aim', $id);
case 'yim':
return get_the_author_meta('yim', $id);
case 'posts':
return get_the_author_posts();
case 'posts-url':
return get_author_posts_url(get_the_author_meta('ID'));
}
} else {
return get_the_author();
}
}
}
开发者ID:rzb,项目名称:boletos2,代码行数:53,代码来源:theme-shortcodes.php
示例6: rtp_default_post_meta
/**
* Default post meta
*
* @uses $rtp_post_comments Post Comments DB array
* @uses $post Post Data
* @param string $placement Specify the position of the post meta (top/bottom)
*
* @since rtPanel 2.0
*/
function rtp_default_post_meta($placement = 'top')
{
if ('post' == get_post_type() && !rtp_is_bbPress()) {
global $post, $rtp_post_comments;
$position = 'bottom' == $placement ? 'l' : 'u';
// l = Lower/Bottom , u = Upper/Top
if (rtp_has_postmeta($position)) {
if ($position == 'l') {
echo '<footer class="post-footer">';
}
?>
<div class="clearfix post-meta post-meta-<?php
echo esc_attr($placement);
?>
"><?php
if ('bottom' == $placement) {
rtp_hook_begin_post_meta_bottom();
} else {
rtp_hook_begin_post_meta_top();
}
// Author Link
if ($rtp_post_comments['post_author_' . $position] || $rtp_post_comments['post_date_' . $position]) {
if ($rtp_post_comments['post_author_' . $position]) {
printf(__('<span class="rtp-post-author-prefix">By</span> <span class="vcard author">%s</span>', 'rtPanel'), !$rtp_post_comments['author_link_' . $position] ? get_the_author() . ($rtp_post_comments['author_count_' . $position] ? '(' . get_the_author_posts() . ')' : '') : sprintf(__('<a class="fn" href="%1$s" title="%2$s">%3$s</a>', 'rtPanel'), get_author_posts_url(get_the_author_meta('ID'), get_the_author_meta('user_nicename')), esc_attr(sprintf(__('Posts by %s', 'rtPanel'), get_the_author())), get_the_author()) . ($rtp_post_comments['author_count_' . $position] ? '(' . get_the_author_posts() . ')' : ''));
}
echo $rtp_post_comments['post_author_' . $position] && $rtp_post_comments['post_date_' . $position] ? ' ' : '';
if ($rtp_post_comments['post_date_' . $position]) {
printf(__('<span class="rtp-meta-separator">·</span> <time class="published date updated" datetime="%s">%s</time>', 'rtPanel'), get_the_date('c'), get_the_time($rtp_post_comments['post_date_format_' . $position]));
}
}
// Post Categories
echo get_the_category_list() && $rtp_post_comments['post_category_' . $position] ? ' <span class="rtp-meta-separator">·</span> ' . get_the_category_list(', ') . '' : '';
// Comment Count
rtp_default_comment_count();
// Post Tags
echo get_the_tag_list() && $rtp_post_comments['post_tags_' . $position] ? '<p class="post-tags">' . get_the_tag_list(__('Tagged', 'rtPanel') . ': <span>', ', ', '</span>') . '</p>' : '';
// Post Custom Taxonomies
$args = array('_builtin' => false);
$taxonomies = get_taxonomies($args, 'objects');
foreach ($taxonomies as $key => $taxonomy) {
get_the_terms($post->ID, $key) && isset($rtp_post_comments['post_' . $key . '_' . $position]) && $rtp_post_comments['post_' . $key . '_' . $position] ? the_terms($post->ID, $key, '<span class="post-custom-tax post-' . $key . '">' . $taxonomy->labels->singular_name . ': ', ', ', '</span>') : '';
}
if ('bottom' == $placement) {
rtp_hook_end_post_meta_bottom();
} else {
rtp_hook_end_post_meta_top();
}
?>
</div><!-- .post-meta --><?php
if ($position == 'l') {
echo '</footer>';
}
}
} elseif (!rtp_is_bbPress()) {
if (get_edit_post_link() && 'top' == $placement) {
?>
<div class="post-meta post-meta-top"><?php
rtp_hook_end_post_meta_top();
?>
</div><?php
}
}
}
开发者ID:Phillydevs,项目名称:rtpanel,代码行数:74,代码来源:rtp-default-functions.php
示例7: get_author_posts_url
<div id="author-link">
<?php
if (get_the_author_posts() > 1) {
// if a user has only one post, don't link to their all posts page.
?>
<a href="<?php
echo get_author_posts_url(get_the_author_meta('ID'));
?>
">
<?php
echo "View all posts by " . get_the_author();
?>
<?php
}
if (get_the_author_posts() > 1 and get_the_author_meta('user_url')) {
?>
</a><span> | </span>
<?php
}
if (get_the_author_meta('user_url')) {
// if the user webpage link is filled out, display it.
?>
<a href="<?php
echo get_the_author_meta('user_url');
?>
"><?php
echo "Visit " . trim(get_the_author_meta('user_url'), 'http://');
?>
</a>
<?php
开发者ID:aliaspseudonym,项目名称:mantra-child,代码行数:31,代码来源:single.php
示例8: the_author_posts_shortcode
/**
* [the_author_posts] shortcode
*
* @since 0.1
* @author Ryan Hellyer <[email protected]>
* @return string
*/
public function the_author_posts_shortcode()
{
return get_the_author_posts();
}
开发者ID:ryanhellyer,项目名称:pressabl,代码行数:11,代码来源:class-pressabl-templating-framework.php
示例9: the_author_meta
?>
</h1>
<h2>A propos de l’auteur</h2>
<p class="auteur"><?php
the_author_meta('description');
?>
</p>
<h2>Son profil :</h2>
<p>
<strong>Son eMail</strong> : <?php
echo the_author_meta('user_email');
?>
.<br />
<strong>Son site web</strong> : <?php
echo the_author_meta('user_url');
?>
.<br />
</p>
<p><?php
echo get_the_author();
?>
a écrit <?php
echo get_the_author_posts();
?>
articles dans ce site.</p>
</main>
<?php
get_footer();
?>
<!-- Appel au template du pied de page-->
开发者ID:jul6art,项目名称:graph-it,代码行数:31,代码来源:author-off.php
示例10: get_avatar
<div class="author-info">
<div class="author-avatar">
<?php
echo get_avatar(get_the_author_meta('user_email'), 96);
?>
</div><!-- .author-avatar -->
<div class="author-meta">
<h2 class="author-title"><?php
printf(__('About %s', 'simone'), get_the_author());
?>
</h2>
<div class="share-and-more">
<?php
// Change language depending on number of posts
$posts_posted = get_the_author_posts();
if ($posts_posted == 1) {
printf(__('One article and counting. ', 'simone'));
} else {
printf(__('%s articles and counting. ', 'simone'), the_author_posts());
}
$author_firstname = get_the_author_meta('first_name');
// Check if social media info is collected in user profile
// Usually handled by a plugin like WordPress SEO by Yoast
$author_twitter = get_the_author_meta('twitter');
$author_googleplus = get_the_author_meta('googleplus');
$author_facebook = get_the_author_meta('facebook');
if ($author_twitter || $author_googleplus || $author_facebook) {
echo '<div class="author-social-media">';
printf(__('Follow %s on social media: ', 'simone'), get_the_author_meta('first_name'));
if ($author_twitter) {
开发者ID:FrederiqueGame,项目名称:simone,代码行数:31,代码来源:author-box.php
示例11: the_author_posts_link
?>
<div class="archive-header"
itemprop="mainEntity" itemscope itemtype="https://schema.org/Person">
<h1 rel="tag" itemprop="name"><?php
the_author_posts_link();
?>
</h1>
<div class="author-meta">
<div class="entry">
<div class="author-photo-cont">
<a href="<?php
echo get_author_posts_url($user_id);
?>
" class="author-nrposts">
<?php
echo number_format_i18n(get_the_author_posts());
?>
</a>
<a href="<?php
echo get_author_posts_url($user_id);
?>
" class="author-photo-anchor">
<?php
$wp_avatar_profile = get_user_meta($user_id, 'wp_avatar_profile', true);
$wp_fb_profile = get_user_meta($user_id, 'wp_fb_profile', true);
$wp_avatar_capability = get_option('wp_avatar_capability', 'read');
$size = '300';
$atts = array('extra_attr' => 'itemprop="image"');
if (user_can($user_id, $wp_avatar_capability)) {
if ('wp-facebook' == $wp_avatar_profile && !empty($wp_fb_profile)) {
$fb = 'https://graph.facebook.com/' . $wp_fb_profile . '/picture?width=' . $size . '&height=' . $size;
开发者ID:montreyw,项目名称:Theme-Redesign-and-SEO-Overhaul,代码行数:31,代码来源:index.php
示例12: bab_manual
function bab_manual()
{
if (is_single()) {
$bab_showauttxt = get_option('bab_showauttxt');
$bab_auttxt1 = get_option('bab_auttxt1');
$bab_auttxt2 = get_option('bab_auttxt2');
$bab_showautbio = get_option('bab_showautbio');
$bab_showautintro = get_option('bab_showautintro');
$bab_showautgra = get_option('bab_showautgra');
$author = array();
$author['name'] = get_the_author();
$author['twitter'] = get_the_author_meta('twitter');
$author['facebook'] = get_the_author_meta('facebook');
$author['gplus'] = get_the_author_meta('gplus');
$author['posts'] = (int) get_the_author_posts();
$email = get_the_author_meta('email');
ob_start();
?>
<div id="better-author-bio-div" style="background:#F7F7F7; margin:20px 0px 0px 0px; padding:10px 0; border:1px solid #E6E6E6; overflow:hidden; width:100%;" >
<div class="better-author-bio-div-info">
<?php
if ($bab_showautgra == 'y') {
?>
<?php
echo bab_gravatar($email);
?>
<?php
}
?>
<h4 style"margin:0 0 4px 90px; padding:0;" ><?php
printf(esc_attr__('%s %s'), $bab_showautintro, get_the_author());
?>
</h4>
<?php
if ($bab_showauttxt == 'y') {
?>
<p style="margin:0 0 0 90px; padding:0;" class="better-author-bio-div-text"><?php
echo esc_attr(sprintf(__ngettext('%s %s %d %s', '%s %s %d %s', $author['posts'], $bab_auttxt1, $bab_auttxt2, 'better-author-bio-div'), get_the_author_firstname() . ' ' . get_the_author_lastname(), $bab_auttxt1, $author['posts'], $bab_auttxt2));
?>
.</p>
<?php
} else {
echo "<br />";
}
?>
<?php
if ($bab_showautbio == 'y') {
?>
<p style="margin:0 0 0 90px; padding:0;" class="better-author-bio-div-meta"><?php
echo get_the_author_meta('description');
?>
</p>
<?php
} else {
echo "<br />";
}
?>
<ul style="overflow:hidden; margin:0 0 0 90px; padding:0;" >
<li style="list-style-type:none; float:left; margin:8px 6px 0 0; padding:0 0 0 6px; line-height:120%; border-left:1px solid #ccc;" class="first" ><a href="<?php
echo get_author_posts_url(get_the_author_meta('ID'));
?>
">
<?php
printf(__('View all posts by %s <span class="meta-nav">→</span>'), get_the_author());
?>
</a></li>
<li style="list-style-type:none; float:left; margin:8px 6px 0 0; padding:0 0 0 6px; line-height:120%; border-left:1px solid #ccc;" class="first" ><a href="<?php
echo get_the_author_meta('url');
?>
" title="<?php
echo esc_attr(sprintf(__('Read %s’s blog', 'better-author-bio-div'), $author['name']));
?>
"><?php
echo __("Blog");
?>
</a></li>
<?php
if (!empty($author['twitter'])) {
?>
<li style="list-style-type:none; float:left; margin:8px 6px 0 0; padding:0 0 0 6px; line-height:120%; border-left:1px solid #ccc;" class="first" ><a href="<?php
echo $author['twitter'];
?>
" title="<?php
echo esc_attr(sprintf(__('Follow %s on Twitter', 'better-author-bio-div'), $author['name']));
?>
" rel="external">Twitter</a></li>
<?php
}
?>
<?php
if (!empty($author['facebook'])) {
?>
<li style="list-style-type:none; float:left; margin:8px 6px 0 0; padding:0 0 0 6px; line-height:120%; border-left:1px solid #ccc;" class="first" ><a href="<?php
echo $author['facebook'];
?>
" title="<?php
echo esc_attr(sprintf(__('Be %s’s friend on Facebook', 'better-author-bio-div'), $author['name']));
?>
" rel="external">Facebook</a></li><?php
//.........这里部分代码省略.........
开发者ID:mkrdip,项目名称:better-author-bio,代码行数:101,代码来源:bab_manu.php
示例13: get_page_subheading
/**
* Returns page subheading
*
* @since 3.0.0
*/
private function get_page_subheading()
{
// Subheading is NULL by default
$subheading = NULL;
// Posts & Pages
if ($meta = get_post_meta($this->post_id, 'wpex_post_subheading', true)) {
$subheading = $meta;
} elseif (is_search()) {
$subheading = __('You searched for:', 'wpex') . ' "' . esc_html(get_search_query(false)) . '"';
} elseif (is_category()) {
if ('under_title' == wpex_get_mod('category_description_position', 'under_title')) {
$subheading = term_description();
}
} elseif (is_author()) {
$subheading = __('This author has written', 'wpex') . ' ' . get_the_author_posts() . ' ' . __('articles', 'wpex');
} elseif (is_tax() && !wpex_has_term_description_above_loop()) {
$subheading = term_description();
}
// Apply filters and return
return apply_filters('wpex_post_subheading', $subheading);
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:26,代码来源:global-object.php
示例14: pixopoint_the_author_posts_shortcode
/**
* [the_author_posts] shortcode
* @since 0.1
*/
function pixopoint_the_author_posts_shortcode()
{
return get_the_author_posts();
}
开发者ID:pemiu01,项目名称:wppaintbrush,代码行数:8,代码来源:shortcodes.php
示例15: the_author_link
?>
: <?php
the_author_link();
?>
</h3>
<p><?php
echo get_the_author_meta('description');
?>
</p>
</div>
<?php
if (get_the_author_meta('facebook') != '' | get_the_author_meta('twitter') != '' | get_the_author_meta('googleplus') != '' | get_the_author_meta('instagram') != '' | get_the_author_meta('rss') != '') {
?>
<div class="social01">
<?php
if (get_the_author_posts() > 1) {
?>
<p class="articles"><?php
esc_attr_e('More articles', 'converio');
?>
<?php
esc_attr_e('by', 'converio');
?>
<?php
the_author_posts_link();
?>
</p>
<?php
}
?>
<p><?php
开发者ID:javalidigital,项目名称:tecnigrav,代码行数:31,代码来源:single.php
示例16: get_avatar
<?php
echo get_avatar(get_the_author_meta('user_email'), 120);
?>
<h2><?php
the_author();
?>
</h2>
<p><?php
echo get_the_author_meta('description');
?>
</p>
<?php
workspace_author_links();
?>
<span class="meta"><?php
printf(_n('1 post', '%s posts', get_the_author_posts()), get_the_author_posts());
?>
</span>
<div class="clear"></div>
</section>
<?php
}
?>
<article>
<div class="thumb">
<a href="<?php
the_permalink();
?>
">
<?php
开发者ID:WorkspaceBlogBr,项目名称:wordpress-theme,代码行数:31,代码来源:author.php
示例17: sprintf
"><?php
echo $auth->user_url;
?>
</a>
<?php
}
?>
</div>
<div class="content">
<?php
echo $auth->description;
?>
</div>
<span class="posts">
<?php
echo sprintf(__('%d posts', 'trendy'), get_the_author_posts());
?>
<br/>
<i class="icon-angle-down"></i>
</span>
</div>
</div>
<div class="col-sm-8">
<div class="left-container text-editor">
<?php
global $query_string;
echo '<span class="query_parameters" data-parameters="' . $query_string . '" style="display: none"></span>';
while (have_posts()) {
the_post();
global $post;
开发者ID:jkipker,项目名称:thepirateandtheprincess,代码行数:31,代码来源:author.php
示例18: autor
<article class="item title-template">
<h1>
El archivo <em>author.php</em> es el archivo que toma por defecto WordPress para mostrar la página de perfil del autor (usuario) actual.
</h1>
</article>
';
$template_author = '
<ul class="item author-info">
<li>Autor: <b>%s</b></li>
<li>ID Autor: <b>%s</b></li>
<li>Correo: <b>%s</b></li>
<li>Login: <b>%s</b></li>
<li>Password: <b>%s</b></li>
<li>Nicename: <b>%s</b></li>
<li>URL Autor: <b>%s</b></li>
<li>URL Página Autor: <b>%s</b></li>
<li>Fecha y Hora de Registro: <b>%s</b></li>
<li>Rol: <b>%s</b></li
<li>Nombre para mostrar: <b>%s</b></li>
<li>Alias: <b>%s</b></li>
<li>Nombre: <b>%s</b></li>
<li>Apellido: <b>%s</b></li>
<li>Descripción: <b>%s</b></li>
<li>Número de Publicaciones: <b>%s</b></li>
<li>Avatar: %s</li>
</ul>
';
printf($template_author, get_the_author(), get_the_author_id(), get_the_author_meta('user_email'), get_the_author_meta('user_login'), get_the_author_meta('user_pass'), get_the_author_meta('user_nicename'), get_the_author_meta('user_url'), get_author_posts_url(get_the_author_id()), get_the_author_meta('user_registered'), get_the_author_meta('roles')[0], get_the_author_meta('display_name'), get_the_author_meta('nickname'), get_the_author_meta('first_name'), get_the_author_meta('last_name'), get_the_author_meta('description'), get_the_author_posts(), get_avatar(get_the_author_id(), 50));
get_template_part('content');
get_sidebar();
get_footer();
开发者ID:jonmircha,项目名称:iconos29,代码行数:31,代码来源:author.php
示例19: the_post_thumbnail
<div class="feat-image">
<?php
the_post_thumbnail('medium');
?>
</div>
<div class="category-excerpt">
<a href="<?php
the_permalink();
?>
"><h1 class="entry-title"><?php
the_title();
?>
</h1></a>
<span>By
<?php
if (get_the_author_posts() == 1) {
the_author();
?>
. <?php
the_tags();
?>
</span>
<?php
} else {
the_author_posts_link();
?>
. <?php
the_tags();
?>
</span>
<?php
开发者ID:aliaspseudonym,项目名称:mantra-child,代码行数:31,代码来源:tag.php
示例20: wpi_widget_author_summary
function wpi_widget_author_summary()
{
global $authordata;
if (!is_object($authordata)) {
return;
}
$name = 'author-data';
$title = 'Author details';
wpi_widget_start($title, $name);
$name = convert_chars($authordata->display_name);
$url = $authordata->user_url != 'http://' ? $authordata->user_url : BLOGURL;
$im = array();
if (isset($authordata->aim) && !empty($authordata->aim)) {
$attribs = array('title' => __('AOL Instant Messenger'), 'href' => 'aim:goim?screenname=' . $authordata->aim);
$im['AIM'] = _t('a', $authordata->aim, $attribs) . ' ' . _t('a', 'profile', array('href' => 'http://profiles.aim.com/' . $authordata->aim));
}
if (isset($authordata->jabber) && !empty($authordata->jabber)) {
$im['jabber'] = _t('a', $authordata->jabber, array('title' => __('eXtensible Messaging Jabber Client'), 'href' => 'xmpp:' . antispambot($authordata->jabber)));
}
if (isset($authordata->yim) && !empty($authordata->yim)) {
$im['Yim'] = _t('a', $authordata->yim, array('title' => __('Yahoo Instant Messenger'), 'href' => 'ymsgr:sendIM?' . $authordata->yim));
}
?>
<div class="author-content">
<ul class="xoxo r cf">
<li><span>Name: </span> <?php
t('strong', $name);
?>
</li>
<li><span>Website: </span> <?php
t('a', $url, array('href' => $url, 'rel' => 'me'));
?>
</li>
<li><span>Articles: </span> <?php
echo get_the_author_posts();
?>
</li>
<?php
if (has_count($im)) {
foreach ($im as $k => $v) {
t('li', $k . ': ' . $v);
}
}
?>
</ul>
</div>
<?php
wpi_widget_end();
}
开发者ID:Creativebq,项目名称:wp-istalker,代码行数:49,代码来源:widgets.php
注:本文中的get_the_author_posts函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论