Make WordPress Core

Changeset 6395


Ignore:
Timestamp:
12/16/2007 11:47:58 PM (17 years ago)
Author:
ryan
Message:

author-template phpdoc from darkdragon. fixes #4393

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/author-template.php

    r6365 r6395  
    11<?php
    2 
    3 /**
    4  * Get the author of the current post in the Loop.
    5  * @global object $authordata The current author's DB object.
     2/**
     3 * Author Template functions for use in themes.
     4 *
     5 * @package WordPress
     6 * @subpackage Template
     7 */
     8
     9/**
     10 * get_the_author() - Get the author of the current post in the Loop.
     11 *
     12 * @since 1.5
     13 * @uses $authordata The current author's DB object.
     14 * @uses apply_filters() Calls 'the_author' hook on the author display name.
     15 *
    616 * @param string $deprecated Deprecated.
    717 * @return string The author's display name.
     
    1323
    1424/**
    15  * Echo the name of the author of the current post in the Loop.
     25 * the_author() - Echo the name of the author of the current post in the Loop.
     26 *
     27 * @since 0.71
    1628 * @see get_the_author()
     29 * @deprecated Use get_the_author()
     30 *
    1731 * @param string $deprecated Deprecated.
    1832 * @param string $deprecated_echo Echo the string or return it. Deprecated, use get_the_author().
     
    2640
    2741/**
    28  * Get the description of the author of the current post in the Loop.
    29  * @global object $authordata The current author's DB object.
     42 * get_the_author_description() - Get the description of the author of the current post in the Loop.
     43 *
     44 * @since 1.5
     45 * @uses $authordata The current author's DB object.
    3046 * @return string The author's description.
    3147 */
     
    3652
    3753/**
    38  * Echo the description of the author of the current post in the Loop.
     54 * the_author_description() - Echo the description of the author of the current post in the Loop.
     55 *
     56 * @since 1.0.1
    3957 * @see get_the_author_description()
    40  * @return null
    4158 */
    4259function the_author_description() {
     
    4562
    4663/**
    47  * Get the login name of the author of the current post in the Loop.
    48  * @global object $authordata The current author's DB object.
     64 * get_the_author_login() - Get the login name of the author of the current post in the Loop.
     65 *
     66 * @since 1.5
     67 * @uses $authordata The current author's DB object.
    4968 * @return string The author's login name (username).
    5069 */
     
    5574
    5675/**
    57  * Echo the login name of the author of the current post in the Loop.
     76 * the_author_login() - Echo the login name of the author of the current post in the Loop.
     77 *
     78 * @since 0.71
    5879 * @see get_the_author_login()
    59  * @return null
    6080 */
    6181function the_author_login() {
     
    6484
    6585/**
    66  * Get the first name of the author of the current post in the Loop.
    67  * @global object $authordata The current author's DB object.
     86 * get_the_author_firstname() - Get the first name of the author of the current post in the Loop.
     87 *
     88 * @since 1.5
     89 * @uses $authordata The current author's DB object.
    6890 * @return string The author's first name.
    6991 */
     
    7496
    7597/**
    76  * Echo the first name of the author of the current post in the Loop.
    77  * @see get_the_author_firstname()
    78  * @return null
     98 * the_author_firstname() - Echo the first name of the author of the current post in the Loop.
     99 *
     100 * @since 0.71
     101 * @uses get_the_author_firstname()
    79102 */
    80103function the_author_firstname() {
     
    83106
    84107/**
    85  * Get the last name of the author of the current post in the Loop.
    86  * @global object $authordata The current author's DB object.
     108 * get_the_author_lastname() - Get the last name of the author of the current post in the Loop.
     109 *
     110 * @since 1.5
     111 * @uses $authordata The current author's DB object.
    87112 * @return string The author's last name.
    88113 */
     
    93118
    94119/**
    95  * Echo the last name of the author of the current post in the Loop.
    96  * @see get_the_author_lastname()
    97  * @return null
     120 * the_author_lastname() - Echo the last name of the author of the current post in the Loop.
     121 *
     122 * @since 0.71
     123 * @uses get_the_author_lastname()
    98124 */
    99125function the_author_lastname() {
     
    102128
    103129/**
    104  * Get the nickname of the author of the current post in the Loop.
    105  * @global object $authordata The current author's DB object.
     130 * get_the_author_nickname() - Get the nickname of the author of the current post in the Loop.
     131 *
     132 * @since 1.5
     133 * @uses $authordata The current author's DB object.
    106134 * @return string The author's nickname.
    107135 */
     
    112140
    113141/**
    114  * Echo the nickname of the author of the current post in the Loop.
    115  * @see get_the_author_nickname()
    116  * @return null
     142 * the_author_nickname() - Echo the nickname of the author of the current post in the Loop.
     143 *
     144 * @since 0.71
     145 * @uses get_the_author_nickname()
    117146 */
    118147function the_author_nickname() {
     
    121150
    122151/**
    123  * Get the ID of the author of the current post in the Loop.
    124  * @global object $authordata The current author's DB object.
     152 * get_the_author_ID() - Get the ID of the author of the current post in the Loop.
     153 *
     154 * @since 1.5
     155 * @uses $authordata The current author's DB object.
    125156 * @return int The author's ID.
    126157 */
     
    131162
    132163/**
    133  * Echo the ID of the author of the current post in the Loop.
    134  * @see get_the_author_ID()
    135  * @return null
     164 * the_author_ID() - Echo the ID of the author of the current post in the Loop.
     165 *
     166 * @since 0.71
     167 * @uses get_the_author_ID()
    136168 */
    137169function the_author_ID() {
     
    140172
    141173/**
    142  * Get the email of the author of the current post in the Loop.
    143  * @global object $authordata The current author's DB object.
     174 * get_the_author_email() - Get the email of the author of the current post in the Loop.
     175 *
     176 * @since 1.5
     177 * @uses $authordata The current author's DB object.
    144178 * @return string The author's username.
    145179 */
     
    150184
    151185/**
    152  * Echo the email of the author of the current post in the Loop.
    153  * @see get_the_author_email()
    154  * @return null
     186 * the_author_email() - Echo the email of the author of the current post in the Loop.
     187 *
     188 * @since 0.71
     189 * @uses get_the_author_email()
    155190 */
    156191function the_author_email() {
     
    159194
    160195/**
    161  * Get the URL to the home page of the author of the current post in the Loop.
    162  * @global object $authordata The current author's DB object.
     196 * get_the_author_url() - Get the URL to the home page of the author of the current post in the Loop.
     197 *
     198 * @since 1.5
     199 * @uses $authordata The current author's DB object.
    163200 * @return string The URL to the author's page.
    164201 */
     
    173210
    174211/**
    175  * Echo the URL to the home page of the author of the current post in the Loop.
    176  * @see get_the_author_url()
    177  * @return null
     212 * the_author_url() - Echo the URL to the home page of the author of the current post in the Loop.
     213 *
     214 * @since 0.71
     215 * @uses get_the_author_url()
    178216 */
    179217function the_author_url() {
     
    182220
    183221/**
    184  * If the author has a home page set, echo an HTML link, otherwise just echo the author's name.
    185  * @see get_the_author_url()
    186  * @see the_author()
    187  * @return null
     222 * the_author_link() - If the author has a home page set, echo an HTML link, otherwise just echo the author's name.
     223 *
     224 * @since 2.1
     225 * @uses get_the_author_url()
     226 * @uses the_author()
    188227 */
    189228function the_author_link() {
     
    196235
    197236/**
    198  * Get the ICQ number of the author of the current post in the Loop.
    199  * @global object $authordata The current author's DB object.
     237 * get_the_author_icq() - Get the ICQ number of the author of the current post in the Loop.
     238 *
     239 * @since 1.5
     240 * @uses $authordata The current author's DB object.
    200241 * @return string The author's ICQ number.
    201242 */
     
    206247
    207248/**
    208  * Echo the ICQ number of the author of the current post in the Loop.
     249 * the_author_icq() - Echo the ICQ number of the author of the current post in the Loop.
     250 *
     251 * @since 0.71
    209252 * @see get_the_author_icq()
    210  * @return null
    211253 */
    212254function the_author_icq() {
     
    215257
    216258/**
    217  * Get the AIM name of the author of the current post in the Loop.
    218  * @global object $authordata The current author's DB object.
     259 * get_the_author_aim() - Get the AIM name of the author of the current post in the Loop.
     260 *
     261 * @since 1.5
     262 * @uses $authordata The current author's DB object.
    219263 * @return string The author's AIM name.
    220264 */
     
    225269
    226270/**
    227  * Echo the AIM name of the author of the current post in the Loop.
     271 * the_author_aim() - Echo the AIM name of the author of the current post in the Loop.
     272 *
     273 * @since 0.71
    228274 * @see get_the_author_aim()
    229  * @return null
    230275 */
    231276function the_author_aim() {
     
    234279
    235280/**
    236  * Get the Yahoo! IM name of the author of the current post in the Loop.
    237  * @global object $authordata The current author's DB object.
     281 * get_the_author_yim() - Get the Yahoo! IM name of the author of the current post in the Loop.
     282 *
     283 * @since 1.5
     284 * @uses $authordata The current author's DB object.
    238285 * @return string The author's Yahoo! IM name.
    239286 */
     
    244291
    245292/**
    246  * Echo the Yahoo! IM name of the author of the current post in the Loop.
     293 * the_author_yim() - Echo the Yahoo! IM name of the author of the current post in the Loop.
     294 *
     295 * @since 0.71
    247296 * @see get_the_author_yim()
    248  * @return null
    249297 */
    250298function the_author_yim() {
     
    253301
    254302/**
    255  * Get the MSN address of the author of the current post in the Loop.
    256  * @global object $authordata The current author's DB object.
     303 * get_the_author_msn() - Get the MSN address of the author of the current post in the Loop.
     304 *
     305 * @since 1.5
     306 * @uses $authordata The current author's DB object.
    257307 * @return string The author's MSN address.
    258308 */
     
    263313
    264314/**
    265  * Echo the MSN address of the author of the current post in the Loop.
     315 * the_author_msn() - Echo the MSN address of the author of the current post in the Loop.
     316 *
     317 * @since 0.71
    266318 * @see get_the_author_msn()
    267  * @return null
    268319 */
    269320function the_author_msn() {
     
    272323
    273324/**
    274  * Get the number of posts by the author of the current post in the Loop.
    275  * @global object $post The current post in the Loop's DB object.
    276  * @see get_usernumposts()
     325 * get_the_author_posts() - Get the number of posts by the author of the current post in the Loop.
     326 *
     327 * @since 1.5
     328 * @uses $post The current post in the Loop's DB object.
     329 * @uses get_usernumposts()
    277330 * @return int The number of posts by the author.
    278331 */
     
    283336
    284337/**
    285  * Echo the number of posts by the author of the current post in the Loop.
    286  * @see get_the_author_posts()
    287  * @return null
     338 * the_author_posts() - Echo the number of posts by the author of the current post in the Loop.
     339 *
     340 * @since 0.71
     341 * @uses get_the_author_posts() Echos returned value from function.
    288342 */
    289343function the_author_posts() {
     
    292346
    293347/**
    294  * Echo an HTML link to the author page of the author of the current post in the Loop.
    295  * @global object $authordata The current author's DB object.
    296  * @see get_author_posts_url()
    297  * @see get_the_author()
    298  * @return null
    299  */
    300 /* the_author_posts_link() requires no get_, use get_author_posts_url() */
     348 * the_author_posts_link() - Echo an HTML link to the author page of the author of the current post in the Loop.
     349 *
     350 * Does just echo get_author_posts_url() function, like the others do. The reason for this,
     351 * is that another function is used to help in printing the link to the author's posts.
     352 *
     353 * @since 1.2
     354 * @uses $authordata The current author's DB object.
     355 * @uses get_author_posts_url()
     356 * @uses get_the_author()
     357 * @param string $deprecated Deprecated.
     358 */
    301359function the_author_posts_link($deprecated = '') {
    302360    global $authordata;
     
    310368
    311369/**
    312  * Get the URL to the author page of the author of the current post in the Loop.
    313  * @global object $wpdb WordPress database layer.
    314  * @global object $wp_rewrite WP_Rewrite
    315  * @global object $post The current post in the Loop's DB object.
     370 * get_author_posts_url() - Get the URL to the author page of the author of the current post in the Loop.
     371 *
     372 * @since 2.1
     373 * @uses $wp_rewrite WP_Rewrite
    316374 * @return string The URL to the author's page.
    317375 */
     
    340398
    341399/**
    342  * Get the specified author's preferred display name.
     400 * get_author_name() - Get the specified author's preferred display name.
     401 *
     402 * @since 1.0.1
    343403 * @param int $auth_id The ID of the author.
    344404 * @return string The author's display name.
     
    350410
    351411/**
    352  * List all the authors of the blog, with several options available.
     412 * wp_list_authors() - List all the authors of the blog, with several options available.
     413 *
    353414 * optioncount (boolean) (false): Show the count in parenthesis next to the author's name.
    354415 * exclude_admin (boolean) (true): Exclude the 'admin' user that is installed by default.
     
    358419 * feed_image (string) (''): If isn't empty, use this image to link to feeds.
    359420 * echo (boolean) (true): Set to false to return the output, instead of echoing.
     421 *
     422 * @since 1.2
    360423 * @param array $args The argument array.
    361424 * @return null|string The output, if echo is set to false.
     
    375438    $return = '';
    376439
    377     // TODO:  Move select to get_authors().
     440    /** @todo Move select to get_authors(). */
    378441    $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name");
    379442
Note: See TracChangeset for help on using the changeset viewer.