WordPress.org

Make WordPress Core

Ticket #7038: author-template.corrections.r7989.diff

File author-template.corrections.r7989.diff, 10.7 KB (added by jacobsantos, 6 years ago)

Author Template documentation corrections based off r7989

  • author-template.php

     
    22/** 
    33 * Author Template functions for use in themes. 
    44 * 
     5 * These functions must be used within the WordPress Loop. 
     6 * 
    57 * @package WordPress 
    68 * @subpackage Template 
    79 */ 
    810 
    911/** 
    10  * get_the_author() - Get the author of the current post in the Loop. 
     12 * Retrieve the author of the current post 
    1113 * 
    1214 * @since 1.5 
    1315 * @uses $authordata The current author's DB object. 
     
    2224} 
    2325 
    2426/** 
    25  * the_author() - Echo the name of the author of the current post in the Loop. 
     27 * Display the name of the author of the current post 
    2628 * 
    27  * The behavior of this function is based off of old functionality predating get_the_author(). 
    28  * This function is not deprecated, but is designed to echo the value from get_the_author() 
    29  * and as an result of any old theme that might still use the old behavior will also 
    30  * pass the value from get_the_author(). 
     29 * The behavior of this function is based off of old functionality predating 
     30 * get_the_author(). This function is not deprecated, but is designed to echo 
     31 * the value from get_the_author() and as an result of any old theme that might 
     32 * still use the old behavior will also pass the value from get_the_author(). 
    3133 * 
    32  * The normal, expected behavior of this function is to echo the author and not return it. 
    33  * However, backwards compatiability has to be maintained. 
     34 * The normal, expected behavior of this function is to echo the author and not 
     35 * return it. However, backwards compatiability has to be maintained. 
    3436 * 
    3537 * @since 0.71 
    3638 * @see get_the_author() 
    3739 * 
    3840 * @param string $deprecated Deprecated. 
    39  * @param string $deprecated_echo Echo the string or return it. Deprecated, use get_the_author(). 
     41 * @param string $deprecated_echo Echo the string or return it. 
    4042 * @return string The author's display name, from get_the_author(). 
    4143 */ 
    4244function the_author($deprecated = '', $deprecated_echo = true) { 
     
    4648} 
    4749 
    4850/** 
    49  * get_the_author_description() - Get the description of the author of the current post in the Loop. 
     51 * Retrieve the description of the author of the current post 
    5052 * 
    5153 * @since 1.5 
    5254 * @uses $authordata The current author's DB object. 
     
    5860} 
    5961 
    6062/** 
    61  * the_author_description() - Echo the description of the author of the current post in the Loop. 
     63 * Display the description of the author of the current post 
    6264 * 
    6365 * @since 1.0.0 
    6466 * @see get_the_author_description() 
     
    6870} 
    6971 
    7072/** 
    71  * get_the_author_login() - Get the login name of the author of the current post in the Loop. 
     73 * Retrieve the login name of the author of the current post 
    7274 * 
    7375 * @since 1.5 
    7476 * @uses $authordata The current author's DB object. 
     
    8082} 
    8183 
    8284/** 
    83  * the_author_login() - Echo the login name of the author of the current post in the Loop. 
     85 * Display the login name of the author of the current post 
    8486 * 
    8587 * @since 0.71 
    8688 * @see get_the_author_login() 
     
    9092} 
    9193 
    9294/** 
    93  * get_the_author_firstname() - Get the first name of the author of the current post in the Loop. 
     95 * Retrieve the first name of the author of the current post 
    9496 * 
    9597 * @since 1.5 
    9698 * @uses $authordata The current author's DB object. 
     
    102104} 
    103105 
    104106/** 
    105  * the_author_firstname() - Echo the first name of the author of the current post in the Loop. 
     107 * Display the first name of the author of the current post 
    106108 * 
    107109 * @since 0.71 
    108110 * @uses get_the_author_firstname() 
     
    112114} 
    113115 
    114116/** 
    115  * get_the_author_lastname() - Get the last name of the author of the current post in the Loop. 
     117 * Retrieve the last name of the author of the current post 
    116118 * 
    117119 * @since 1.5 
    118120 * @uses $authordata The current author's DB object. 
     
    124126} 
    125127 
    126128/** 
    127  * the_author_lastname() - Echo the last name of the author of the current post in the Loop. 
     129 * Display the last name of the author of the current post 
    128130 * 
    129131 * @since 0.71 
    130132 * @uses get_the_author_lastname() 
     
    134136} 
    135137 
    136138/** 
    137  * get_the_author_nickname() - Get the nickname of the author of the current post in the Loop. 
     139 * Retrieve the nickname of the author of the current post 
    138140 * 
    139141 * @since 1.5 
    140142 * @uses $authordata The current author's DB object. 
     
    146148} 
    147149 
    148150/** 
    149  * the_author_nickname() - Echo the nickname of the author of the current post in the Loop. 
     151 * Display the nickname of the author of the current post 
    150152 * 
    151153 * @since 0.71 
    152154 * @uses get_the_author_nickname() 
     
    156158} 
    157159 
    158160/** 
    159  * get_the_author_ID() - Get the ID of the author of the current post in the Loop. 
     161 * Retrieve the ID of the author of the current post 
    160162 * 
    161163 * @since 1.5 
    162164 * @uses $authordata The current author's DB object. 
     
    168170} 
    169171 
    170172/** 
    171  * the_author_ID() - Echo the ID of the author of the current post in the Loop. 
     173 * Display the ID of the author of the current post 
    172174 * 
    173175 * @since 0.71 
    174176 * @uses get_the_author_ID() 
     
    178180} 
    179181 
    180182/** 
    181  * get_the_author_email() - Get the email of the author of the current post in the Loop. 
     183 * Retrieve the email of the author of the current post 
    182184 * 
    183185 * @since 1.5 
    184186 * @uses $authordata The current author's DB object. 
     
    190192} 
    191193 
    192194/** 
    193  * the_author_email() - Echo the email of the author of the current post in the Loop. 
     195 * Display the email of the author of the current post 
    194196 * 
    195197 * @since 0.71 
    196198 * @uses get_the_author_email() 
     
    200202} 
    201203 
    202204/** 
    203  * get_the_author_url() - Get the URL to the home page of the author of the current post in the Loop. 
     205 * Retrieve the URL to the home page of the author of the current post 
    204206 * 
    205207 * @since 1.5 
    206208 * @uses $authordata The current author's DB object. 
     
    216218} 
    217219 
    218220/** 
    219  * the_author_url() - Echo the URL to the home page of the author of the current post in the Loop. 
     221 * Display the URL to the home page of the author of the current post 
    220222 * 
    221223 * @since 0.71 
    222224 * @uses get_the_author_url() 
     
    226228} 
    227229 
    228230/** 
    229  * the_author_link() - If the author has a home page set, echo an HTML link, otherwise just echo the author's name. 
     231 * Display either author's link or author's name. 
    230232 * 
     233 * If the author has a home page set, echo an HTML link, otherwise just echo the 
     234 * author's name. 
     235 * 
    231236 * @since 2.1 
    232237 * @uses get_the_author_url() 
    233238 * @uses the_author() 
     
    241246} 
    242247 
    243248/** 
    244  * get_the_author_icq() - Get the ICQ number of the author of the current post in the Loop. 
     249 * Retrieve the ICQ number of the author of the current post 
    245250 * 
    246251 * @since 1.5 
    247252 * @uses $authordata The current author's DB object. 
     
    253258} 
    254259 
    255260/** 
    256  * the_author_icq() - Echo the ICQ number of the author of the current post in the Loop. 
     261 * Display the ICQ number of the author of the current post 
    257262 * 
    258263 * @since 0.71 
    259264 * @see get_the_author_icq() 
     
    263268} 
    264269 
    265270/** 
    266  * get_the_author_aim() - Get the AIM name of the author of the current post in the Loop. 
     271 * Retrieve the AIM name of the author of the current post 
    267272 * 
    268273 * @since 1.5 
    269274 * @uses $authordata The current author's DB object. 
     
    275280} 
    276281 
    277282/** 
    278  * the_author_aim() - Echo the AIM name of the author of the current post in the Loop. 
     283 * Display the AIM name of the author of the current post 
    279284 * 
    280285 * @since 0.71 
    281286 * @see get_the_author_aim() 
     
    285290} 
    286291 
    287292/** 
    288  * get_the_author_yim() - Get the Yahoo! IM name of the author of the current post in the Loop. 
     293 * Retrieve the Yahoo! IM name of the author of the current post 
    289294 * 
    290295 * @since 1.5 
    291296 * @uses $authordata The current author's DB object. 
     
    297302} 
    298303 
    299304/** 
    300  * the_author_yim() - Echo the Yahoo! IM name of the author of the current post in the Loop. 
     305 * Display the Yahoo! IM name of the author of the current post 
    301306 * 
    302307 * @since 0.71 
    303308 * @see get_the_author_yim() 
     
    307312} 
    308313 
    309314/** 
    310  * get_the_author_msn() - Get the MSN address of the author of the current post in the Loop. 
     315 * Retrieve the MSN address of the author of the current post 
    311316 * 
    312317 * @since 1.5 
    313318 * @uses $authordata The current author's DB object. 
     
    319324} 
    320325 
    321326/** 
    322  * the_author_msn() - Echo the MSN address of the author of the current post in the Loop. 
     327 * Display the MSN address of the author of the current post 
    323328 * 
    324329 * @since 0.71 
    325330 * @see get_the_author_msn() 
     
    329334} 
    330335 
    331336/** 
    332  * get_the_author_posts() - Get the number of posts by the author of the current post in the Loop. 
     337 * Retrieve the number of posts by the author of the current post 
    333338 * 
    334339 * @since 1.5 
    335340 * @uses $post The current post in the Loop's DB object. 
     
    342347} 
    343348 
    344349/** 
    345  * the_author_posts() - Echo the number of posts by the author of the current post in the Loop. 
     350 * Display the number of posts by the author of the current post 
    346351 * 
    347352 * @since 0.71 
    348353 * @uses get_the_author_posts() Echos returned value from function. 
     
    352357} 
    353358 
    354359/** 
    355  * the_author_posts_link() - Echo an HTML link to the author page of the author of the current post in the Loop. 
     360 * Display an HTML link to the author page of the author of the current post 
    356361 * 
    357  * Does just echo get_author_posts_url() function, like the others do. The reason for this, 
    358  * is that another function is used to help in printing the link to the author's posts. 
     362 * Does just echo get_author_posts_url() function, like the others do. The 
     363 * reason for this, is that another function is used to help in printing the 
     364 * link to the author's posts. 
    359365 * 
    360366 * @since 1.2 
    361367 * @uses $authordata The current author's DB object. 
     
    374380} 
    375381 
    376382/** 
    377  * get_author_posts_url() - Get the URL to the author page of the author of the current post in the Loop. 
     383 * Retrieve the URL to the author page of the author of the current post 
    378384 * 
    379385 * @since 2.1 
    380386 * @uses $wp_rewrite WP_Rewrite 
     
    404410} 
    405411 
    406412/** 
    407  * get_author_name() - Get the specified author's preferred display name. 
     413 * Retrieve the specified author's preferred display name. 
    408414 * 
    409415 * @since 1.0.0 
    410416 * @param int $auth_id The ID of the author. 
     
    416422} 
    417423 
    418424/** 
    419  * wp_list_authors() - List all the authors of the blog, with several options available. 
     425 * List all the authors of the blog, with several options available. 
    420426 * 
    421  * optioncount (boolean) (false): Show the count in parenthesis next to the author's name. 
    422  * exclude_admin (boolean) (true): Exclude the 'admin' user that is installed by default. 
     427 * optioncount (boolean) (false): Show the count in parenthesis next to the 
     428 *              author's name. 
     429 * exclude_admin (boolean) (true): Exclude the 'admin' user that is installed by 
     430 *              default. 
    423431 * show_fullname (boolean) (false): Show their full names. 
    424432 * hide_empty (boolean) (true): Don't show authors without any posts. 
    425433 * feed (string) (''): If isn't empty, show links to author's feeds.