本文整理汇总了PHP中get_the_author_email函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_author_email函数的具体用法?PHP get_the_author_email怎么用?PHP get_the_author_email使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_the_author_email函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: hook_after_post_content
public function hook_after_post_content($content)
{
if (is_single()) {
$content .= '
<div class="focuswarp">
<div class="focusavatar">
' . get_avatar(get_the_author_email(), '80') . '
</div>
<div class="focustext">
<h4>Author: <span>' . get_the_author_link('display_name', get_query_var('author')) . '</span></h4>' . get_the_author_meta('description', get_query_var('author')) . '
</div>';
$content .= '
<div class="focus-social">
';
if (get_the_author_meta('twitter', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('twitter')) . '" target="_blank"><i class="fa fa-twitter fa-lg"></i> Twitter</a> ';
}
if (get_the_author_meta('facebook', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('facebook')) . '" target="_blank"><i class="fa fa-facebook fa-lg"></i> Facebook</a> ';
}
if (get_the_author_meta('gplus', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('gplus')) . '" target="_blank"><i class="fa fa-google-plus fa-lg"></i> Google+</a> ';
}
if (get_the_author_meta('linkedin', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('linkedin')) . '" target="_blank"><i class="fa fa-linkedin fa-lg"></i> Linkedin</a> ';
}
if (get_the_author_meta('dribbble', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('dribbble')) . '" target="_blank"><i class="fa fa-dribbble fa-lg"></i> Dribbble</a> ';
}
if (get_the_author_meta('github', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('github')) . '" target="_blank"><i class="fa fa-github fa-lg"></i> Github</a>';
}
if (get_the_author_meta('youtube', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('youtube')) . '" target="_blank"><i class="fa fa-youtube fa-lg"></i> Youtube</a>';
}
if (get_the_author_meta('pinterest', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('pinterest')) . '" target="_blank"><i class="fa fa-pinterest-square fa-lg"></i> Pinterest</a>';
}
if (get_the_author_meta('instagram', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('instagram')) . '" target="_blank"><i class="fa fa-instagram fa-lg"></i> Instagram</a>';
}
if (get_the_author_meta('vimeo', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('vimeo')) . '" target="_blank"><i class="fa fa-vimeo-square fa-lg"></i> vimeo</a>';
}
if (get_the_author_meta('skype', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('skype')) . '" target="_blank"><i class="fa fa-skype fa-lg"></i> Skype</a>';
}
$content .= '
</div>
</div>';
}
return $content;
}
开发者ID:TanvirAmi,项目名称:Focus-Author-Bio,代码行数:53,代码来源:focus_author_hook.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_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
示例3: custom_comments
function custom_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
global $commentcount;
if (!$commentcount) {
$commentcount = 0;
}
?>
<li class="comment <?php
if ($comment->comment_author_email == get_the_author_email()) {
echo 'admincomment';
} else {
echo 'regularcomment';
}
?>
" id="comment-<?php
comment_ID();
?>
">
<div class="author">
<div class="pic">
<?php
if (function_exists('get_avatar') && get_option('show_avatars')) {
echo get_avatar($comment, 32);
}
?>
</div>
<div class="name">
<?php
if (get_comment_author_url()) {
?>
<a id="commentauthor-<?php
comment_ID();
?>
" class="url" href="<?php
comment_author_url();
?>
" rel="external nofollow">
<?php
} else {
?>
<span id="commentauthor-<?php
comment_ID();
?>
">
<?php
}
?>
<?php
comment_author();
?>
<?php
if (get_comment_author_url()) {
?>
</a>
<?php
} else {
?>
</span>
<?php
}
?>
</div>
</div>
<div class="info">
<div class="date">
<?php
printf(__('%1$s at %2$s', 'inove'), get_comment_time(__('F jS, Y', 'inove')), get_comment_time(__('H:i', 'inove')));
?>
| <a href="#comment-<?php
comment_ID();
?>
"><?php
printf('#%1$s', ++$commentcount);
?>
</a>
</div>
<div class="act">
<a href="javascript:void(0);" onclick="MGJS_CMT.reply('commentauthor-<?php
comment_ID();
?>
', 'comment-<?php
comment_ID();
?>
', 'comment');"><?php
_e('Reply', 'inove');
?>
</a> |
<a href="javascript:void(0);" onclick="MGJS_CMT.quote('commentauthor-<?php
comment_ID();
?>
', 'comment-<?php
comment_ID();
?>
', 'commentbody-<?php
comment_ID();
?>
//.........这里部分代码省略.........
开发者ID:probonogeek,项目名称:inove-probonogeek,代码行数:101,代码来源:functions.php
示例4: the_ID
the_ID();
?>
">
<tr><!-- Author Avatar -->
<td class="avatar">
<a href="<?php
echo get_author_posts_url(get_the_author_id());
?>
" title="<?php
the_author();
?>
" alt="<?php
the_author();
?>
"><?php
echo get_avatar(get_the_author_email(), '50');
?>
</a>
</td>
<td class="posted">
<div class="author"><!-- Author name --><?php
the_author_posts_link();
?>
</div>
<table cellpadding="0" cellspacing="0" class="celarboth">
<tr>
<!-- Post Thumb image-->
<td class="thumb">
<a href="<?php
开发者ID:andreuortin,项目名称:Facebook-Like,代码行数:31,代码来源:archive.php
示例5: 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
示例6: the_ID
the_ID();
?>
">
<h2><a href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
">
<?php
the_title();
?>
</a></h2>
<div class="meta"><?php
echo get_avatar(get_the_author_email(), 40);
?>
<p><?php
the_author();
?>
[<?php
the_category(',');
?>
]</p><p><?php
the_time('Y.m.d');
?>
</p></div>
<div class="entry">
<?php
the_excerpt();
?>
开发者ID:Burick,项目名称:interjc,代码行数:31,代码来源:search.php
示例7: shortcode_the_author_email
/**
* Shortcode function for displaying the current post author email
* Uses the get_the_author_email() function
* @link http://codex.wordpress.org/Template_Tags/the_author_email
*
* @since 0.1
*/
function shortcode_the_author_email()
{
return apply_filters('the_author_email', antispambot(get_the_author_email()));
}
开发者ID:jfitzsimmons,项目名称:soundtrackforspace,代码行数:11,代码来源:template-tag-shortcodes.php
示例8: the_author_email
/**
* Display the email of the author of the current post.
*
* @link http://codex.wordpress.org/Template_Tags/the_author_email
* @since 0.71
* @uses get_the_author_email()
*/
function the_author_email()
{
echo apply_filters('the_author_email', get_the_author_email());
}
开发者ID:schr,项目名称:wordpress,代码行数:11,代码来源:author-template.php
示例9: custom_comments
function custom_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
global $commentcount;
if (!$commentcount) {
$commentcount = 0;
}
?>
<li id="comment-<?php
comment_ID();
?>
" class="comment<?php
if ($comment->comment_type == 'pingback' || $comment->comment_type == 'trackback') {
echo ' pingcomment';
} else {
if ($comment->comment_author_email == get_the_author_email()) {
echo ' admincomment';
} else {
echo ' regularcomment';
}
}
?>
">
<div class="info<?php
if ($comment->comment_type == 'pingback' || $comment->comment_type == 'trackback') {
echo ' pinginfo';
} else {
if ($comment->comment_author_email == get_the_author_email()) {
echo ' admininfo';
} else {
echo ' regularinfo';
}
}
?>
">
<?php
if ($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') {
// Support avatar for WordPress 2.5 or higher
if (function_exists('get_avatar') && get_option('show_avatars')) {
echo '<div class="pic">';
echo get_avatar($comment, 24);
echo '</div>';
// Support Gravatar for WordPress 2.3.3 or lower
} else {
if (function_exists('gravatar')) {
echo '<div class="pic"><img class="avatar" src="';
gravatar("G", 24);
echo '" alt="avatar" /></div>';
}
}
}
?>
<div class="author">
<?php
if (get_comment_author_url()) {
?>
<a class="authorname" id="commentauthor-<?php
comment_ID();
?>
" href="<?php
comment_author_url();
?>
" rel="external nofollow">
<?php
} else {
?>
<span class="authorname" id="commentauthor-<?php
comment_ID();
?>
">
<?php
}
?>
<?php
comment_author();
?>
<?php
if (get_comment_author_url()) {
?>
</a>
<?php
} else {
?>
</span>
<?php
}
?>
<div class="date"><?php
printf(__('%1$s at %2$s', 'blocks2'), get_comment_time(__('M jS, Y', 'blocks2')), get_comment_time(__('H:i', 'blocks2')));
?>
</div>
</div>
<div class="count">
<?php
if ($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') {
?>
<?php
//.........这里部分代码省略.........
开发者ID:jkreska,项目名称:test1,代码行数:101,代码来源:functions.php
示例10: the_permalink
">
<h2><a href="<?php
the_permalink();
?>
" rel="bookmark" title="Permanent Link to <?php
the_title();
?>
"><?php
the_title();
?>
</a></h2>
<p class="post-info"><?php
the_time('l j \\d\\e F \\d\\e Y');
?>
por <a href="mailto:<?php
echo get_the_author_email();
?>
"><?php
the_author_firstname();
?>
<?php
the_author_lastname();
?>
</a></p>
<p class="postmetadata"><?php
the_tags('<span class="tags">Etiquetas: ', ', ', '</span><br />');
?>
Guardado en <?php
the_category(', ');
开发者ID:alx,项目名称:blogsfera,代码行数:31,代码来源:search.php
示例11: author_microid
function author_microid()
{
$hash = get_microid_hash(get_the_author_email(), get_the_author_url());
echo 'microid-' . $hash;
}
开发者ID:Creativebq,项目名称:wp-istalker,代码行数:5,代码来源:formatting.php
示例12: custom_comments
function custom_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
global $commentcount;
if (!$commentcount) {
$commentcount = 0;
}
?>
<li class="comment <?php
if ($comment->comment_author_email == get_the_author_email()) {
echo 'admincomment';
} else {
echo 'regularcomment';
}
?>
" id="comment-<?php
comment_ID();
?>
">
<div class="author">
<div class="pic">
<?php
echo get_avatar($comment, 32);
?>
</div>
<div class="name">
<?php
if (get_comment_author_url()) {
?>
<a id="commentauthor-<?php
comment_ID();
?>
" class="url" href="<?php
comment_author_url();
?>
" rel="external nofollow"><?php
comment_author();
?>
</a>
<?php
} else {
?>
<span id="commentauthor-<?php
comment_ID();
?>
"><?php
comment_author();
?>
</span>
<?php
}
?>
</div>
</div>
<div class="info">
<div class="date">
<?php
printf(__('%1$s at %2$s', 'inove'), get_comment_time(get_option('date_format')), get_comment_time(get_option('time_format')));
?>
| <a href="#comment-<?php
comment_ID();
?>
"><?php
printf('#%1$s', ++$commentcount);
?>
</a>
</div>
<div class="act">
<?php
echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'after' => ' | '));
?>
<a href="javascript:void(0);" onclick="MGJS_CMT.quote('commentauthor-<?php
comment_ID();
?>
', 'comment-<?php
comment_ID();
?>
', 'commentbody-<?php
comment_ID();
?>
', 'comment');"><?php
_e('Quote', 'inove');
?>
</a>
<?php
edit_comment_link(__('Edit', 'inove'), ' | ', '');
?>
</div>
<div class="fixed"></div>
<div class="content">
<?php
if ($comment->comment_approved == '0') {
?>
<p><small><?php
_e('Your comment is awaiting moderation.', 'inove');
?>
</small></p>
<?php
}
//.........这里部分代码省略.........
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:101,代码来源:functions.php
示例13: the_author_posts_link_with_avatar
function the_author_posts_link_with_avatar($deprecated = '')
{
global $authordata;
printf('<a href="%1$s" title="%2$s">%3$s</a>', get_author_posts_url($authordata->ID, $authordata->user_nicename), sprintf(__('Posts by %s'), attribute_escape(get_the_author())), get_avatar(get_the_author_email(), 32));
}
开发者ID:liangwei1988,项目名称:wordpress,代码行数:5,代码来源:functions.php
示例14: have_posts
echo '<a itemprop="breadcrumb" href="'.get_category_link($cat->term_id).'" >'.$cat->name.'</a>';
}
?><span class="chevron"> › </span>
<span class="current">正文</span>
</div>
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php //post_class(); ?> class="article-single" >
<div class="article-single-box">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title" itemprop="name headline">', '</h1>' ); ?>
<div class="auther-gravater-single">
<?php echo get_avatar( get_the_author_email(), '48'); ?>
</div>
<div class="post-meta-top">
<span class="post-auther"><?php the_author_posts_link(); ?></span>
<span class="updated postime" title="写于写于<?php the_time('Y年m月d日') ?> <?php the_time() ?>"><?php post_time_ago(); ?></span>
<span class="post"><?php post_views(' ','次点击'); ?> </span>
</div>
</header>
<div class="post-entry post-content">
<p class="conetent-string">
<?php the_content( '阅读全文 <span class="meta-nav">→</span>');
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
开发者ID:alongbao,项目名称:M-V2EX,代码行数:31,代码来源:single.php
示例15: where_author_comments
function where_author_comments()
{
$author_email = get_the_author_email();
return "'{$author_email}' != comment_author_email";
}
开发者ID:emelleme,项目名称:Drexel-Cab,代码行数:5,代码来源:common_functions.php
示例16: write_comment
function write_comment(&$c, $deep_id = -1, $color = true)
{
global $max_level;
$comments_reply = $GLOBALS['comments_reply'];
if ($c->comment_author_email == get_the_author_email()) {
$style = ' class="mine"';
} else {
if ($color == true) {
$style = ' class="borderc1"';
$color = !$color;
} else {
$style = ' class="borderc2"';
$color = !$color;
}
}
?>
<li id="comment-<?php
echo $c->comment_ID;
?>
" <?php
echo $style;
?>
><div class="commenthead">At <?php
echo mysql2date('Y.m.d H:i', $c->comment_date);
?>
, <a name='comment-<?php
echo $c->comment_ID;
?>
'></a><span><?php
echo get_comment_author_link();
?>
</span> said: </div>
<div class="body">
<?php
comment_text();
?>
</div>
<div class="meta">
<?php
global $user_ID, $post;
get_currentuserinfo();
if (user_can_edit_post_comments($user_ID, $c->comment_post_ID) || $GLOBALS['cmtDepth'] < $max_level) {
echo '[';
}
// delete link
if (user_can_edit_post_comments($user_ID, $c->comment_post_ID)) {
$deleteurl = get_bloginfo("siteurl") . '/wp-admin/comment.php?action=deletecomment&p=' . $c->comment_post_ID . '&c=' . $c->comment_ID;
$deleteurl = wp_nonce_url($deleteurl, 'delete-comment_' . $c->comment_ID);
echo "<a href='{$deleteurl}' onclick='ajaxShowPost(\"{$deleteurl}\", \"comment-{$c->comment_ID}\", \"\", \"alert(\\\"comment is deleted\\\")\", \"delete\");return false;'>delete</a>|";
$spamurl = get_bloginfo("siteurl") . '/wp-admin/comment.php?action=deletecomment&dt=spam&p=' . $c->comment_post_ID . '&c=' . $c->comment_ID;
$spamurl = wp_nonce_url($spamurl, 'delete-comment_' . $c->comment_ID);
echo "<a href='{$spamurl}' onclick='ajaxShowPost(\"{$spamurl}\", \"comment-{$c->comment_ID}\", \"\", \"alert(\\\"comment is spamed\\\")\", \"delete\");return false;'>spam</a>|";
edit_comment_link('Edit', '', $GLOBALS['cmtDepth'] < $max_level ? '|' : '');
}
if ($GLOBALS['cmtDepth'] < $max_level) {
if (get_option("comment_registration") && !$user_ID) {
echo '<a href="' . get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() . '">Log in to Reply</a> ]';
} else {
echo '<a href="javascript:moveForm(' . $c->comment_ID . ')" title="reply">Reply</a>';
}
}
if (user_can_edit_post_comments($user_ID, $post->ID) || $GLOBALS['cmtDepth'] < $max_level) {
echo ']</div>';
}
if ($comments_reply[$c->comment_ID]) {
$id = $c->comment_ID;
if ($GLOBALS['cmtDepth'] < $max_level) {
echo '<ul>';
}
$first_c = true;
foreach ($comments_reply[$id] as $c) {
if ($first_c) {
$first_c = false;
continue;
}
$GLOBALS['cmtDepth']++;
if ($GLOBALS['cmtDepth'] == $max_level) {
write_comment($c, $c->comment_ID, $color);
} else {
write_comment($c, $deep_id, $color);
}
$GLOBALS['cmtDepth']--;
}
if ($GLOBALS['cmtDepth'] < $max_level) {
echo '</ul>';
}
}
echo '</li>';
}
开发者ID:sontv1003,项目名称:vtcacademy,代码行数:89,代码来源:getcomments.php
示例17: while
<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
the_time("F j, Y");
?>
开发者ID:Br3nda,项目名称:openmicroblogger,代码行数:31,代码来源:tag.php
示例18: bfa_postinfo
function bfa_postinfo($postinfo_string)
{
// one theme option needed below for nofollow trackback / RSS links yes/no
global $bfa_ata, $post;
/* replace date format escape placeholders(#) with the actual escpae
character (=backslashes). This function removes all backslashes from
post info strings to avoid issues with hosts that have magic_quotes_gpc ON.
But we want to keep the backslashes inside date items, because they are
needed to escape literal strings inside dates */
$postinfo_string = str_replace("#", "\\", $postinfo_string);
$postinfo = $postinfo_string;
// Author public name
if (strpos($postinfo_string, '%author%') !== FALSE) {
ob_start();
the_author();
$author = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author%", $author, $postinfo);
}
// Public name of Author who last modified a post, since WordPress 2.8.
// Check first if function is available (= if this is WP 2.8+)
if (function_exists('the_modified_author')) {
if (strpos($postinfo_string, '%modified-author%') !== FALSE) {
ob_start();
the_modified_author();
$modified_author = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%modified-author%", $modified_author, $postinfo);
}
}
// Author about yourself
if (strpos($postinfo_string, '%author-description%') !== FALSE) {
ob_start();
the_author_meta('description');
$author_description = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-description%", $author_description, $postinfo);
}
// Author login name
if (strpos($postinfo_string, '%author-login%') !== FALSE) {
ob_start();
the_author_meta('user_login');
$author_login = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-login%", $author_login, $postinfo);
}
// Author first name
if (strpos($postinfo_string, '%author-firstname%') !== FALSE) {
ob_start();
the_author_meta('first_name');
$author_firstname = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-firstname%", $author_firstname, $postinfo);
}
// Author last name
if (strpos($postinfo_string, '%author-lastname%') !== FALSE) {
ob_start();
the_author_meta('last_name');
$author_lastname = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-lastname%", $author_lastname, $postinfo);
}
// Author nickname
if (strpos($postinfo_string, '%author-nickname%') !== FALSE) {
ob_start();
the_author_meta('nickname');
$author_nickname = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-nickname%", $author_nickname, $postinfo);
}
// Author ID
if (strpos($postinfo_string, '%author-id%') !== FALSE) {
ob_start();
the_author_meta('ID');
$author_ID = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-id%", $author_ID, $postinfo);
}
// Author email address, clear text in HTML source code
if (strpos($postinfo_string, '%author-email-clear%') !== FALSE) {
ob_start();
the_author_meta('email');
$author_email_clear = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-email-clear%", $author_email_clear, $postinfo);
}
// Author email address obfuscated
if (strpos($postinfo_string, '%author-email%') !== FALSE) {
$postinfo = str_replace("%author-email%", antispambot(get_the_author_email()), $postinfo);
}
// Author website URL
if (strpos($postinfo_string, '%author-url%') !== FALSE) {
ob_start();
the_author_meta('url');
$author_url = ob_get_contents();
ob_end_clean();
$postinfo = str_replace("%author-url%", $author_url, $postinfo);
}
// Author website link
if (strpos($postinfo_string, '%author-link%') !== FALSE) {
//.........这里部分代码省略.........
开发者ID:aagivecamp,项目名称:FlintRiver,代码行数:101,代码来源:bfa_postinfo.php
示例19: next_post_link
echo '</span>';
}
?>
<?php
if (get_next_post()) {
echo '<span class="next">';
next_post_link('%link<i class="fa fa-angle-right"></i>');
echo '</span>';
}
?>
</div>
</article>
<div class="post-author box clearfix">
<?php
echo get_avatar(get_the_author_email(), $size = '80', '');
?>
<div class="author-meta">
<p class="name"><?php
the_author();
?>
</p>
<p class="description"><?php
the_author_description();
?>
</p>
</div>
</div>
开发者ID:a3587556,项目名称:quench,代码行数:30,代码来源:single.php
示例20: dw_focus_post_actions
/**
* Display Social Share, Print, Sent Button
*/
function dw_focus_post_actions()
{
$post_id = get_the_ID();
$url = rawurlencode(get_permalink());
$title = rawurlencode(get_the_title());
//Twitter
$twitter_count = dw_get_twitter_count($url);
$facebook_count = dw_get_facebook_count($url);
$linkedin_count = dw_get_linkedin_count($url);
?>
<div class="entry-action">
<!-- Show author name/avatar -->
<span class="author-name"><?php
echo get_avatar(get_the_author_email(), '24');
?>
<?php
the_author();
?>
</span>
<br>
<!-- Show date -->
<?php
$metadata = wp_get_attachment_metadata();
printf(__('<span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span>', 'dw_focus'), esc_attr(get_the_date('c')), esc_html(get_the_date()));
?>
<?php
$tags_list = get_the_tag_list('', __(', ', 'dw_focus'));
if ($tags_list) {
?>
<div class="tag-action">
<span class="title-action"><?php
_e('Tags', 'dw_focus');
?>
</span>
<span class="tags-links">
<?php
printf(__('%1$s', 'dw_focus'), $tags_list);
?>
</span>
</div>
<?php
}
// End if $tags_list
?>
<br>
<div class="social-action" data-nonce="<?php
echo wp_create_nonce('_dw_sharing_count_nonce');
?>
">
<span class="title-action"><?php
_e('Sharing', 'dw_focus');
?>
</span>
<ul>
<li id="twitter-share" class="twitter" data-post-id="<?php
echo $post_id;
?>
" data-nonce="<?php
echo wp_create_nonce('_dw_focus_single_tweet_count_nonce');
?>
"><i class="icon-twitter"></i><a href="https://twitter.com/intent/tweet?url=<?php
echo $url;
?>
&text=<?php
echo $title;
?>
"><?php
_e('Twitter', 'dw_focus');
?>
</a><span class="digit digit-twitter"><?php
echo $twitter_count;
?>
</span></li>
<li class="facebook"><i class="icon-facebook-sign"></i><a href="https://www.facebook.com/sharer/sharer.php?u=<?php
echo $url;
?>
&t=<?php
echo $title;
?>
" ><?php
_e('Facebook', 'dw_focus');
?>
</a><span class="digit digit-facebook"><?php
echo $facebook_count;
?>
</span></li>
<li class="google"><i class="icon-google-plus-sign"></i><a href="https://plus.google.com/share?url=<?php
echo $url;
?>
" ><?php
_e('Google +', 'dw_focus');
?>
</a><span>0</span></li>
<li class="linkedin"><i class="icon-linkedin-sign"></i><a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php
//.........这里部分代码省略.........
开发者ID:aromis,项目名称:dw-focus,代码行数:101,代码来源:functions.php
注:本文中的get_the_author_email函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论