当前位置: 首页>>代码示例>>PHP>>正文


PHP get_the_author_description函数代码示例

本文整理汇总了PHP中get_the_author_description函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_author_description函数的具体用法?PHP get_the_author_description怎么用?PHP get_the_author_description使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_the_author_description函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mytheme_about

function mytheme_about()
{
    if (get_the_author_description()) {
        print get_the_author_description();
    } else {
        print "The author does not say much about himself";
    }
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:8,代码来源:functions.php

示例2: wicked_showbio

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;
}
开发者ID:jmawebco,项目名称:wordpress1,代码行数:10,代码来源:functions.php

示例3: add_bio_to_author_archive

 /**
  * 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();
     }
 }
开发者ID:buffler,项目名称:author-twitter-link,代码行数:19,代码来源:class-author-twitter-link-public.php

示例4: _displayAuthor

 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;
         }
     }
 }
开发者ID:juslee,项目名称:e27,代码行数:66,代码来源:author-profile.php

示例5: shortcode_the_author_description

/**
 * 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();
}
开发者ID:jfitzsimmons,项目名称:soundtrackforspace,代码行数:11,代码来源:template-tag-shortcodes.php

示例6: printf

        ?>
</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-->
开发者ID:rascoop,项目名称:carrington,代码行数:31,代码来源:author.php

示例7: scu_element7

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 '';
}
开发者ID:WaitButWhy,项目名称:www,代码行数:26,代码来源:lib.php

示例8: the_author_description

/**
 * 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();
}
开发者ID:schr,项目名称:wordpress,代码行数:11,代码来源:author-template.php

示例9: wp_get_archives

		<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 
}
?>
开发者ID:alx,项目名称:barceloneta,代码行数:31,代码来源:sidebar.php

示例10: get_avatar

<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(', ');
开发者ID:roblillack,项目名称:lightword,代码行数:31,代码来源:single.php

示例11: author_info

    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 
    }
开发者ID:billerby,项目名称:Surdeg,代码行数:75,代码来源:page_info.php

示例12: get_header

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();
开发者ID:rascoop,项目名称:carrington,代码行数:31,代码来源:author.php

示例13: elseif

            <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()) {
            ?>
开发者ID:kevinotsuka,项目名称:datapop,代码行数:30,代码来源:_landmark-header.php

示例14: slc_display

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);
//.........这里部分代码省略.........
开发者ID:WaitButWhy,项目名称:www,代码行数:101,代码来源:sitelayoutcustomizer.php


注:本文中的get_the_author_description函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。