WordPress.org

Make WordPress Core

Changeset 7990


Ignore:
Timestamp:
05/25/08 15:45:05 (7 years ago)
Author:
ryan
Message:

phpdoc updates from jacobsantos. see #7038

Location:
trunk/wp-includes
Files:
5 edited

Legend:

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

    r7104 r7990  
    22/** 
    33 * Author Template functions for use in themes. 
     4 * 
     5 * These functions must be used within the WordPress Loop. 
     6 * 
     7 * @link http://codex.wordpress.org/Author_Templates 
    48 * 
    59 * @package WordPress 
     
    812 
    913/** 
    10  * get_the_author() - Get the author of the current post in the Loop. 
     14 * Retrieve the author of the current post. 
    1115 * 
    1216 * @since 1.5 
     
    2327 
    2428/** 
    25  * the_author() - Echo the name of the author of the current post in the Loop. 
    26  * 
    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(). 
    31  * 
    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. 
     29 * Display the name of the author of the current post. 
     30 * 
     31 * The behavior of this function is based off of old functionality predating 
     32 * get_the_author(). This function is not deprecated, but is designed to echo 
     33 * the value from get_the_author() and as an result of any old theme that might 
     34 * still use the old behavior will also pass the value from get_the_author(). 
     35 * 
     36 * The normal, expected behavior of this function is to echo the author and not 
     37 * return it. However, backwards compatiability has to be maintained. 
    3438 * 
    3539 * @since 0.71 
    3640 * @see get_the_author() 
     41 * @link http://codex.wordpress.org/Template_Tags/the_author 
    3742 * 
    3843 * @param string $deprecated Deprecated. 
    39  * @param string $deprecated_echo Echo the string or return it. Deprecated, use get_the_author(). 
     44 * @param string $deprecated_echo Echo the string or return it. 
    4045 * @return string The author's display name, from get_the_author(). 
    4146 */ 
     
    4752 
    4853/** 
    49  * get_the_author_description() - Get the description of the author of the current post in the Loop. 
     54 * Retrieve the description of the author of the current post. 
    5055 * 
    5156 * @since 1.5 
     
    5964 
    6065/** 
    61  * the_author_description() - Echo the description of the author of the current post in the Loop. 
    62  * 
     66 * Display the description of the author of the current post. 
     67 * 
     68 * @link http://codex.wordpress.org/Template_Tags/the_author_description 
    6369 * @since 1.0.0 
    6470 * @see get_the_author_description() 
     
    6975 
    7076/** 
    71  * get_the_author_login() - Get the login name of the author of the current post in the Loop. 
     77 * Retrieve the login name of the author of the current post. 
    7278 * 
    7379 * @since 1.5 
     
    8187 
    8288/** 
    83  * the_author_login() - Echo the login name of the author of the current post in the Loop. 
    84  * 
     89 * Display the login name of the author of the current post. 
     90 * 
     91 * @link http://codex.wordpress.org/Template_Tags/the_author_login 
    8592 * @since 0.71 
    8693 * @see get_the_author_login() 
     
    9198 
    9299/** 
    93  * get_the_author_firstname() - Get the first name of the author of the current post in the Loop. 
     100 * Retrieve the first name of the author of the current post. 
    94101 * 
    95102 * @since 1.5 
     
    103110 
    104111/** 
    105  * the_author_firstname() - Echo the first name of the author of the current post in the Loop. 
    106  * 
     112 * Display the first name of the author of the current post. 
     113 * 
     114 * @link http://codex.wordpress.org/Template_Tags/the_author_firstname 
    107115 * @since 0.71 
    108116 * @uses get_the_author_firstname() 
     
    113121 
    114122/** 
    115  * get_the_author_lastname() - Get the last name of the author of the current post in the Loop. 
     123 * Retrieve the last name of the author of the current post. 
    116124 * 
    117125 * @since 1.5 
     
    125133 
    126134/** 
    127  * the_author_lastname() - Echo the last name of the author of the current post in the Loop. 
    128  * 
     135 * Display the last name of the author of the current post. 
     136 * 
     137 * @link http://codex.wordpress.org/Template_Tags/the_author_lastname 
    129138 * @since 0.71 
    130139 * @uses get_the_author_lastname() 
     
    135144 
    136145/** 
    137  * get_the_author_nickname() - Get the nickname of the author of the current post in the Loop. 
     146 * Retrieve the nickname of the author of the current post. 
    138147 * 
    139148 * @since 1.5 
     
    147156 
    148157/** 
    149  * the_author_nickname() - Echo the nickname of the author of the current post in the Loop. 
    150  * 
     158 * Display the nickname of the author of the current post. 
     159 * 
     160 * @link http://codex.wordpress.org/Template_Tags/the_author_nickname 
    151161 * @since 0.71 
    152162 * @uses get_the_author_nickname() 
     
    157167 
    158168/** 
    159  * get_the_author_ID() - Get the ID of the author of the current post in the Loop. 
     169 * Retrieve the ID of the author of the current post. 
    160170 * 
    161171 * @since 1.5 
     
    169179 
    170180/** 
    171  * the_author_ID() - Echo the ID of the author of the current post in the Loop. 
    172  * 
     181 * Display the ID of the author of the current post. 
     182 * 
     183 * @http://codex.wordpress.org/Template_Tags/the_author_ID 
    173184 * @since 0.71 
    174185 * @uses get_the_author_ID() 
     
    179190 
    180191/** 
    181  * get_the_author_email() - Get the email of the author of the current post in the Loop. 
     192 * Retrieve the email of the author of the current post. 
    182193 * 
    183194 * @since 1.5 
     
    191202 
    192203/** 
    193  * the_author_email() - Echo the email of the author of the current post in the Loop. 
    194  * 
     204 * Display the email of the author of the current post. 
     205 * 
     206 * @link http://codex.wordpress.org/Template_Tags/the_author_email 
    195207 * @since 0.71 
    196208 * @uses get_the_author_email() 
     
    201213 
    202214/** 
    203  * get_the_author_url() - Get the URL to the home page of the author of the current post in the Loop. 
     215 * Retrieve the URL to the home page of the author of the current post. 
    204216 * 
    205217 * @since 1.5 
     
    217229 
    218230/** 
    219  * the_author_url() - Echo the URL to the home page of the author of the current post in the Loop. 
    220  * 
     231 * Display the URL to the home page of the author of the current post. 
     232 * 
     233 * @link http://codex.wordpress.org/Template_Tags/the_author_url 
    221234 * @since 0.71 
    222235 * @uses get_the_author_url() 
     
    227240 
    228241/** 
    229  * the_author_link() - If the author has a home page set, echo an HTML link, otherwise just echo the author's name. 
    230  * 
     242 * Display either author's link or author's name. 
     243 * 
     244 * If the author has a home page set, echo an HTML link, otherwise just echo the 
     245 * author's name. 
     246 * 
     247 * @link http://codex.wordpress.org/Template_Tags/the_author_link 
    231248 * @since 2.1 
    232249 * @uses get_the_author_url() 
     
    242259 
    243260/** 
    244  * get_the_author_icq() - Get the ICQ number of the author of the current post in the Loop. 
     261 * Retrieve the ICQ number of the author of the current post. 
    245262 * 
    246263 * @since 1.5 
     
    254271 
    255272/** 
    256  * the_author_icq() - Echo the ICQ number of the author of the current post in the Loop. 
    257  * 
     273 * Display the ICQ number of the author of the current post. 
     274 * 
     275 * @link http://codex.wordpress.org/Template_Tags/the_author_icq 
    258276 * @since 0.71 
    259277 * @see get_the_author_icq() 
     
    264282 
    265283/** 
    266  * get_the_author_aim() - Get the AIM name of the author of the current post in the Loop. 
     284 * Retrieve the AIM name of the author of the current post. 
    267285 * 
    268286 * @since 1.5 
     
    276294 
    277295/** 
    278  * the_author_aim() - Echo the AIM name of the author of the current post in the Loop. 
    279  * 
     296 * Display the AIM name of the author of the current post. 
     297 * 
     298 * @link http://codex.wordpress.org/Template_Tags/the_author_aim 
    280299 * @since 0.71 
    281300 * @see get_the_author_aim() 
     
    286305 
    287306/** 
    288  * get_the_author_yim() - Get the Yahoo! IM name of the author of the current post in the Loop. 
     307 * Retrieve the Yahoo! IM name of the author of the current post. 
    289308 * 
    290309 * @since 1.5 
     
    298317 
    299318/** 
    300  * the_author_yim() - Echo the Yahoo! IM name of the author of the current post in the Loop. 
    301  * 
     319 * Display the Yahoo! IM name of the author of the current post. 
     320 * 
     321 * @link http://codex.wordpress.org/Template_Tags/the_author_yim 
    302322 * @since 0.71 
    303323 * @see get_the_author_yim() 
     
    308328 
    309329/** 
    310  * get_the_author_msn() - Get the MSN address of the author of the current post in the Loop. 
     330 * Retrieve the MSN address of the author of the current post. 
    311331 * 
    312332 * @since 1.5 
     
    320340 
    321341/** 
    322  * the_author_msn() - Echo the MSN address of the author of the current post in the Loop. 
    323  * 
     342 * Display the MSN address of the author of the current post. 
     343 * 
     344 * @link http://codex.wordpress.org/Template_Tags/the_author_msn 
    324345 * @since 0.71 
    325346 * @see get_the_author_msn() 
     
    330351 
    331352/** 
    332  * get_the_author_posts() - Get the number of posts by the author of the current post in the Loop. 
     353 * Retrieve the number of posts by the author of the current post. 
    333354 * 
    334355 * @since 1.5 
     
    343364 
    344365/** 
    345  * the_author_posts() - Echo the number of posts by the author of the current post in the Loop. 
    346  * 
     366 * Display the number of posts by the author of the current post. 
     367 * 
     368 * @link http://codex.wordpress.org/Template_Tags/the_author_posts 
    347369 * @since 0.71 
    348370 * @uses get_the_author_posts() Echos returned value from function. 
     
    353375 
    354376/** 
    355  * the_author_posts_link() - Echo an HTML link to the author page of the author of the current post in the Loop. 
    356  * 
    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. 
    359  * 
     377 * Display an HTML link to the author page of the author of the current post. 
     378 * 
     379 * Does just echo get_author_posts_url() function, like the others do. The 
     380 * reason for this, is that another function is used to help in printing the 
     381 * link to the author's posts. 
     382 * 
     383 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link 
    360384 * @since 1.2 
    361385 * @uses $authordata The current author's DB object. 
     
    375399 
    376400/** 
    377  * get_author_posts_url() - Get the URL to the author page of the author of the current post in the Loop. 
     401 * Retrieve the URL to the author page of the author of the current post. 
    378402 * 
    379403 * @since 2.1 
     
    405429 
    406430/** 
    407  * get_author_name() - Get the specified author's preferred display name. 
     431 * Retrieve the specified author's preferred display name. 
    408432 * 
    409433 * @since 1.0.0 
     
    417441 
    418442/** 
    419  * wp_list_authors() - List all the authors of the blog, with several options available. 
    420  * 
    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. 
     443 * List all the authors of the blog, with several options available. 
     444 * 
     445 * optioncount (boolean) (false): Show the count in parenthesis next to the 
     446 *      author's name. 
     447 * exclude_admin (boolean) (true): Exclude the 'admin' user that is installed by 
     448 *      default. 
    423449 * show_fullname (boolean) (false): Show their full names. 
    424450 * hide_empty (boolean) (true): Don't show authors without any posts. 
     
    427453 * echo (boolean) (true): Set to false to return the output, instead of echoing. 
    428454 * 
     455 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors 
    429456 * @since 1.2 
    430457 * @param array $args The argument array. 
  • trunk/wp-includes/bookmark-template.php

    r7911 r7990  
    88 
    99/** 
    10  * _walk_bookmarks() - The formatted output of a list of bookmarks 
     10 * The formatted output of a list of bookmarks 
    1111 * 
    1212 * The $bookmarks array must contain bookmark objects and will be iterated over 
    1313 * to retrieve the bookmark to be used in the output. 
    1414 * 
    15  * The output is formatted as HTML with no way to change that format. However, what 
    16  * is between, before, and after can be changed. The link itself will be HTML. 
    17  * 
    18  * This function is used internally by wp_list_bookmarks() and should not be used by 
    19  * themes. 
     15 * The output is formatted as HTML with no way to change that format. However, 
     16 * what is between, before, and after can be changed. The link itself will be 
     17 * HTML. 
     18 * 
     19 * This function is used internally by wp_list_bookmarks() and should not be 
     20 * used by themes. 
    2021 * 
    2122 * The defaults for overwriting are: 
    22  * 'show_updated' - Default is 0 (integer). Will show the time of when the bookmark was last updated. 
    23  * 'show_description' - Default is 0 (integer). Whether to show the description of the bookmark. 
    24  * 'show_images' - Default is 1 (integer). Whether to show link image if available. 
    25  * 'before' - Default is '<li>' (string). The html or text to prepend to each bookmarks. 
    26  * 'after' - Default is '</li>' (string). The html or text to append to each bookmarks. 
    27  * 'between' - Default is '\n' (string). The string for use in between the link, description, and image. 
     23 * 'show_updated' - Default is 0 (integer). Will show the time of when the 
     24 *      bookmark was last updated. 
     25 * 'show_description' - Default is 0 (integer). Whether to show the description 
     26 *      of the bookmark. 
     27 * 'show_images' - Default is 1 (integer). Whether to show link image if 
     28 *      available. 
     29 * 'before' - Default is '<li>' (string). The html or text to prepend to each 
     30 *      bookmarks. 
     31 * 'after' - Default is '</li>' (string). The html or text to append to each 
     32 *      bookmarks. 
     33 * 'between' - Default is '\n' (string). The string for use in between the link, 
     34 *      description, and image. 
    2835 * 'show_rating' - Default is 0 (integer). Whether to show the link rating. 
    2936 * 
     
    114121 
    115122/** 
    116  * wp_list_bookmarks() - Retrieve or echo all of the bookmarks 
     123 * Retrieve or echo all of the bookmarks 
    117124 * 
    118125 * List of default arguments are as follows: 
    119  * 'orderby' - Default is 'name' (string). How to order the links by. String is based off of the bookmark scheme. 
    120  * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either ascending or descending order. 
    121  * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to display. 
    122  * 'category' - Default is empty string (string). Include the links in what category ID(s). 
    123  * 'category_name' - Default is empty string (string). Get links by category name. 
    124  * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide links marked as 'invisible'. 
    125  * 'show_updated' - Default is 0 (integer). Will show the time of when the bookmark was last updated. 
    126  * 'echo' - Default is 1 (integer). Whether to echo (default) or return the formatted bookmarks. 
    127  * 'categorize' - Default is 1 (integer). Whether to show links listed by category (default) or show links in one column. 
    128  * 
    129  * These options define how the Category name will appear before the category links are displayed, if 'categorize' is 1. 
    130  * If 'categorize' is 0, then it will display for only the 'title_li' string and only if 'title_li' is not empty. 
    131  * 'title_li' - Default is 'Bookmarks' (translatable string). What to show before the links appear. 
    132  * 'title_before' - Default is '<h2>' (string). The HTML or text to show before the 'title_li' string. 
    133  * 'title_after' - Default is '</h2>' (string). The HTML or text to show after the 'title_li' string. 
    134  * 'class' - Default is 'linkcat' (string). The CSS class to use for the 'title_li'. 
    135  * 
    136  * 'category_before' - Default is '<li id="%id" class="%class">'. String must contain '%id' and '%class' to get 
    137  * the id of the category and the 'class' argument. These are used for formatting in themes. Argument will be displayed 
    138  * before the 'title_before' argument. 
    139  * 'category_after' - Default is '</li>' (string). The HTML or text that will appear after the list of links. 
     126 * 'orderby' - Default is 'name' (string). How to order the links by. String is 
     127 *      based off of the bookmark scheme. 
     128 * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either 
     129 *      ascending or descending order. 
     130 * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to 
     131 *      display. 
     132 * 'category' - Default is empty string (string). Include the links in what 
     133 *      category ID(s). 
     134 * 'category_name' - Default is empty string (string). Get links by category 
     135 *      name. 
     136 * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide 
     137 *      links marked as 'invisible'. 
     138 * 'show_updated' - Default is 0 (integer). Will show the time of when the 
     139 *      bookmark was last updated. 
     140 * 'echo' - Default is 1 (integer). Whether to echo (default) or return the 
     141 *      formatted bookmarks. 
     142 * 'categorize' - Default is 1 (integer). Whether to show links listed by 
     143 *      category (default) or show links in one column. 
     144 * 
     145 * These options define how the Category name will appear before the category 
     146 * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will 
     147 * display for only the 'title_li' string and only if 'title_li' is not empty. 
     148 * 'title_li' - Default is 'Bookmarks' (translatable string). What to show 
     149 *      before the links appear. 
     150 * 'title_before' - Default is '<h2>' (string). The HTML or text to show before 
     151 *      the 'title_li' string. 
     152 * 'title_after' - Default is '</h2>' (string). The HTML or text to show after 
     153 *      the 'title_li' string. 
     154 * 'class' - Default is 'linkcat' (string). The CSS class to use for the 
     155 *      'title_li'. 
     156 * 
     157 * 'category_before' - Default is '<li id="%id" class="%class">'. String must 
     158 *      contain '%id' and '%class' to get 
     159 * the id of the category and the 'class' argument. These are used for 
     160 *      formatting in themes. 
     161 * Argument will be displayed before the 'title_before' argument. 
     162 * 'category_after' - Default is '</li>' (string). The HTML or text that will 
     163 *      appear after the list of links. 
    140164 * 
    141165 * These are only used if 'categorize' is set to 1 or true. 
    142  * 'category_orderby' - Default is 'name'. How to order the bookmark category based on term scheme. 
    143  * 'category_order' - Default is 'ASC'. Set the order by either ASC (ascending) or DESC (descending). 
    144  * 
    145  * @see _walk_bookmarks() For other arguments that can be set in this function and passed to _walk_bookmarks(). 
    146  * @see get_bookmarks() For other arguments that can be set in this function and passed to get_bookmarks(). 
     166 * 'category_orderby' - Default is 'name'. How to order the bookmark category 
     167 *      based on term scheme. 
     168 * 'category_order' - Default is 'ASC'. Set the order by either ASC (ascending) 
     169 *      or DESC (descending). 
     170 * 
     171 * @see _walk_bookmarks() For other arguments that can be set in this function 
     172 *      and passed to _walk_bookmarks(). 
     173 * @see get_bookmarks() For other arguments that can be set in this function and 
     174 *      passed to get_bookmarks(). 
     175 * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks 
    147176 * 
    148177 * @since 2.1 
    149  * @uses _list_bookmarks() Used to iterate over all of the bookmarks and return the html 
     178 * @uses _list_bookmarks() Used to iterate over all of the bookmarks and return 
     179 *      the html 
    150180 * @uses get_terms() Gets all of the categories that are for links. 
    151181 * 
    152182 * @param string|array $args Optional. Overwrite the defaults of the function 
    153  * @return string|null Will only return if echo option is set to not echo. Default is not return anything. 
     183 * @return string|null Will only return if echo option is set to not echo. 
     184 *      Default is not return anything. 
    154185 */ 
    155186function wp_list_bookmarks($args = '') { 
  • trunk/wp-includes/bookmark.php

    r7193 r7990  
    88 
    99/** 
    10  * get_bookmark() - Get Bookmark data based on ID 
     10 * Retrieve Bookmark data based on ID 
    1111 * 
    1212 * @since 2.1 
     
    3838 
    3939/** 
    40  * get_bookmark_field() - Gets single bookmark data item or field. 
     40 * Retrieve single bookmark data item or field. 
    4141 * 
    4242 * @since 2.3 
     
    6666 
    6767/** 
    68  * get_link() - Returns bookmark data based on ID. 
     68 * Retrieve bookmark data based on ID. 
    6969 * 
    7070 * @since 2.0 
     
    8181 
    8282/** 
    83  * get_bookmarks() - Retrieves the list of bookmarks 
     83 * Retrieves the list of bookmarks 
    8484 * 
    8585 * Attempts to retrieve from the cache first based on MD5 hash of arguments. If 
     
    8888 * 
    8989 * List of default arguments are as follows: 
    90  * 'orderby' - Default is 'name' (string). How to order the links by. String is based off of the bookmark scheme. 
    91  * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either ascending or descending order. 
    92  * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to display. 
    93  * 'category' - Default is empty string (string). Include the links in what category ID(s). 
    94  * 'category_name' - Default is empty string (string). Get links by category name. 
    95  * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide links marked as 'invisible'. 
    96  * 'show_updated' - Default is 0 (integer). Will show the time of when the bookmark was last updated. 
    97  * 'include' - Default is empty string (string). Include other categories separated by commas. 
    98  * 'exclude' - Default is empty string (string). Exclude other categories separated by commas. 
     90 * 'orderby' - Default is 'name' (string). How to order the links by. String is 
     91 *      based off of the bookmark scheme. 
     92 * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either 
     93 *      ascending or descending order. 
     94 * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to 
     95 *      display. 
     96 * 'category' - Default is empty string (string). Include the links in what 
     97 *      category ID(s). 
     98 * 'category_name' - Default is empty string (string). Get links by category 
     99 *      name. 
     100 * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide 
     101 *      links marked as 'invisible'. 
     102 * 'show_updated' - Default is 0 (integer). Will show the time of when the 
     103 *      bookmark was last updated. 
     104 * 'include' - Default is empty string (string). Include other categories 
     105 *      separated by commas. 
     106 * 'exclude' - Default is empty string (string). Exclude other categories 
     107 *      separated by commas. 
    99108 * 
    100109 * @since 2.1 
    101110 * @uses $wpdb Database Object 
     111 * @link http://codex.wordpress.org/Template_Tags/get_bookmarks 
    102112 * 
    103113 * @param string|array $args List of arguments to overwrite the defaults 
     
    227237 
    228238/** 
    229  * sanitize_bookmark() - Sanitizes all bookmark fields 
     239 * Sanitizes all bookmark fields 
    230240 * 
    231241 * @since 2.3 
    232242 * 
    233243 * @param object|array $bookmark Bookmark row 
    234  * @param string $context Optional, default is 'display'. How to filter the fields 
     244 * @param string $context Optional, default is 'display'. How to filter the 
     245 *      fields 
    235246 * @return object|array Same type as $bookmark but with fields sanitized. 
    236247 */ 
     
    255266 
    256267/** 
    257  * sanitize_bookmark_field() - Sanitizes a bookmark field 
    258  * 
    259  * Sanitizes the bookmark fields based on what the field name is. If the field has a 
    260  * strict value set, then it will be tested for that, else a more generic filtering is 
    261  * applied. After the more strict filter is applied, if the $context is 'raw' then the 
    262  * value is immediately return. 
    263  * 
    264  * Hooks exist for the more generic cases. With the 'edit' context, the 'edit_$field' 
    265  * filter will be called and passed the $value and $bookmark_id respectively. With the 
    266  * 'db' context, the 'pre_$field' filter is called and passed the value. The 'display' 
    267  * context is the final context and has the $field has the filter name and is passed the 
    268  * $value, $bookmark_id, and $context respectively. 
     268 * Sanitizes a bookmark field 
     269 * 
     270 * Sanitizes the bookmark fields based on what the field name is. If the field 
     271 * has a strict value set, then it will be tested for that, else a more generic 
     272 * filtering is applied. After the more strict filter is applied, if the 
     273 * $context is 'raw' then the value is immediately return. 
     274 * 
     275 * Hooks exist for the more generic cases. With the 'edit' context, the 
     276 * 'edit_$field' filter will be called and passed the $value and $bookmark_id 
     277 * respectively. With the 'db' context, the 'pre_$field' filter is called and 
     278 * passed the value. The 'display' context is the final context and has the 
     279 * $field has the filter name and is passed the $value, $bookmark_id, and 
     280 * $context respectively. 
    269281 * 
    270282 * @since 2.3 
     
    273285 * @param mixed $value The bookmark field value 
    274286 * @param int $bookmark_id Bookmark ID 
    275  * @param string $context How to filter the field value. Either 'raw', 'edit', 'attribute', 'js', 'db', or 'display' 
     287 * @param string $context How to filter the field value. Either 'raw', 'edit', 
     288 *      'attribute', 'js', 'db', or 'display' 
    276289 * @return mixed The filtered value 
    277290 */ 
     
    319332 
    320333/** 
    321  * delete_get_bookmark_cache() - Deletes entire bookmark cache 
     334 * Deletes entire bookmark cache 
    322335 * 
    323336 * @since 2.1 
  • trunk/wp-includes/cache.php

    r7986 r7990  
    22/** 
    33 * Object Cache API 
     4 * 
     5 * @link http://codex.wordpress.org/Function_Reference/WP_Cache 
    46 * 
    57 * @package WordPress 
     
    810 
    911/** 
    10  * wp_cache_add() - Adds data to the cache, if the cache key doesn't aleady exist 
     12 * Adds data to the cache, if the cache key doesn't aleady exist. 
    1113 * 
    1214 * @since 2.0 
     
    2729 
    2830/** 
    29  * wp_cache_close() - Closes the cache 
    30  * 
    31  * This function has ceased to do anything since WordPress 2.5. 
    32  * The functionality was removed along with the rest of the 
    33  * persistant cache. 
     31 * Closes the cache. 
     32 * 
     33 * This function has ceased to do anything since WordPress 2.5. The 
     34 * functionality was removed along with the rest of the persistant cache. This 
     35 * does not mean that plugins can't implement this function when they need to 
     36 * make sure that the cache is cleaned up after WordPress no longer needs it. 
    3437 * 
    3538 * @since 2.0 
     
    4245 
    4346/** 
    44  * wp_cache_delete() - Removes the cache contents matching ID and flag 
     47 * Removes the cache contents matching ID and flag. 
    4548 * 
    4649 * @since 2.0 
     
    5962 
    6063/** 
    61  * wp_cache_flush() - Removes all cache items 
     64 * Removes all cache items. 
    6265 * 
    6366 * @since 2.0 
     
    7477 
    7578/** 
    76  * wp_cache_get() - Retrieves the cache contents from the cache by ID and flag 
     79 * Retrieves the cache contents from the cache by ID and flag. 
    7780 * 
    7881 * @since 2.0 
     
    8285 * @param int|string $id What the contents in the cache are called 
    8386 * @param string $flag Where the cache contents are grouped 
    84  * @return bool|mixed False on failure to retrieve contents or the cache contents on success 
     87 * @return bool|mixed False on failure to retrieve contents or the cache 
     88 *      contents on success 
    8589 */ 
    8690function wp_cache_get($id, $flag = '') { 
     
    9195 
    9296/** 
    93  * wp_cache_init() - Sets up Object Cache Global and assigns it 
     97 * Sets up Object Cache Global and assigns it. 
    9498 * 
    9599 * @since 2.0 
     
    101105 
    102106/** 
    103  * wp_cache_replace() - Replaces the contents of the cache with new data 
     107 * Replaces the contents of the cache with new data. 
    104108 * 
    105109 * @since 2.0 
     
    120124 
    121125/** 
    122  * wp_cache_set() - Saves the data to the cache 
     126 * Saves the data to the cache. 
    123127 * 
    124128 * @since 2.0 
     
    139143 
    140144/** 
    141  * wp_cache_add_global_groups() - Adds a group or set of groups to the list of global groups 
     145 * Adds a group or set of groups to the list of global groups. 
    142146 * 
    143147 * @since 2.6 
     
    151155 
    152156/** 
    153  * wp_cache_add_non_persistent_groups() - Adds a group or set of groups to the list of non-persistent groups 
     157 * Adds a group or set of groups to the list of non-persistent groups. 
    154158 * 
    155159 * @since 2.6 
     
    165169 * WordPress Object Cache 
    166170 * 
    167  * The WordPress Object Cache is used to save on trips to the database. 
    168  * The Object Cache stores all of the cache data to memory and makes the 
    169  * cache contents available by using a key, which is used to name and 
    170  * later retrieve the cache contents. 
    171  * 
    172  * The Object Cache can be replaced by other caching mechanisms by placing 
    173  * files in the wp-content folder which is looked at in wp-settings. If 
    174  * that file exists, then this file will not be included. 
     171 * The WordPress Object Cache is used to save on trips to the database. The 
     172 * Object Cache stores all of the cache data to memory and makes the cache 
     173 * contents available by using a key, which is used to name and later retrieve 
     174 * the cache contents. 
     175 * 
     176 * The Object Cache can be replaced by other caching mechanisms by placing files 
     177 * in the wp-content folder which is looked at in wp-settings. If that file 
     178 * exists, then this file will not be included. 
    175179 * 
    176180 * @package WordPress 
     
    220224     * 
    221225     * @uses WP_Object_Cache::get Checks to see if the cache already has data. 
    222      * @uses WP_Object_Cache::set Sets the data after the checking the cache contents existance. 
     226     * @uses WP_Object_Cache::set Sets the data after the checking the cache 
     227     *      contents existance. 
    223228     * 
    224229     * @since 2.0 
     
    243248     * Remove the contents of the cache ID in the group 
    244249     * 
    245      * If the cache ID does not exist in the group and $force parameter 
    246      * is set to false, then nothing will happen. The $force parameter 
    247      * is set to false by default. 
    248      * 
    249      * On success the group and the id will be added to the 
     250     * If the cache ID does not exist in the group and $force parameter is set 
     251     * to false, then nothing will happen. The $force parameter is set to false 
     252     * by default. 
     253     * 
     254     * On success the group and the id will be added to the  
    250255     * $non_existant_objects property in the class. 
    251256     * 
     
    254259     * @param int|string $id What the contents in the cache are called 
    255260     * @param string $group Where the cache contents are grouped 
    256      * @param bool $force Optional. Whether to force the unsetting of the cache ID in the group 
     261     * @param bool $force Optional. Whether to force the unsetting of the cache 
     262     *      ID in the group 
    257263     * @return bool False if the contents weren't deleted and true on success 
    258264     */ 
     
    285291     * Retrieves the cache contents, if it exists 
    286292     * 
    287      * The contents will be first attempted to be retrieved by searching 
    288      * by the ID in the cache group. If the cache is hit (success) then 
    289      * the contents are returned. 
    290      * 
    291      * On failure, the $non_existant_objects property is checked and if 
    292      * the cache group and ID exist in there the cache misses will not be 
    293      * incremented. If not in the nonexistant objects property, then the 
    294      * cache misses will be incremented and the cache group and ID will 
    295      * be added to the nonexistant objects. 
     293     * The contents will be first attempted to be retrieved by searching by the 
     294     * ID in the cache group. If the cache is hit (success) then the contents 
     295     * are returned. 
     296     * 
     297     * On failure, the $non_existant_objects property is checked and if the 
     298     * cache group and ID exist in there the cache misses will not be 
     299     * incremented. If not in the nonexistant objects property, then the cache 
     300     * misses will be incremented and the cache group and ID will be added to 
     301     * the nonexistant objects. 
    296302     * 
    297303     * @since 2.0 
     
    299305     * @param int|string $id What the contents in the cache are called 
    300306     * @param string $group Where the cache contents are grouped 
    301      * @return bool|mixed False on failure to retrieve contents or the cache contents on success 
     307     * @return bool|mixed False on failure to retrieve contents or the cache 
     308     *      contents on success 
    302309     */ 
    303310    function get($id, $group = 'default') { 
     
    343350     * Sets the data contents into the cache 
    344351     * 
    345      * The cache contents is grouped by the $group parameter followed 
    346      * by the $id. This allows for duplicate ids in unique groups. 
    347      * Therefore, naming of the group should be used with care and 
    348      * should follow normal function naming guidelines outside of 
    349      * core WordPress usage. 
    350      * 
    351      * The $expire parameter is not used, because the cache will 
    352      * automatically expire for each time a page is accessed and PHP 
    353      * finishes. The method is more for cache plugins which use files. 
     352     * The cache contents is grouped by the $group parameter followed by the 
     353     * $id. This allows for duplicate ids in unique groups. Therefore, naming of 
     354     * the group should be used with care and should follow normal function 
     355     * naming guidelines outside of core WordPress usage. 
     356     * 
     357     * The $expire parameter is not used, because the cache will automatically 
     358     * expire for each time a page is accessed and PHP finishes. The method is 
     359     * more for cache plugins which use files. 
    354360     * 
    355361     * @since 2.0 
     
    379385     * Echos the stats of the caching. 
    380386     * 
    381      * Gives the cache hits, and cache misses. Also prints every cached 
    382      * group, key and the data. 
     387     * Gives the cache hits, and cache misses. Also prints every cached group, 
     388     * key and the data. 
    383389     * 
    384390     * @since 2.0 
     
    418424     */ 
    419425    function __construct() { 
    420         register_shutdown_function(array(&$this, "__destruct")); /** @todo This should be moved to the PHP4 style constructor, PHP5 already calls __destruct() */ 
     426        /** 
     427         * @todo This should be moved to the PHP4 style constructor, PHP5 
     428         * already calls __destruct() 
     429         */ 
     430        register_shutdown_function(array(&$this, "__destruct")); 
    421431    } 
    422432 
  • trunk/wp-includes/canonical.php

    r7916 r7990  
    33 * Canonical API to handle WordPress Redirecting 
    44 * 
    5  * Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference" by Mark Jaquith 
     5 * Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference" 
     6 * by Mark Jaquith 
    67 * 
    78 * @author Scott Yang 
     
    1213 
    1314/** 
    14  * redirect_canonical() - Redirects incoming links to the proper URL based on the site url 
    15  * 
    16  * Search engines consider www.somedomain.com and somedomain.com to be two different URLs 
    17  * when they both go to the same location. This SEO enhancement prevents penality for 
    18  * duplicate content by redirecting all incoming links to one or the other. 
    19  * 
    20  * Prevents redirection for feeds, trackbacks, searches, comment popup, and admin URLs. 
    21  * Does not redirect on IIS, page/post previews, and on form data. 
    22  * 
    23  * Will also attempt to find the correct link when a user enters a URL that does not exist 
    24  * based on exact WordPress query. Will instead try to parse the URL or query in an attempt 
    25  * to figure the correct page to go to. 
     15 * Redirects incoming links to the proper URL based on the site url 
     16 * 
     17 * Search engines consider www.somedomain.com and somedomain.com to be two 
     18 * different URLs when they both go to the same location. This SEO enhancement 
     19 * prevents penality for duplicate content by redirecting all incoming links to 
     20 * one or the other. 
     21 * 
     22 * Prevents redirection for feeds, trackbacks, searches, comment popup, and 
     23 * admin URLs. Does not redirect on IIS, page/post previews, and on form data. 
     24 * 
     25 * Will also attempt to find the correct link when a user enters a URL that does 
     26 * not exist based on exact WordPress query. Will instead try to parse the URL 
     27 * or query in an attempt to figure the correct page to go to. 
    2628 * 
    2729 * @since 2.3 
     
    2931 * @uses $is_IIS 
    3032 * 
    31  * @param string $requested_url Optional. The URL that was requested, used to figure if redirect is needed. 
     33 * @param string $requested_url Optional. The URL that was requested, used to 
     34 *      figure if redirect is needed. 
    3235 * @param bool $do_redirect Optional. Redirect to the new URL. 
    33  * @return null|false|string Null, if redirect not needed. False, if redirect not needed or the string of the URL 
     36 * @return null|false|string Null, if redirect not needed. False, if redirect 
     37 *      not needed or the string of the URL 
    3438 */ 
    3539function redirect_canonical($requested_url=null, $do_redirect=true) { 
     
    212216 
    213217/** 
    214  * redirect_guess_404_permalink() - Tries to guess correct post based on query vars 
     218 * Attempts to guess correct post based on query vars 
    215219 * 
    216220 * @since 2.3 
    217221 * @uses $wpdb 
    218222 * 
    219  * @return bool|string Returns False, if it can't find post, returns correct location on success. 
     223 * @return bool|string Returns False, if it can't find post, returns correct 
     224 *      location on success. 
    220225 */ 
    221226function redirect_guess_404_permalink() { 
Note: See TracChangeset for help on using the changeset viewer.