Changeset 7990
- Timestamp:
- 05/25/2008 03:45:05 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/author-template.php
r7104 r7990 2 2 /** 3 3 * 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 4 8 * 5 9 * @package WordPress … … 8 12 9 13 /** 10 * get_the_author() - Get the author of the current post in the Loop.14 * Retrieve the author of the current post. 11 15 * 12 16 * @since 1.5 … … 23 27 24 28 /** 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 also30 * 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. 34 38 * 35 39 * @since 0.71 36 40 * @see get_the_author() 41 * @link http://codex.wordpress.org/Template_Tags/the_author 37 42 * 38 43 * @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. 40 45 * @return string The author's display name, from get_the_author(). 41 46 */ … … 47 52 48 53 /** 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. 50 55 * 51 56 * @since 1.5 … … 59 64 60 65 /** 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 63 69 * @since 1.0.0 64 70 * @see get_the_author_description() … … 69 75 70 76 /** 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. 72 78 * 73 79 * @since 1.5 … … 81 87 82 88 /** 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 85 92 * @since 0.71 86 93 * @see get_the_author_login() … … 91 98 92 99 /** 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. 94 101 * 95 102 * @since 1.5 … … 103 110 104 111 /** 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 107 115 * @since 0.71 108 116 * @uses get_the_author_firstname() … … 113 121 114 122 /** 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. 116 124 * 117 125 * @since 1.5 … … 125 133 126 134 /** 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 129 138 * @since 0.71 130 139 * @uses get_the_author_lastname() … … 135 144 136 145 /** 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. 138 147 * 139 148 * @since 1.5 … … 147 156 148 157 /** 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 151 161 * @since 0.71 152 162 * @uses get_the_author_nickname() … … 157 167 158 168 /** 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. 160 170 * 161 171 * @since 1.5 … … 169 179 170 180 /** 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 173 184 * @since 0.71 174 185 * @uses get_the_author_ID() … … 179 190 180 191 /** 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. 182 193 * 183 194 * @since 1.5 … … 191 202 192 203 /** 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 195 207 * @since 0.71 196 208 * @uses get_the_author_email() … … 201 213 202 214 /** 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. 204 216 * 205 217 * @since 1.5 … … 217 229 218 230 /** 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 221 234 * @since 0.71 222 235 * @uses get_the_author_url() … … 227 240 228 241 /** 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 231 248 * @since 2.1 232 249 * @uses get_the_author_url() … … 242 259 243 260 /** 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. 245 262 * 246 263 * @since 1.5 … … 254 271 255 272 /** 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 258 276 * @since 0.71 259 277 * @see get_the_author_icq() … … 264 282 265 283 /** 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. 267 285 * 268 286 * @since 1.5 … … 276 294 277 295 /** 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 280 299 * @since 0.71 281 300 * @see get_the_author_aim() … … 286 305 287 306 /** 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. 289 308 * 290 309 * @since 1.5 … … 298 317 299 318 /** 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 302 322 * @since 0.71 303 323 * @see get_the_author_yim() … … 308 328 309 329 /** 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. 311 331 * 312 332 * @since 1.5 … … 320 340 321 341 /** 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 324 345 * @since 0.71 325 346 * @see get_the_author_msn() … … 330 351 331 352 /** 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. 333 354 * 334 355 * @since 1.5 … … 343 364 344 365 /** 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 347 369 * @since 0.71 348 370 * @uses get_the_author_posts() Echos returned value from function. … … 353 375 354 376 /** 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 360 384 * @since 1.2 361 385 * @uses $authordata The current author's DB object. … … 375 399 376 400 /** 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. 378 402 * 379 403 * @since 2.1 … … 405 429 406 430 /** 407 * get_author_name() - Getthe specified author's preferred display name.431 * Retrieve the specified author's preferred display name. 408 432 * 409 433 * @since 1.0.0 … … 417 441 418 442 /** 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. 423 449 * show_fullname (boolean) (false): Show their full names. 424 450 * hide_empty (boolean) (true): Don't show authors without any posts. … … 427 453 * echo (boolean) (true): Set to false to return the output, instead of echoing. 428 454 * 455 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors 429 456 * @since 1.2 430 457 * @param array $args The argument array. -
trunk/wp-includes/bookmark-template.php
r7911 r7990 8 8 9 9 /** 10 * _walk_bookmarks() -The formatted output of a list of bookmarks10 * The formatted output of a list of bookmarks 11 11 * 12 12 * The $bookmarks array must contain bookmark objects and will be iterated over 13 13 * to retrieve the bookmark to be used in the output. 14 14 * 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. 20 21 * 21 22 * 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. 28 35 * 'show_rating' - Default is 0 (integer). Whether to show the link rating. 29 36 * … … 114 121 115 122 /** 116 * wp_list_bookmarks() -Retrieve or echo all of the bookmarks123 * Retrieve or echo all of the bookmarks 117 124 * 118 125 * 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. 140 164 * 141 165 * 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 147 176 * 148 177 * @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 150 180 * @uses get_terms() Gets all of the categories that are for links. 151 181 * 152 182 * @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. 154 185 */ 155 186 function wp_list_bookmarks($args = '') { -
trunk/wp-includes/bookmark.php
r7193 r7990 8 8 9 9 /** 10 * get_bookmark() - GetBookmark data based on ID10 * Retrieve Bookmark data based on ID 11 11 * 12 12 * @since 2.1 … … 38 38 39 39 /** 40 * get_bookmark_field() - Getssingle bookmark data item or field.40 * Retrieve single bookmark data item or field. 41 41 * 42 42 * @since 2.3 … … 66 66 67 67 /** 68 * get_link() - Returnsbookmark data based on ID.68 * Retrieve bookmark data based on ID. 69 69 * 70 70 * @since 2.0 … … 81 81 82 82 /** 83 * get_bookmarks() -Retrieves the list of bookmarks83 * Retrieves the list of bookmarks 84 84 * 85 85 * Attempts to retrieve from the cache first based on MD5 hash of arguments. If … … 88 88 * 89 89 * 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. 99 108 * 100 109 * @since 2.1 101 110 * @uses $wpdb Database Object 111 * @link http://codex.wordpress.org/Template_Tags/get_bookmarks 102 112 * 103 113 * @param string|array $args List of arguments to overwrite the defaults … … 227 237 228 238 /** 229 * sanitize_bookmark() -Sanitizes all bookmark fields239 * Sanitizes all bookmark fields 230 240 * 231 241 * @since 2.3 232 242 * 233 243 * @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 235 246 * @return object|array Same type as $bookmark but with fields sanitized. 236 247 */ … … 255 266 256 267 /** 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. 269 281 * 270 282 * @since 2.3 … … 273 285 * @param mixed $value The bookmark field value 274 286 * @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' 276 289 * @return mixed The filtered value 277 290 */ … … 319 332 320 333 /** 321 * delete_get_bookmark_cache() -Deletes entire bookmark cache334 * Deletes entire bookmark cache 322 335 * 323 336 * @since 2.1 -
trunk/wp-includes/cache.php
r7986 r7990 2 2 /** 3 3 * Object Cache API 4 * 5 * @link http://codex.wordpress.org/Function_Reference/WP_Cache 4 6 * 5 7 * @package WordPress … … 8 10 9 11 /** 10 * wp_cache_add() - Adds data to the cache, if the cache key doesn't aleady exist12 * Adds data to the cache, if the cache key doesn't aleady exist. 11 13 * 12 14 * @since 2.0 … … 27 29 28 30 /** 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. 34 37 * 35 38 * @since 2.0 … … 42 45 43 46 /** 44 * wp_cache_delete() - Removes the cache contents matching ID and flag47 * Removes the cache contents matching ID and flag. 45 48 * 46 49 * @since 2.0 … … 59 62 60 63 /** 61 * wp_cache_flush() - Removes all cache items64 * Removes all cache items. 62 65 * 63 66 * @since 2.0 … … 74 77 75 78 /** 76 * wp_cache_get() - Retrieves the cache contents from the cache by ID and flag79 * Retrieves the cache contents from the cache by ID and flag. 77 80 * 78 81 * @since 2.0 … … 82 85 * @param int|string $id What the contents in the cache are called 83 86 * @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 85 89 */ 86 90 function wp_cache_get($id, $flag = '') { … … 91 95 92 96 /** 93 * wp_cache_init() - Sets up Object Cache Global and assigns it97 * Sets up Object Cache Global and assigns it. 94 98 * 95 99 * @since 2.0 … … 101 105 102 106 /** 103 * wp_cache_replace() - Replaces the contents of the cache with new data107 * Replaces the contents of the cache with new data. 104 108 * 105 109 * @since 2.0 … … 120 124 121 125 /** 122 * wp_cache_set() - Saves the data to the cache126 * Saves the data to the cache. 123 127 * 124 128 * @since 2.0 … … 139 143 140 144 /** 141 * wp_cache_add_global_groups() - Adds a group or set of groups to the list of global groups145 * Adds a group or set of groups to the list of global groups. 142 146 * 143 147 * @since 2.6 … … 151 155 152 156 /** 153 * wp_cache_add_non_persistent_groups() - Adds a group or set of groups to the list of non-persistent groups157 * Adds a group or set of groups to the list of non-persistent groups. 154 158 * 155 159 * @since 2.6 … … 165 169 * WordPress Object Cache 166 170 * 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 the169 * c ache contents available by using a key, which is used to name and170 * later retrievethe 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. If174 * that fileexists, 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. 175 179 * 176 180 * @package WordPress … … 220 224 * 221 225 * @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. 223 228 * 224 229 * @since 2.0 … … 243 248 * Remove the contents of the cache ID in the group 244 249 * 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 parameter247 * is set to falseby 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 250 255 * $non_existant_objects property in the class. 251 256 * … … 254 259 * @param int|string $id What the contents in the cache are called 255 260 * @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 257 263 * @return bool False if the contents weren't deleted and true on success 258 264 */ … … 285 291 * Retrieves the cache contents, if it exists 286 292 * 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) then289 * the contentsare returned.290 * 291 * On failure, the $non_existant_objects property is checked and if 292 * thecache group and ID exist in there the cache misses will not be293 * incremented. If not in the nonexistant objects property, then the 294 * cache misses will be incremented and the cache group and ID will295 * be added tothe 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. 296 302 * 297 303 * @since 2.0 … … 299 305 * @param int|string $id What the contents in the cache are called 300 306 * @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 302 309 */ 303 310 function get($id, $group = 'default') { … … 343 350 * Sets the data contents into the cache 344 351 * 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. 354 360 * 355 361 * @since 2.0 … … 379 385 * Echos the stats of the caching. 380 386 * 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. 383 389 * 384 390 * @since 2.0 … … 418 424 */ 419 425 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")); 421 431 } 422 432 -
trunk/wp-includes/canonical.php
r7916 r7990 3 3 * Canonical API to handle WordPress Redirecting 4 4 * 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 6 7 * 7 8 * @author Scott Yang … … 12 13 13 14 /** 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. 26 28 * 27 29 * @since 2.3 … … 29 31 * @uses $is_IIS 30 32 * 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. 32 35 * @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 34 38 */ 35 39 function redirect_canonical($requested_url=null, $do_redirect=true) { … … 212 216 213 217 /** 214 * redirect_guess_404_permalink() - Tries to guess correct post based on query vars218 * Attempts to guess correct post based on query vars 215 219 * 216 220 * @since 2.3 217 221 * @uses $wpdb 218 222 * 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. 220 225 */ 221 226 function redirect_guess_404_permalink() {
Note: See TracChangeset
for help on using the changeset viewer.