Example #1
0
        echo $category[0]->cat_name;
        ?>
</a>
				<div class="title_content">
					<h4><?php 
        the_title();
        ?>
</h4>
					<div class="author_date">
						<?php 
        if (class_exists('coauthors_plus')) {
            $co_authors = get_coauthors();
            echo 'Posted by: ';
            foreach ($co_authors as $key => $co_author) {
                $co_author_classes = array('co-author-wrap', 'co-author-number-' . ($key + 1));
                echo '<a href="', get_author_posts_url($co_author->ID), '">', userphoto_thumbnail($co_author), ' ', $co_author->display_name, '</a>';
                if (end($co_authors) !== $co_author) {
                    echo ' and ';
                    // not the last element
                }
            }
        } else {
            echo 'Posted by ';
            echo '<a href="', get_author_posts_url(get_the_author_meta('ID')), '">', userphoto_the_author_thumbnail(), '&nbsp;', the_author_meta('display_name'), '</a>';
        }
        echo '<br />on ';
        echo the_date();
        ?>
					</div>
				</div>
			</div>
Example #2
0
							<br />

							<?php 
do_action('profile_personal_options', $current_user);
do_action('show_user_profile', $current_user);
?>

							<table class="form-table" id="userphoto">
								<tr>
									<th><label for="user_login">&nbsp;</label></th>
									<td><?php 
if (function_exists('userphoto_exists')) {
    ?>
<p class='image'><?php 
    if (userphoto_exists($current_user->ID)) {
        userphoto_thumbnail($current_user->ID);
    } else {
        echo get_avatar($current_user->user_email, 96);
    }
    ?>
<br /><?php 
    _e('Thumbnail', APP_TD);
    ?>
</p><?php 
}
?>
</td>
								</tr>
							</table>

							<br />
Example #3
0
 private function _displayAuthor($args, $instance)
 {
     global $authordata;
     extract($args);
     // extract arguments
     if ((is_single() || is_page()) && $authordata->ID) {
         if ($instance['seq'] == 1) {
             echo $before_widget;
             echo $before_title . $instance['title'] . $after_title;
         }
         echo '<div id="author-spotlight">';
         echo '<div id="author-profile">';
         //Display author name
         echo '<h2>' . get_the_author_firstname() . ' ' . get_the_author_lastname() . '</h2>';
         //Display the social icons
         $socialDiv = "";
         $iconCount = 0;
         $style = "height:12px";
         foreach ($this->_getIconsAsArray() as $key => $data) {
             $print_img = false;
             $social_url = get_the_author_meta($key, $authordata->ID);
             //The Website or Homepahge URL should be read from Author-Data
             if ($data['img_title'] == 'Homepage' && $authordata->user_url) {
                 $socialDiv .= '<a href="' . $authordata->user_url . '" target="_blank" title="' . $data['img_title'] . '">';
                 $print_img = true;
             } else {
                 if ($social_url != "") {
                     $socialDiv .= '<a href="' . $social_url . '" target="_blank" title="' . $data['img_title'] . '">';
                     $print_img = true;
                 }
             }
             //If the URL is available & the Icon is enabled from Widget Admin, display it
             if ($print_img && $instance[$key]) {
                 $socialDiv .= '<img src="' . $data['img_src'] . '" title="' . $data['img_title'] . '" alt="' . $data['img_title'] . '" /></a>';
                 ++$iconCount;
             }
         }
         if ($iconCount <= 0) {
             $style = "display:none;";
         } else {
             if ($iconCount / 2 >= 6) {
                 $style = "height: 36px";
             }
         }
         printf('<div id="social-icons" style="%s">', $style);
         echo $socialDiv;
         echo "</div><!--#social-icons-->";
         //Display User photo OR the Gravatar
         if (function_exists('userphoto_exists') && userphoto_exists($authordata)) {
             userphoto_thumbnail($authordata);
         } else {
             echo get_avatar($authordata->ID, 96);
         }
         //Display author profile, with link to full profile
         $author_posts_link = get_author_posts_url($authordata->ID, $authordata->user_nicename);
         echo '<div id="author-description">';
         echo $this->_getSnippet(get_the_author_description(), $instance['charlimit'], '...') . '&nbsp;<i><a href="' . $author_posts_link . '" title="Read full Profile">' . $instance['readfulltext'] . '</a></i>';
         echo "</div><!--#author-description-->";
         echo '<div id="author-link"><a href="' . $author_posts_link . '" title="More articles by this author">' . $instance['moretext'] . '</a></div>';
         echo "</div><!--#author-profile-->";
         echo "</div><!--#author-spotlight-->";
         if ($instance['isLast']) {
             echo $after_widget;
         }
     }
 }