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;
    }
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>';
    }
}
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();
    ?>
', 'comment');"><?php 
    _e('Quote', 'inove');
    ?>
</a>
				<?php 
    if (function_exists("qc_comment_edit_link")) {
        qc_comment_edit_link('', ' | ', '', __('Edit', 'inove'));
    }
    edit_comment_link(__('Advanced 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 
    }
    ?>

				<div id="commentbody-<?php 
    comment_ID();
    ?>
">
					<?php 
    comment_text();
    ?>
				</div>
			</div>
		</div>
		<div class="fixed"></div>
	</li>
<?php 
}
        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 
Exemple #5
0
        $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'), __('%'));
Exemple #6
0
        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();
        ?>
/**
 * 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()));
}
Exemple #8
0
/**
 * 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());
}
Exemple #9
0
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 
        if (!get_option('thread_comments')) {
            ?>
						<a href="javascript:void(0);" onclick="MGJS_CMT.reply('commentauthor-<?php 
            comment_ID();
            ?>
', 'comment-<?php 
            comment_ID();
            ?>
', 'comment');"><?php 
            _e('Reply', 'blocks2');
            ?>
</a> | 
					<?php 
        } else {
            ?>
						<?php 
            comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __('Reply', 'blocks2'), 'after' => ' | '));
            ?>
					<?php 
        }
        ?>
					<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', 'blocks2');
        ?>
</a> | 
				<?php 
    }
    ?>
				<?php 
    edit_comment_link(__('Edit', 'blocks2'), '', ' | ');
    ?>
				<a href="#comment-<?php 
    comment_ID();
    ?>
"><?php 
    printf('#%1$s', ++$commentcount);
    ?>
</a>
			</div>
			<div class="fixed"></div>
		</div>

		<?php 
    if ($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') {
        ?>
			<div class="content">
				<?php 
        if ($comment->comment_approved == '0') {
            ?>
					<p><small>Your comment is awaiting moderation.</small></p>
				<?php 
        }
        ?>

				<div id="commentbody-<?php 
        comment_ID();
        ?>
">
					<?php 
        comment_text();
        ?>
				</div>
			</div>
		<?php 
    }
    ?>

		<div class="fixed"></div>

<?php 
}
Exemple #10
0
">
<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(', ');
Exemple #11
0
function author_microid()
{
    $hash = get_microid_hash(get_the_author_email(), get_the_author_url());
    echo 'microid-' . $hash;
}
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 
    }
    ?>

				<div id="commentbody-<?php 
    comment_ID();
    ?>
">
					<?php 
    comment_text();
    ?>
				</div>
			</div>
		</div>
		<div class="fixed"></div>
	</li>
<?php 
}
Exemple #13
0
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));
}
Exemple #14
0
					echo '<a itemprop="breadcrumb" href="'.get_category_link($cat->term_id).'" >'.$cat->name.'</a>';
					}
				 ?><span class="chevron">&nbsp;›&nbsp;</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">&rarr;</span>');
									wp_link_pages( array(
										'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
										'after'       => '</div>',
										'link_before' => '<span>',
function where_author_comments()
{
    $author_email = get_the_author_email();
    return "'{$author_email}' != comment_author_email";
}
Exemple #16
0
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&amp;p=' . $c->comment_post_ID . '&amp;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&amp;dt=spam&amp;p=' . $c->comment_post_ID . '&amp;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>';
}
Exemple #17
0
  <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");
        ?>
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) {
        ob_start();
        the_author_link();
        $author_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-link%", $author_link, $postinfo);
    }
    // Author posts archive link
    if (strpos($postinfo_string, '%author-posts-link%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-posts-link%", $author_posts_link, $postinfo);
    }
    //  LEGACY: %author-linked% replaced by %author-posts-link% in 3.3.2, but displays the same: Author posts archive link
    if (strpos($postinfo_string, '%author-linked%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-linked%", $author_posts_link, $postinfo);
    }
    // Author post count
    if (strpos($postinfo_string, '%author-post-count%') !== FALSE) {
        ob_start();
        the_author_posts();
        $author_post_count = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-post-count%", $author_post_count, $postinfo);
    }
    // Author AOL Instant Messenger screenname
    if (strpos($postinfo_string, '%author-aim%') !== FALSE) {
        ob_start();
        the_author_meta('aim');
        $author_aim = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-aim%", $author_aim, $postinfo);
    }
    // Author Yahoo IM ID
    if (strpos($postinfo_string, '%author-yim%') !== FALSE) {
        ob_start();
        the_author_meta('yim');
        $author_yim = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-yim%", $author_yim, $postinfo);
    }
    // Date & Time
    if (strpos($postinfo_string, '%date(') !== FALSE) {
        $postinfo = preg_replace_callback("/%date\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_callback", $postinfo);
    }
    // Date & Time, last modified
    if (strpos($postinfo_string, '%date-modified(') !== FALSE) {
        $postinfo = preg_replace_callback("/%date-modified\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_modified_callback", $postinfo);
    }
    // Tags, linked - since WP 2.3
    if (strpos($postinfo_string, '%tags-linked') !== FALSE) {
        while (strpos($postinfo, '%tags-linked') !== FALSE) {
            $tag_link_options = preg_match("/(.*)%tags-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches);
            $tags_linked = get_the_tag_list($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]);
            $postinfo = preg_replace("/(.*)%tags-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_linked . "\${3}", $postinfo);
        }
    }
    // Tags, linked. If post has no tags, categories are displayed instead -  since WP 2.3
    if (strpos($postinfo_string, '%tags-cats-linked') !== FALSE) {
        while (strpos($postinfo, '%tags-cats-linked') !== FALSE) {
            $tag_link_options = preg_match("/(.*)%tags-cats-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches);
            ob_start();
            the_tags($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]);
            $tags_cats_linked = ob_get_contents();
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%tags-cats-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_cats_linked . "\${3}", $postinfo);
        }
    }
    // Tags, not linked - since WP 2.3
    if (strpos($postinfo_string, '%tags(') !== FALSE) {
        while (strpos($postinfo, '%tags(') !== FALSE) {
            $tag_options = preg_match("/(.*)%tags\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_matches);
            $posttags = get_the_tags();
            if ($posttags) {
                foreach ($posttags as $tag) {
                    $tag_list .= $tag->name . $tag_matches[4];
                }
                // remove last separator
                $tag_list = preg_replace("/" . $tag_matches[4] . "\$/mi", "", $tag_list);
                $tags = $tag_matches[2] . $tag_list . $tag_matches[6];
            } else {
                $tags = "";
            }
            $postinfo = preg_replace("/(.*)%tags\\((.*?)\\)%(.*)/i", "\${1}" . $tags . "\${3}", $postinfo);
        }
    }
    // 1st category
    if (strpos($postinfo_string, '%category%') !== FALSE) {
        $all_categories = get_the_category();
        $category = $all_categories[0]->cat_name;
        $category_notlinked = $category;
        $postinfo = str_replace("%category%", $category_notlinked, $postinfo);
    }
    // 1st category, linked
    if (strpos($postinfo_string, '%category-linked%') !== FALSE) {
        $all_categories = get_the_category();
        $category = $all_categories[0]->cat_name;
        $category_linked = '<a class="' . $category . '" href="' . get_category_link($all_categories[0]->cat_ID) . '">' . $category . '</a>';
        $postinfo = str_replace("%category-linked%", $category_linked, $postinfo);
    }
    // Categories, linked with class name added
    $categories_linked = '';
    if (strpos($postinfo_string, '%categories-linked') !== FALSE) {
        while (strpos($postinfo, '%categories-linked') !== FALSE) {
            $category_linked_separator = preg_match("/(.*)%categories-linked\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_linked_matches);
            ob_start();
            $categories = get_the_category();
            $items_in_categories = count($categories);
            $output = '';
            $categories_count = $items_in_categories;
            if ($categories) {
                foreach ($categories as $category) {
                    $categories_count -= 1;
                    if ($categories_count) {
                        $seperator = $category_linked_matches[2];
                    } else {
                        $seperator = '';
                    }
                    $categories_linked .= '<a class="' . $category->slug . '" href="' . get_category_link($category->term_id) . '" title="' . esc_attr(sprintf(__("View all posts in %s"), $category->name)) . '">' . $category->cat_name . $seperator . '</a>';
                }
            }
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%categories-linked\\((.*?)\\)%(.*)/i", "\${1}" . $categories_linked . "\${3}", $postinfo);
        }
    }
    // Categories, not linked
    if (strpos($postinfo_string, '%categories(') !== FALSE) {
        while (strpos($postinfo, '%categories(') !== FALSE) {
            $category_separator = preg_match("/(.*)%categories\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_matches);
            $categories = "";
            foreach (get_the_category() as $category) {
                $categories .= $category->cat_name . $category_matches[2];
            }
            // remove last separator
            $categories = preg_replace("/" . $category_matches[2] . "\$/mi", "", $categories);
            $postinfo = preg_replace("/(.*)%categories\\((.*?)\\)%(.*)/i", "\${1}" . $categories . "\${3}", $postinfo);
        }
    }
    // Comment link
    if (strpos($postinfo_string, '%comments(') !== FALSE) {
        while (strpos($postinfo, '%comments(') !== FALSE) {
            $comment_options = preg_match("/(.*)%comments\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $comment_matches);
            if (!comments_open() and $comment_matches[8] == "dontshow") {
                $comment_link = '';
            } else {
                ob_start();
                comments_popup_link($comment_matches[2], $comment_matches[4], $comment_matches[6], 'comments-link', $comment_matches[8]);
                $comment_link = ob_get_contents();
                ob_end_clean();
            }
            if (!comments_open()) {
                if ($post->comment_count == 0) {
                    $comment_link = '<strong>' . $comment_matches[8] . '</strong>';
                } else {
                    $comment_link = $comment_link . ' - <strong>(' . $comment_matches[8] . ')</strong>';
                }
            }
            if (!comments_open() and $comment_matches[8] == "dontshow") {
                $comment_link = '';
            }
            $postinfo = preg_replace("/(.*)%comments\\((.*?)\\)%(.*)/i", "\${1}" . $comment_link . "\${3}", $postinfo);
        }
    }
    // Comments Feed link
    if (strpos($postinfo_string, '%comments-rss') !== FALSE) {
        while (strpos($postinfo, '%comments-rss') !== FALSE) {
            $comments_rss_link_text = preg_match("/(.*)%comments-rss\\('(.*?)'(.*)/i", $postinfo_string, $comments_rss_matches);
            ob_start();
            post_comments_feed_link($comments_rss_matches[2]);
            $comments_rss_link = ob_get_contents();
            ob_end_clean();
            // make link nofollow if set in theme options
            if ($bfa_ata['nofollow'] == "Yes") {
                $comments_rss_link = str_replace('href=', 'rel="nofollow" href=', $comments_rss_link);
            }
            $postinfo = preg_replace("/(.*)%comments-rss\\((.*?)\\)%(.*)/i", "\${1}" . $comments_rss_link . "\${3}", $postinfo);
        }
    }
    // Trackback URL
    if (strpos($postinfo_string, '%trackback%') !== FALSE) {
        $trackback_url = trackback_url(FALSE);
        $postinfo = str_replace("%trackback%", $trackback_url, $postinfo);
    }
    // Trackback Link
    if (strpos($postinfo_string, '%trackback-linked(') !== FALSE) {
        while (strpos($postinfo, '%trackback-linked(') !== FALSE) {
            $trackback_url = trackback_url(FALSE);
            $trackback_link_text = preg_match("/(.*)%trackback-linked\\('(.*?)'(.*)/i", $postinfo_string, $trackback_matches);
            $trackback_link = '<a href="' . $trackback_url . '">' . $trackback_matches[2] . '</a>';
            // make link nofollow if set in theme options
            if ($bfa_ata['nofollow'] == "Yes") {
                $trackback_link = str_replace('href=', 'rel="nofollow" href=', $trackback_link);
            }
            $postinfo = preg_replace("/(.*)%trackback-linked\\((.*?)\\)%(.*)/i", "\${1}" . $trackback_link . "\${3}", $postinfo);
        }
    }
    // Trackback RDF
    if (strpos($postinfo_string, '%trackback-rdf%') !== FALSE) {
        ob_start();
        trackback_rdf();
        $trackback_rdf = "<!-- " . ob_get_contents() . " -->";
        ob_end_clean();
        $postinfo = str_replace("%trackback-rdf%", $trackback_rdf, $postinfo);
    }
    // Permalink
    if (strpos($postinfo_string, '%permalink%') !== FALSE) {
        ob_start();
        the_permalink();
        $permalink = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%permalink%", $permalink, $postinfo);
    }
    // Post ID
    if (strpos($postinfo_string, '%post-id%') !== FALSE) {
        ob_start();
        the_ID();
        $post_id = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%post-id%", $post_id, $postinfo);
    }
    // Post Title
    if (strpos($postinfo_string, '%post-title%') !== FALSE) {
        ob_start();
        the_title();
        $post_title = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%post-title%", $post_title, $postinfo);
    }
    // Edit post
    if (strpos($postinfo_string, '%edit(') !== FALSE) {
        while (strpos($postinfo, '%edit(') !== FALSE) {
            $edit_options = preg_match("/(.*)%edit\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $edit_matches);
            ob_start();
            edit_post_link($edit_matches[4], $edit_matches[2], $edit_matches[6]);
            $edit_link = ob_get_contents();
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%edit\\((.*?)\\)%(.*)/i", "\${1}" . $edit_link . "\${3}", $postinfo);
        }
    }
    // Print
    if (strpos($postinfo_string, '%print(') !== FALSE) {
        while (strpos($postinfo, '%print(') !== FALSE) {
            $print_text = preg_match("/(.*)%print\\('(.*?)'(.*)/i", $postinfo_string, $print_text_matches);
            $print_link = '<a href="javascript:window.print()">' . $print_text_matches[2] . '</a>';
            $postinfo = preg_replace("/(.*)%print\\((.*?)\\)%(.*)/i", "\${1}" . $print_link . "\${3}", $postinfo);
        }
    }
    // For the "WP-Email" plugin
    if (strpos($postinfo_string, '%wp-email%') !== FALSE) {
        $wp_email = function_exists('wp_email') ? email_link($email_post_text = '', $email_page_text = '', $echo = FALSE) : "";
        $postinfo = str_replace("%wp-email%", $wp_email, $postinfo);
    }
    // For the "WP-Print" plugin
    if (strpos($postinfo_string, '%wp-print%') !== FALSE) {
        $wp_print = function_exists('wp_print') ? print_link($print_post_text = '', $print_page_text = '', $echo = FALSE) : "";
        $postinfo = str_replace("%wp-print%", $wp_print, $postinfo);
    }
    // For the "WP-PostViews" plugin
    if (strpos($postinfo_string, '%wp-postviews%') !== FALSE) {
        $wp_postviews = function_exists('the_views') ? the_views($display = FALSE) : "";
        $postinfo = str_replace("%wp-postviews%", $wp_postviews, $postinfo);
    }
    // For the "WP-PostRatings" plugin
    if (strpos($postinfo_string, '%wp-postratings%') !== FALSE) {
        $wp_postratings = function_exists('the_ratings') ? the_ratings($start_tag = 'span', $custom_id = 0, $display = FALSE) : "";
        $postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo);
    }
    // For the "Sociable" plugin
    if (strpos($postinfo_string, '%sociable%') !== FALSE) {
        ob_start();
        $sociable = (function_exists('sociable_html2') and function_exists(do_sociable())) ? do_sociable() : "";
        $sociable = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%sociable%", $sociable, $postinfo);
    }
    // For the "Share This" plugin
    if (strpos($postinfo_string, '%share-this%') !== FALSE) {
        ob_start();
        if (function_exists('sharethis_button')) {
            sharethis_button();
            $share_this = ob_get_contents();
        } else {
            $share_this = "";
        }
        ob_end_clean();
        $postinfo = str_replace("%share-this%", $share_this, $postinfo);
    }
    // Images
    if (strpos($postinfo_string, '<image(') !== FALSE) {
        $postinfo = preg_replace_callback("|<image\\((.*?)\\)>|", "bfa_image_files", $postinfo);
    }
    /* The meta = ALL custom fields:values, formatted by Wordpress as
    	unordered list <ul><li>..</li><li>..</li></ul> */
    if (strpos($postinfo_string, '%meta%') !== FALSE) {
        ob_start();
        the_meta();
        $the_meta = ob_get_contents();
        ob_end_clean();
        // 3.4.3.: remove bfa_ata metas */
        $the_meta = preg_replace("/<li>(.*)bfa_ata(.*)<\\/li>/i", "", $the_meta);
        $postinfo = str_replace("%meta%", $the_meta, $postinfo);
    }
    // Single post meta values, not formatted
    if (strpos($postinfo_string, '%meta(') !== FALSE) {
        $postinfo = preg_replace_callback("|%meta\\('(.*?)'\\)%|", "bfa_meta_value", $postinfo);
    }
    // Since 3.6.7, parse widget areas
    $postinfo = bfa_parse_widget_areas($postinfo);
    return $postinfo;
}
Exemple #19
0
    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>
Exemple #20
0
    /**
     * 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;
        ?>
&amp;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;
        ?>
&amp;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&amp;url=<?php 
        echo $url;
        ?>
&amp;title=<?php 
        echo $title;
        ?>
&amp;summary=<?php 
        echo rawurlencode(get_the_excerpt());
        ?>
"><?php 
        _e('Linkedin', 'dw_focus');
        ?>
</a><span class="digit digit-linkedin"><?php 
        echo $linkedin_count;
        ?>
</span></li>
					<li class="email"><i class="icon-envelope-alt"></i><a href="mailto:?Subject=<?php 
        echo $title;
        ?>
&amp;body=<?php 
        echo $url;
        ?>
"><?php 
        _e('Email this article', 'dw_focus');
        ?>
</a></li>
                    <?php 
        if (!is_handheld()) {
            ?>
					<li class="print"><i class="icon-print"></i><a href="#" onclick="window.print();"><?php 
            _e('Print this article', 'dw_focus');
            ?>
</a></li>
                    <?php 
        }
        ?>
				</ul>
			</div>
		</div>
	<?php 
    }
Exemple #21
0
            ?>
			
		<?php 
        }
        $comment_count = 0;
        foreach ($comments as $comment) {
            // Run comments loop again for normal comments
            ?>

			<?php 
            if ($comment->comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("<pingback />", $comment->comment_content) && !ereg("<trackback />", $comment->comment_content)) {
                $comment_count++;
                ?>

				<div class="comment clearfix<?php 
                if (get_comment_author_email() == get_the_author_email()) {
                    echo ' author-comment';
                }
                if ($comment->comment_approved == '0') {
                    echo ' moderated';
                }
                ?>
" id="comment-<?php 
                comment_ID();
                ?>
">
					<?php 
                if ($comment->comment_approved == '0') {
                    ?>
					<p class="primary-span"><strong><?php 
                    _e('Your comment is awaiting moderation.', 'tarski');
Exemple #22
0
        the_permalink();
        ?>
" rel="bookmark" title="Permanent Link to <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>

					<div class="post-author">
						<?php 
        if ($wp_auth_credit == 1) {
            ?>
						<?php 
            echo get_avatar(get_the_author_email(), $size = '36', $default = 'images/avatar.jpg');
            ?>
						<p><strong><?php 
            the_time('l, F jS');
            ?>
</strong><br/>
							by <?php 
            the_author_posts_link();
            ?>
</p>
						<?php 
        } else {
            ?>
						<p><strong><?php 
            the_time('l, F jS');
            ?>
Exemple #23
0
    } else {
        $post_data = get_post($post->ID, ARRAY_A);
        $comment_number = $post_data['comment_count'];
        $all_comments = array_reverse($comments);
    }
    ?>

	
	<?php 
    // Do this for every comment:
    foreach ($all_comments as $comment) {
        if ($bfa_ata['separate_trackbacks'] == "Yes" and get_comment_type() == 'comment' or $bfa_ata['separate_trackbacks'] == "No") {
            ?>

			<li <?php 
            if ($bfa_ata['author_highlight'] == "Yes" and $comment->comment_author_email == get_the_author_email()) {
                echo 'class="authorcomment clearfix" ';
            } else {
                echo $oddcomment;
            }
            ?>
id="comment-<?php 
            comment_ID();
            ?>
">
				
			<?php 
            // GRAVATAR
            if (get_comment_type() == 'comment') {
                if ($bfa_ata['avatar_size'] != 0 and $bfa_ata['avatar_size'] != "") {
                    if (function_exists('get_avatar')) {
Exemple #24
0
        <!--/post-date -->
        <div class="post-excerpt">
          <?php 
        the_content('<p class="serif">Read the rest of this entry &raquo;</p>');
        ?>
        </div>
        <!--/post-excerpt -->
      </div>
      <!--/content -->
    </div>
    <!--/box -->
    <div class="clr"></div>
    <div class="box post">
      <div class="content border">
        <div class="pic fl"><?php 
        echo get_avatar(get_the_author_email(), $size = '80', $default = $urlHome . '/images/avatar.gif');
        ?>
</div>
        <div class="post-author">
          <div class="author-descr">
            <h3>
              <?php 
        the_author();
        ?>
            </h3>
            <p>
              <?php 
        the_author_description();
        ?>
            </p>
            <div class="author-details"><a href="<?php 
Exemple #25
0
function comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>


<?php 
    if ($comment->comment_author_email == get_the_author_email()) {
        $commentDivClass = 'comment-admin';
    } else {
        $commentDivClass = 'comment-normal';
    }
    ?>

	<div class="mod comments <?php 
    echo $commentDivClass;
    ?>
">
		<div <?php 
    comment_class();
    ?>
>
			<div id="comment-<?php 
    comment_ID();
    ?>
">
				<div class="mod-meta comment-author">
					<a class="comment-number" href="<?php 
    echo htmlspecialchars(get_comment_link($comment->comment_ID));
    ?>
"><?php 
    echo gtcn_comment_numbering($comment->comment_ID, '');
    ?>
</a>
					<a class="comment-gravatar" href="<?php 
    echo htmlspecialchars(get_comment_link($comment->comment_ID));
    ?>
"><?php 
    echo get_avatar($comment, $size = '35');
    ?>
</a>
					<div class="clear"></div>
				</div>

				<div class="mod-body">
					<div class="entry">
						<?php 
    if ($comment->comment_approved == '0') {
        ?>
							<em><?php 
        _e('Your comment is awaiting moderation.');
        ?>
</em>
						<?php 
    }
    ?>

						<div class="comment-meta commentmetadata"><?php 
    printf(__('<strong>%s</strong>'), get_comment_author_link());
    ?>
<span class="date"><?php 
    if (!function_exists('how_long_ago')) {
        comment_date() . ' at ' . comment_time();
    } else {
        echo how_long_ago(get_comment_time('U'));
    }
    ?>
</span><?php 
    edit_comment_link(__('Edit'), '<span class="edit">', '</span>');
    ?>
</div>

						<?php 
    comment_text();
    ?>

						<div class="reply"><?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
</div>
					</div> <!-- end div.entry -->
				</div> <!-- end div.mod-body -->
			</div> <!-- end #comment-ID -->
			<div class="clear"></div>
		</div> <!-- end div.comment -->
<?php 
}
Exemple #26
0
	<div id="content">

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>


		<div class="post" id="post-<?php 
        the_ID();
        ?>
">
			<div class="head">
				<p><?php 
        echo get_avatar(get_the_author_email(), $size = '36');
        ?>
</p>
				<h1><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h1>
			</div>
			
			<div class="premetadata">Posted on <?php 
        the_time(get_option('date_format'));
        ?>
, <?php 
function processFlaterboxCreateSummary()
{
    global $wpdb;
    global $post;
    $dyear = date('Y', strtotime('today'));
    $month = date('n', strtotime('today'));
    $list_day = date('j', strtotime('today'));
    $currentDay = date('l', strtotime('today'));
    $subject = 'Your Flatterbox Update';
    $toArr = array();
    if (isset($_GET['dyear']) && isset($_GET['month']) && isset($_GET['list_day'])) {
        $dyear = $_GET['dyear'];
        $month = $_GET['month'];
        $list_day = $_GET['list_day'];
    }
    $args = array('post_type' => 'flatterboxes', 'posts_per_page' => -1, 'meta_query' => array('relation' => 'AND', array('key' => 'date_of_delivery', 'value' => $dyear . '-' . $month . '-' . $list_day . ' 00:00:00', 'compare' => '>', 'type' => 'date'), array('relation' => 'OR', array('key' => 'order_count', 'value' => '', 'compare' => '='), array('key' => 'order_count', 'compare' => 'NOT EXISTS'))));
    $the_query = new WP_Query($args);
    if (isset($_GET['showme'])) {
        echo '<br/><br/>';
        print_r($the_query);
    }
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            if (strtolower(get_field('notification_frequency')) == 'onceaday' || strtolower(get_field('notification_frequency')) == strtolower($currentDay) || (strtolower(get_field('notification_frequency')) == 'onceaweek' || strtolower(get_field('notification_frequency')) == 'twiceaweek') && strtolower($currentDay) == 'monday' || strtolower(get_field('notification_frequency')) == 'twiceaweek' && strtolower($currentDay) == 'thursday') {
                $PID = intval(get_the_ID());
                $occasion = get_field('occasion');
                unset($toArr);
                $toArr = array();
                // Reset to avoid people seeing different items
                unset($messageArr);
                $messageArr = array();
                $toArr[] = get_the_author_email();
                //creator email
                if (isset($_GET['showme'])) {
                    echo get_field('date_sentiments_complete') . '<br/>';
                }
                //$sentimentsduedate = explode("/", date('d/m/Y', strtotime(get_field('date_sentiments_complete')))); //date_of_project_complete
                //$sentimentsduedate = explode("/", get_field('date_sentiments_complete')); //date_of_project_complete
                $sentimentsduedate = explode("/", date('d/m/Y', strtotime(get_field('date_sentiments_complete'))));
                //date_of_project_complete
                if (isset($_GET['showme'])) {
                    print_r($sentimentsduedate);
                    echo '<br/>';
                }
                $sentimentsduedate = date('F j, Y', mktime(0, 0, 0, $sentimentsduedate[1], $sentimentsduedate[0], $sentimentsduedate[2]));
                //$sentimentsduedate = get_field('date_sentiments_complete'); //date_of_project_complete
                if (isset($_GET['showme'])) {
                    echo $sentimentsduedate . '<br/>';
                }
                $dateneeded = explode("/", date('d/m/Y', strtotime(get_field('date_of_delivery'))));
                //date_of_project_complete
                $today = date('d/m/Y', strtotime('today'));
                $today = explode("/", $today);
                $date1 = date_create($today[2] . '-' . $today[1] . '-' . $today[0]);
                $date2 = date_create($dateneeded[2] . '-' . $dateneeded[1] . '-' . $dateneeded[0]);
                $numberofdaysremaining = $date1->diff($date2);
                $numberofdaysremaining = $numberofdaysremaining->days;
                if (isset($_GET['showme'])) {
                    echo get_field('date_of_delivery') . '<br/>';
                }
                $giftdate = explode("/", get_field('date_of_delivery'));
                $giftdate = explode("/", date('d/m/Y', strtotime(get_field('date_of_delivery'))));
                if (isset($_GET['showme'])) {
                    print_r($giftdate);
                    echo '<br/>';
                }
                $giftdate = date('F j, Y', mktime(0, 0, 0, $giftdate[1], $giftdate[0], $giftdate[2]));
                //$giftdate = get_field('date_of_delivery');
                if (isset($_GET['showme'])) {
                    echo $giftdate . '<br/>';
                }
                $sentimentsneeded = 0;
                $numberofsentiments = 0;
                $numberofinvitations = 0;
                $flatterername = get_field('who_is_this_for');
                $flatterer_results = $wpdb->get_results("SELECT count(*) AS Not_Responded FROM flatterers WHERE invalid = 0 AND responded = 0 AND PID = " . $PID, ARRAY_A);
                if ($flatterer_results) {
                    foreach ($flatterer_results as $row) {
                        $sentimentsneeded = $row["Not_Responded"];
                    }
                }
                $cardamount = get_field('card_quantity');
                if (strlen(trim(get_field('title_card_headline'))) > 0) {
                    $sentimentsneeded = $sentimentsneeded + 1;
                }
                $sentimentsneeded = $cardamount - $sentimentsneeded;
                $flatterer_results = $wpdb->get_results("SELECT count(*) AS Responded FROM sentiments WHERE sentiment_text <> '' AND PID = " . $PID, ARRAY_A);
                if ($flatterer_results) {
                    foreach ($flatterer_results as $row) {
                        $numberofsentiments = $row["Responded"];
                    }
                }
                $flatterer_results = $wpdb->get_results("SELECT count(*) AS Sentiments, flatterer_name FROM flatterers WHERE invalid = 0 AND PID = " . $PID, ARRAY_A);
                if ($flatterer_results) {
                    foreach ($flatterer_results as $row) {
                        $numberofinvitations = $row["Sentiments"];
                        //$flatterername = $row["flatterer_name"];
                    }
                }
                $bloginfo2 = home_url();
                $message = '<html>
<head>
<title>Flatterbox_Eblast_final</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table id="Table_01" width="650" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="650" height="107" colspan="3" align="center" valign="top"><img src="' . $bloginfo2 . '/emails/creator_summary/images/fb_update_header_logo.png" width="390" height="80" alt="Your Flatterbox® Order"></td>
	</tr>
	<tr>
	  <td width="650" colspan="3" align="center" valign="top" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #0e2240;">
      <p>Here\'s an update on your Flatterbox gift for </p>
		  <p style="font-size: 48px; font-weight: bold;">' . $flatterername . '</p>
		  <p style="font-size: 18px; margin-bottom: 20px;">The occasion: <strong>' . $occasion . '</strong></p>
		</td>
	</tr>
	<tr>
	  <td width="325" align="center" valign="top"><h3 style="font-family: Arial, Helvetica, sans-serif; border-bottom: 1px solid #bdb5c9; padding-bottom: 10px; margin-bottom: 10px; width: 300px; color: #1a3667;">Schedule</h3>
      	<div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Days Left to Complete</strong></div>
            <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $numberofdaysremaining . '</div>
		</div>
        <div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Sentiments Due By</strong></div>
            <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $sentimentsduedate . '</div>
		</div>
        <div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Gift Delivery Date</strong></div>
            <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $giftdate . '</div>
		</div>
      </td>
		<td width="325" align="center" valign="top"><h3 style="font-family: Arial, Helvetica, sans-serif; border-bottom: 1px solid #bdb5c9; padding-bottom: 10px; margin-bottom: 10px; width: 300px; color: #1a3667;">Sentiment Summary</h3>
        <div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Invitations 
       	    Sent</strong></div>
          <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $numberofinvitations . '</div>
		</div>
        <div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Sentiments Received</strong></div>
            <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $numberofsentiments . '</div>
		</div>
        <div style="width: 300px; margin: 0 auto 10px auto; position: relative; overflow: hidden;">
        	<div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;"><strong>Sentiments Needed</strong></div>
            <div style="text-align: left; width: 150px; float: left; display:inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0e2240;">' . $sentimentsneeded . '</div>
		</div>
	    </td>
	</tr>
   <tr>
  <td width="650" colspan="3" align="center" valign="top" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #0e2240;">
	    <div style="margin: 20px; padding: 10px; width: 310px; background-color: #f38707; color: #fff; font-size: 19px; font-weight: bold;"><em><a href="' . home_url() . '" target="_blank" style="color: #fff;">Login to Flatterbox</a></em> to review your sentiments and more</div></td>
	</tr>    
	<tr>
		<td width="650" height="28" colspan="3" align="center" valign="middle" style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #0D2065; color: #fff;">Thank you for participating in their Flatterbox! <em>- From the Flatterbox Team</em> | <a href="http://www.flatterbox.com" target="_blank" style="color:#fff; text-decoration:none;">flatterbox.com</a> | <a href="mailto:info@flatterbox.com" target="_blank" style="color:#fff; text-decoration:none;">info@flatterbox.com</a></td>
	</tr>
</table>
</center>
</body>
</html>';
                //echo $message;
                $messageArr[] = $message;
                if (!isset($_GET['showme'])) {
                    if (count($toArr) > 0) {
                        processEmail($toArr, $subject, $messageArr, $PID);
                    }
                    //echo 'SUMMARY OK';
                } else {
                    echo '<br/><br/>';
                    print_r($toArr);
                    echo '<br/><br/>';
                    echo $subject;
                    echo '<br/><br/>';
                    echo $message;
                }
            }
        }
    }
}
Exemple #28
0
        ?>
"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
	</div>	
	<div class="main">
		<?php 
        the_content('Read more...?');
        ?>
	</div>
	<div class="meta">Written by <a href="mailto:<?php 
        echo antispambot(get_the_author_email());
        ?>
">
		<?php 
        the_author();
        ?>
</a>, on <?php 
        the_time('F jS, Y');
        ?>
 
		<?php 
        _e("at");
        ?>
 <?php 
        the_time('g:i a');
        ?>
Exemple #29
0
        if (function_exists("get_avatar") && 'comment' == get_comment_type()) {
            echo " " . get_avatar($comment, '40');
        }
        ?>
				</span>
				<span class="date">
					<?php 
        comment_date($hemingwayEx->date_format() . '.y');
        ?>
 / <?php 
        comment_date('ga');
        ?>
				</span>
			</cite>
			<div <?php 
        if ($comment->comment_author_email == get_the_author_email()) {
            ?>
 class="mycontent"<?php 
        } else {
            ?>
 class="content" <?php 
        }
        ?>
>
				<div class="counter"><?php 
        echo $counter;
        $asc_comments != 1 ? $counter-- : $counter++;
        ?>
</div>
				<div class="commentbody">
					<?php 
        // and it doesn't match the cookie
        ?>
        <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php 
        return;
    }
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>

<!-- You can start editing here. -->

<?php 
if ($comments) {
    $author_email = get_the_author_email();
    ?>
    
    <div id="comments">
        <h2><?php 
    comments_number('No Responses', 'One Response', '% Responses');
    ?>
 to &#8220;<?php 
    the_title();
    ?>
&#8221;</h2>

        <ol class="commentlist">

            <?php 
    foreach ($comments as $comment) {