Beispiel #1
0
    /**
     * Post author snippet.
     *
     * Use only in the loop.
     *
     * @since presscore 0.1
     */
    function presscore_display_post_author()
    {
        $user_url = get_the_author_meta('user_url');
        $avatar = get_avatar(get_the_author_meta('ID'), 61, presscore_get_default_avatar());
        ?>

		<div class="entry-author">
			<?php 
        if ($user_url) {
            printf('<a href="%s" class="alignright">%s</a>', esc_url($user_url), $avatar);
        } else {
            echo str_replace("class='", "class='alignright ", $avatar);
        }
        ?>
			<p class="text-primary"><?php 
        _e('About the author', LANGUAGE_ZONE);
        ?>
</p>
			<p class="text-small"><?php 
        the_author_meta('description');
        ?>
</p>
		</div>

	<?php 
    }
    /**
     * Post author snippet.
     *
     * Use only in the loop.
     *
     * @since 1.0.0
     */
    function presscore_display_post_author()
    {
        $user_url = get_the_author_meta('user_url');
        if (dt_validate_gravatar(get_the_author_meta('user_email'))) {
            $avatar = get_avatar(get_the_author_meta('ID'), 85, presscore_get_default_avatar());
        } else {
            $avatar = '';
        }
        ?>

		<div class="dt-fancy-separator title-left fancy-author-title">
			<div class="dt-fancy-title"><?php 
        _e('About the author', 'the7mk2');
        ?>
<span class="separator-holder separator-right"></span></div>
		</div>
		<div class="entry-author wf-table">
			<?php 
        if ($avatar) {
            echo '<div class="wf-td entry-author-img">';
            if ($user_url) {
                printf('<a href="%s" class="alignleft">%s</a>', esc_url($user_url), $avatar);
            } else {
                echo str_replace("class='", "class='alignleft ", $avatar);
            }
            echo '</div>';
        }
        ?>
			<div class="wf-td entry-author-info">
				<p class="h5-size"><?php 
        the_author_meta('display_name');
        ?>
</p>
				<p class="text-normal"><?php 
        the_author_meta('description');
        ?>
</p>
			</div>
		</div>

	<?php 
    }