コード例 #1
0
function mytheme_about()
{
    if (get_the_author_description()) {
        print get_the_author_description();
    } else {
        print "The author does not say much about himself";
    }
}
コード例 #2
0
ファイル: functions.php プロジェクト: jmawebco/wordpress1
function wicked_showbio($content)
{
    if (is_single()) {
        $content .= '<div id="authorbio">';
        $content .= '<h3>About ' . get_the_author() . '</h3>';
        $content .= '<p>' . get_avatar(get_the_author_meta("user_email"), "50");
        $content .= get_the_author_description() . '</p></div>';
    }
    return $content;
}
コード例 #3
0
 /**
  * displays author bio on author archive pages.
  *
  * arguably, this functionality isn't REALLY related to 'Author Twitter Link'
  *
  * @since   0.0.1
  * @param   string  $description
  * @return  string  $description + twitter link
  */
 function add_bio_to_author_archive($description)
 {
     if (!is_author()) {
         // return early for non-author archives
         return $description;
     } else {
         // if an author, display their bio!
         return get_the_author_description();
     }
 }
コード例 #4
0
ファイル: author-profile.php プロジェクト: juslee/e27
 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;
         }
     }
 }
コード例 #5
0
/**
 * Shortcode function for displaying the current post author description
 * Uses the get_the_author_description() function
 * @link http://codex.wordpress.org/Template_Tags/the_author_description
 *
 * @since 0.1
 */
function shortcode_the_author_description()
{
    return get_the_author_description();
}
コード例 #6
0
ファイル: author.php プロジェクト: rascoop/carrington
        ?>
</h1>

<?php 
        if (!empty($bio)) {
            ?>

	<div class="description author-bio">

		<h2><?php 
            printf(__('About %s', 'carrington-blog'), get_author_name($authordata->ID));
            ?>
</h2>
	
<?php 
            echo cfct_basic_content_formatting(get_the_author_description());
            ?>
	
	</div>

<?php 
        }
        break;
    }
}
rewind_posts();
cfct_loop();
cfct_misc('nav-posts');
?>

</div><!--#content-->
コード例 #7
0
ファイル: lib.php プロジェクト: WaitButWhy/www
function scu_element7()
{
    global $post;
    //cat hide profile ---
    global $scu_sc;
    $cathp = $scu_sc['cathp'];
    if ($cathp > 0) {
        if (scu_catbelong($cathp)) {
            return '';
        }
    }
    $author = get_the_author();
    $postid = $post->id;
    $a = get_the_author_description();
    if ($a != "") {
        //$av = get_avatar($post->post_author);
        //$av = get_the_author_meta( 'user_custom_avatar', $post->post_author, 32 );
        //$av = '<img src="'.$av.'" >';
        return scu_div($a, 'scu-author-bio', 7);
        //if(userphoto_exists($post->post_author)){
        //	    $id = 'scu-clear';
        // $bio = slctableh($av,' ',$bio ,'','5px','',$id,$id,$id,'scu-clear');
        //}
    }
    return '';
}
コード例 #8
0
ファイル: author-template.php プロジェクト: schr/wordpress
/**
 * Display the description of the author of the current post.
 *
 * @link http://codex.wordpress.org/Template_Tags/the_author_description
 * @since 1.0.0
 * @see get_the_author_description()
 */
function the_author_description()
{
    echo get_the_author_description();
}
コード例 #9
0
ファイル: sidebar.php プロジェクト: alx/barceloneta
		<ul><?php 
    wp_get_archives('type=monthly');
    ?>
</ul>
	</div>
	
	<!-- Search Form-->
	<?php 
    $filename = TEMPLATEPATH . '/searchform.php';
    if (file_exists($filename)) {
        include $filename;
    }
    ?>
	
	<?php 
    if (is_home() and get_the_author_description() != '') {
        ?>
	<div class="tabbertab sidebar">
		<h3>About</h3>
		<p><?php 
        the_author_description();
        ?>
</p>
	</div>
	<?php 
    }
    ?>
	
<?php 
}
?>
コード例 #10
0
ファイル: single.php プロジェクト: roblillack/lightword
<span class="alignleft"><?php 
            echo get_avatar(get_the_author_id(), '28');
            ?>
</span>
<div class="alignleft" style="width:470px;"><h4><?php 
            _e('About', 'lightword');
            ?>
 <a href="<?php 
            the_author_url();
            ?>
 "><?php 
            the_author();
            ?>
</a></h4><?php 
            the_author_description();
            if (!get_the_author_description()) {
                _e('No description. Please complete your profile.', 'lightword');
            }
            ?>
</div><div class="clear"></div>
</div>
<?php 
        }
        ?>

<div class="cat_tags clear">
<span class="category"><?php 
        if ($lw_disable_tags == "true" || !get_the_tags()) {
            _e('Filed under:', 'lightword');
            echo " ";
            the_category(', ');
コード例 #11
0
ファイル: page_info.php プロジェクト: billerby/Surdeg
    function author_info()
    {
        ?>
		<div class="info">
			<a title="<?php 
        _e('Subscribe to this!', 'guangzhou');
        ?>
" href="<?php 
        echo $this->archive_feed();
        ?>
"><img src="<?php 
        bloginfo('template_url');
        ?>
/image/feed.png" width="16" height="16" alt="RSS"/></a>
		</div>
		
		<h2><?php 
        _e('Author Information', 'guangzhou');
        ?>
</h2>
		
		<?php 
        if ($this->archive_total() > 0) {
            ?>
			<p><?php 
            printf(__('The author has written <strong>%s entries</strong>.', 'guangzhou'), $this->archive_total());
            ?>
</p>
		<?php 
        }
        ?>
		
		<dl>
			<dt><?php 
        _e('Name', 'guangzhou');
        ?>
</dt>
			<dd>
				<?php 
        the_author();
        ?>
				<?php 
        if (get_the_author_url()) {
            ?>
					<?php 
            printf(__('(visit <a href="%s">website</a>', 'guangzhou'), get_the_author_url());
            ?>
				<?php 
        }
        ?>
			</dd>
			
			
			<?php 
        if (get_the_author_description()) {
            ?>
			<dt><?php 
            _e('Description', 'guangzhou');
            ?>
</dt>
			<dd><?php 
            the_author_description();
            ?>
</dd>
			<?php 
        }
        ?>
			
			<?php 
        do_action('author_page_info');
        ?>
		</dl>
		
		<?php 
    }
コード例 #12
0
ファイル: author.php プロジェクト: rascoop/carrington
get_header();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>

	<h1><?php 
        printf(__('Posts by: <a href="%s">%s</a>', 'carrington-jam'), get_author_posts_url($authordata->ID), get_author_name($authordata->ID));
        ?>
</h1>

<?php 
        if (!empty($bio)) {
            ?>

		<h2><?php 
            printf(__('About %s', 'carrington-jam'), get_author_name($authordata->ID));
            ?>
</h2>
	
<?php 
            echo apply_filters('the_content', get_the_author_description());
        }
        break;
    }
}
rewind_posts();
cfct_loop();
cfct_misc('nav-posts');
get_sidebar();
get_footer();
コード例 #13
0
            <h1 class="h-landmark"><span><?php 
            echo $title;
            ?>
</span></h1>

          <?php 
        } elseif (is_author()) {
            ?>

            <h1 class="h-landmark"><span><?php 
            echo get_the_author();
            ?>
</span></h1>
            <p class="author-description"><span><?php 
            echo get_the_author_description();
            ?>
</span></p>

          <?php 
        } elseif (is_404()) {
            ?>

            <h1 class="h-landmark"><span><?php 
            _e('Oops!', '__x__');
            ?>
</span></h1>

          <?php 
        } elseif (is_year()) {
            ?>
コード例 #14
0
function slc_display($gvmode)
{
    global $post, $gvdisplayed, $gvpostauthor, $gvco, $glsc, $gvext, $gvwt;
    if ($gvmode > 999990) {
        $gvco++;
        $gvdisplayed[] = $post->ID;
        $n = slc_val('posts', $gvmode);
        $cat = slc_cattext();
        $tag = slc_tagtext();
        $nam = slc_namedate();
        $e = slc_excerpt(slc_val('excerptlength', $gvmode), 'slc-excerpt-layout' . $gvmode);
        $t = slc_title('slc-title-layout' . $gvmode);
        $w = slc_val('imgw', $gvmode);
        $h = slc_val('imgh', $gvmode);
        $size = slc_val('size', $gvmode);
        $i = slc_img($w, $h, $size, 'slc-img', $tover);
        if ($gvco == 1) {
            $o .= '<table>';
        }
        if ($gvco == $n) {
            $o .= '</table>';
        }
        $o .= '<tr><td>' . $i . '</tr></td>';
    }
    if ($gvmode == 'top') {
        $gvco++;
        $d = '';
        if ($gvco > 1) {
            $d = ' - ';
        }
        $glink = get_permalink($post->ID);
        if (slc_catbelong($glsc[topcat])) {
            $o .= '<a id="slc-top-title-highlight" class="c" href="' . $glink . '">' . $d . $post->post_title . '</a>';
        } else {
            $o .= '<a id="slc-top-title" class="c" href="' . $glink . '">' . $d . $post->post_title . '</a>';
        }
    }
    if ($gvmode > 0) {
        $gvco++;
        $gvdisplayed[] = $post->ID;
        if ($glsc['nooutput'] == 1) {
            return '';
        }
        $gvpostauthor = $post->post_author;
        global $cathideprofile;
        if ($cathideprofile > 0) {
            if (slc_catbelong($cathideprofile)) {
                $hp = 1;
            }
        }
        $v = slc_val('areatitle', $gvmode);
        if ($v > 0) {
            $p = slc_val('postitle', $gvmode);
            $ord[$v * 1000 + $p] .= slc_title('slc-title-layout' . $gvmode);
        }
        $v = slc_val('areaexcerpt', $gvmode);
        if ($v > 0) {
            $p = slc_val('posexcerpt', $gvmode);
            $ord[$v * 1000 + $p] .= slc_excerpt(slc_val('excerptlength', $gvmode), 'slc-excerpt-layout' . $gvmode, slc_val('filter', $gvmode));
        }
        $v = slc_val('areacat', $gvmode);
        if ($v > 0) {
            $p = slc_val('poscat', $gvmode);
            $ord[$v * 1000 + $p] .= slc_cattext(slc_val('maxcat', 0));
        }
        $v = slc_val('areatag', $gvmode);
        if ($v > 0) {
            $p = slc_val('postag', $gvmode);
            $ord[$v * 1000 + $p] .= slc_tagtext();
        }
        $v = slc_val('areaauthor', $gvmode);
        if ($v > 0 and $hp != 1) {
            $p = slc_val('posauthor', $gvmode);
            $ord[$v * 1000 + $p] .= slc_namedate(slc_val('namedate', $gvmode));
        }
        $v = slc_val('areavideo', $gvmode);
        if ($v > 0) {
            if ($gvext == 1) {
                $custom = get_post_custom($post->ID);
                $link = $custom["link"][0];
                if (strlen($link) > 6 and strlen($link) < 20) {
                    $vid = '<iframe width="560" height="315" src="http://www.youtube.com/embed/' . $link . '" frameborder="0" allowfullscreen></iframe>';
                }
                $p = slc_val('posvideo', $gvmode);
                $ord[$v * 1000 + $p] .= $vid;
            }
        }
        $v = slc_val('areabio', $gvmode);
        if ($v > 0 and $hp != 1) {
            $author = get_the_author();
            $postid = $post->id;
            $a = get_the_author_description();
            if ($a != "") {
                $bi = '<img src="' . get_the_author_meta('user_custom_avatar', $current_user->ID, 32) . '" />';
                $bio .= slc_div($a, 'slc-author-bio');
            }
            $p = slc_val('posbio', $gvmode);
            $ord[$v * 1000 + $p] .= $bio;
        }
        $v = slc_val('areaext', $gvmode);
        if ($v > 0) {
            $p = slc_val('posext', $gvmode);
            $ord[$v * 1000 + $p] .= $glsc[exttext];
        }
        $w = slc_val('imgw', $gvmode);
        $h = slc_val('imgh', $gvmode);
        $size = slc_val('size', $gvmode);
        if ($size != 'None') {
            $areaimg .= $ord[10001] . $ord[10002] . $ord[10003] . $ord[10004] . $ord[10005] . $ord[10006] . $ord[10007] . $ord[10008] . $ord[10009] . $ord[10010];
            $t = strip_tags($areaimg);
            $i = slc_img($w, $h, $size, 'slc-img', $t);
            if ($gvext == 1 and !slc_val('video', $gvmode) > 0) {
                $y = slc_video_thumb($w, $h, 0);
                if ($y != '') {
                    $i = $y;
                }
            }
            $v = slc_val('areaimage', $gvmode);
            if ($v > 0) {
                $p = slc_val('posimage', $gvmode);
                $ord[$v * 1000 + $p] .= $i;
            }
            $areaimg = $v;
        }
        //----------------------------------------------
        $areatop .= $ord[1001] . $ord[1002] . $ord[1003] . $ord[1004] . $ord[1005] . $ord[1006] . $ord[1007] . $ord[1008] . $ord[1009] . $ord[1010];
        $arealeft .= $ord[2001] . $ord[2002] . $ord[2003] . $ord[2004] . $ord[2005] . $ord[2006] . $ord[2007] . $ord[2008] . $ord[2009] . $ord[2010];
        $arearight .= $ord[3001] . $ord[3002] . $ord[3003] . $ord[3004] . $ord[3005] . $ord[3006] . $ord[3007] . $ord[3008] . $ord[3009] . $ord[3010];
        global $glimgw;
        $w = $glimgw;
        if (!$w > 0) {
            $w = slc_val('imgw', $gvmode);
        }
        $gvwt = '100%';
        $gvwtb = slc_val('wt', $gvmode);
        if ($gvwtb != '') {
            $gvwt = $gvwtb . 'px';
        }
        if ($w > 0) {
            if ($areaimg == 2) {
                $wl = $w . 'px';
            }
            if ($areaimg == 3) {
                $wr = $w . 'px';
            }
            if ($wl . $wr == '') {
                $wl = $w . 'px';
            }
        }
        $bg = slc_val('areabg', $gvmode);
        $bge = slc_val('cssbg', $gvmode);
        $ibg = 'slc-background' . $bge;
        if ($placeimg >= 11 and $placeimg <= 20 and $bg == 2) {
            //$bg = 3;
        }
        if ($placeimg >= 21 and $placeimg <= 30 and $bg == 1) {
            //$bg = 3;
        }
        if ($bg == 1) {
            $areatop = slctableh($areatop, '', '', $wl, '', '', $ibg, '', '', 'slc-clear', $wt);
        }
        if ($bg == 2) {
            $arealeft = slctableh($arealeft, '', '', $wl, '', '', $ibg, '', '', 'slc-clear', $wl);
        }
        if ($bg == 3) {
            $arearight = slctableh($arearight, '', '', $wr, '', '', $ibg, '', '', 'slc-clear', $wr);
        }
        $em = slc_val('embed', $gvmode);
        $e = 3;
        if ($areaimg == 2 and $em == 1) {
            $e = 1;
        }
        if ($areaimg == 3 and $em == 1) {
            $e = 2;
        }
        if ($areaimg == '0' and $em == 1) {
            $e = 1;
        }
        if ($e == 1) {
            $o .= $areatop . slctableh($arealeft, '', '', $wl, '', '', 'slc-clear', '', '', 'slc-embed-left', $wl) . $arearight;
        }
        if ($e == 2) {
            $o .= $areatop . slctableh($arearight, '', '', $wr, '', '', 'slc-clear', '', '', 'slc-embed-right', $wr) . $arealeft;
        }
        if ($e == 3) {
            if ($arealeft != '' and $arearight != '') {
                $space = ' ';
            }
            $o .= $areatop . slctableh($arealeft, $space, $arearight, $wl, '', $wr, 'slc-clear', 'slc-hpostspace', 'slc-clear', 'slc-clear');
        }
        if ($bg == 4) {
            $o = slctableh($o, '', '', $gvwt, '', '', $ibg, '', '', 'slc-clear', $gvwt);
        }
        $o = slctableh($o, '', '', $gvwt, '', '', 'slc-clear', '', '', 'slc-vpostspace', $gvwt);
    }
    wp_reset_postdata();
    return $o;
}