Ticket #7550: 7550.corrections.patch
File 7550.corrections.patch, 66.9 KB (added by , 15 years ago) |
---|
-
author-template.php
381 381 * link to the author's posts. 382 382 * 383 383 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link 384 * @since 1.2 384 * @since 1.2.0 385 385 * @uses $authordata The current author's DB object. 386 386 * @uses get_author_posts_url() 387 387 * @uses get_the_author() … … 400 400 /** 401 401 * Retrieve the URL to the author page of the author of the current post. 402 402 * 403 * @since 2.1 403 * @since 2.1.0 404 404 * @uses $wp_rewrite WP_Rewrite 405 405 * @return string The URL to the author's page. 406 406 */ … … 453 453 * echo (boolean) (true): Set to false to return the output, instead of echoing. 454 454 * 455 455 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors 456 * @since 1.2 456 * @since 1.2.0 457 457 * @param array $args The argument array. 458 458 * @return null|string The output, if echo is set to false. 459 459 */ -
bookmark-template.php
7 7 */ 8 8 9 9 /** 10 * The formatted output of a list of bookmarks 10 * 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. … … 34 34 * description, and image. 35 35 * 'show_rating' - Default is 0 (integer). Whether to show the link rating. 36 36 * 37 * @since 2.1 37 * @since 2.1.0 38 38 * @access private 39 39 * @usedby wp_list_bookmarks() 40 40 * … … 120 120 } 121 121 122 122 /** 123 * Retrieve or echo all of the bookmarks 123 * Retrieve or echo all of the bookmarks. 124 124 * 125 125 * List of default arguments are as follows: 126 126 * 'orderby' - Default is 'name' (string). How to order the links by. String is … … 174 174 * passed to get_bookmarks(). 175 175 * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks 176 176 * 177 * @since 2.1 177 * @since 2.1.0 178 178 * @uses _list_bookmarks() Used to iterate over all of the bookmarks and return 179 179 * the html 180 180 * @uses get_terms() Gets all of the categories that are for links. -
bookmark.php
9 9 /** 10 10 * Retrieve Bookmark data based on ID 11 11 * 12 * @since 2.1 12 * @since 2.1.0 13 13 * @uses $wpdb Database Object 14 14 * 15 15 * @param int $bookmark_id … … 39 39 /** 40 40 * Retrieve single bookmark data item or field. 41 41 * 42 * @since 2.3 42 * @since 2.3.0 43 43 * @uses get_bookmark() Gets bookmark object using $bookmark as ID 44 44 * @uses sanitize_bookmark_field() Sanitizes Bookmark field based on $context. 45 45 * … … 67 67 /** 68 68 * Retrieve bookmark data based on ID. 69 69 * 70 * @since 2.0 70 * @since 2.0.0 71 71 * @deprecated Use get_bookmark() 72 72 * @see get_bookmark() 73 73 * … … 106 106 * 'exclude' - Default is empty string (string). Exclude other categories 107 107 * separated by commas. 108 108 * 109 * @since 2.1 109 * @since 2.1.0 110 110 * @uses $wpdb Database Object 111 111 * @link http://codex.wordpress.org/Template_Tags/get_bookmarks 112 112 * … … 238 238 /** 239 239 * Sanitizes all bookmark fields 240 240 * 241 * @since 2.3 241 * @since 2.3.0 242 242 * 243 243 * @param object|array $bookmark Bookmark row 244 244 * @param string $context Optional, default is 'display'. How to filter the … … 279 279 * $field has the filter name and is passed the $value, $bookmark_id, and 280 280 * $context respectively. 281 281 * 282 * @since 2.3 282 * @since 2.3.0 283 283 * 284 284 * @param string $field The bookmark field 285 285 * @param mixed $value The bookmark field value … … 333 333 /** 334 334 * Deletes entire bookmark cache 335 335 * 336 * @since 2.1 336 * @since 2.1.0 337 337 * @uses wp_cache_delete() Deletes the contents of 'get_bookmarks' 338 338 */ 339 339 function delete_get_bookmark_cache() { -
cache.php
11 11 /** 12 12 * Adds data to the cache, if the cache key doesn't aleady exist. 13 13 * 14 * @since 2.0 14 * @since 2.0.0 15 15 * @uses $wp_object_cache Object Cache Class 16 16 * @see WP_Object_Cache::add() 17 17 * … … 35 35 * does not mean that plugins can't implement this function when they need to 36 36 * make sure that the cache is cleaned up after WordPress no longer needs it. 37 37 * 38 * @since 2.0 38 * @since 2.0.0 39 39 * 40 40 * @return bool Always returns True 41 41 */ … … 46 46 /** 47 47 * Removes the cache contents matching ID and flag. 48 48 * 49 * @since 2.0 49 * @since 2.0.0 50 50 * @uses $wp_object_cache Object Cache Class 51 51 * @see WP_Object_Cache::delete() 52 52 * … … 63 63 /** 64 64 * Removes all cache items. 65 65 * 66 * @since 2.0 66 * @since 2.0.0 67 67 * @uses $wp_object_cache Object Cache Class 68 68 * @see WP_Object_Cache::flush() 69 69 * … … 78 78 /** 79 79 * Retrieves the cache contents from the cache by ID and flag. 80 80 * 81 * @since 2.0 81 * @since 2.0.0 82 82 * @uses $wp_object_cache Object Cache Class 83 83 * @see WP_Object_Cache::get() 84 84 * … … 96 96 /** 97 97 * Sets up Object Cache Global and assigns it. 98 98 * 99 * @since 2.0 99 * @since 2.0.0 100 100 * @global WP_Object_Cache $wp_object_cache WordPress Object Cache 101 101 */ 102 102 function wp_cache_init() { … … 106 106 /** 107 107 * Replaces the contents of the cache with new data. 108 108 * 109 * @since 2.0 109 * @since 2.0.0 110 110 * @uses $wp_object_cache Object Cache Class 111 111 * @see WP_Object_Cache::replace() 112 112 * … … 144 144 /** 145 145 * Adds a group or set of groups to the list of global groups. 146 146 * 147 * @since 2.6 147 * @since 2.6.0 148 148 * 149 149 * @param string|array $groups A group or an array of groups to add 150 150 */ … … 156 156 /** 157 157 * Adds a group or set of groups to the list of non-persistent groups. 158 158 * 159 * @since 2.6 159 * @since 2.6.0 160 160 * 161 161 * @param string|array $groups A group or an array of groups to add 162 162 */ … … 188 188 * 189 189 * @var array 190 190 * @access private 191 * @since 2.0 191 * @since 2.0.0 192 192 */ 193 193 var $cache = array (); 194 194 … … 197 197 * 198 198 * @var array 199 199 * @access private 200 * @since 2.0 200 * @since 2.0.0 201 201 */ 202 202 var $non_existant_objects = array (); 203 203 204 204 /** 205 205 * The amount of times the cache data was already stored in the cache. 206 206 * 207 * @since 2.5 207 * @since 2.5.0 208 208 * @access private 209 209 * @var int 210 210 */ … … 215 215 * 216 216 * @var int 217 217 * @access public 218 * @since 2.0 218 * @since 2.0.0 219 219 */ 220 220 var $cache_misses = 0; 221 221 … … 226 226 * @uses WP_Object_Cache::set Sets the data after the checking the cache 227 227 * contents existance. 228 228 * 229 * @since 2.0 229 * @since 2.0.0 230 230 * 231 231 * @param int|string $id What to call the contents in the cache 232 232 * @param mixed $data The contents to store in the cache … … 254 254 * On success the group and the id will be added to the 255 255 * $non_existant_objects property in the class. 256 256 * 257 * @since 2.0 257 * @since 2.0.0 258 258 * 259 259 * @param int|string $id What the contents in the cache are called 260 260 * @param string $group Where the cache contents are grouped … … 277 277 /** 278 278 * Clears the object cache of all data 279 279 * 280 * @since 2.0 280 * @since 2.0.0 281 281 * 282 282 * @return bool Always returns true 283 283 */ … … 300 300 * misses will be incremented and the cache group and ID will be added to 301 301 * the nonexistant objects. 302 302 * 303 * @since 2.0 303 * @since 2.0.0 304 304 * 305 305 * @param int|string $id What the contents in the cache are called 306 306 * @param string $group Where the cache contents are grouped … … 327 327 /** 328 328 * Replace the contents in the cache, if contents already exist 329 329 * 330 * @since 2.0 330 * @since 2.0.0 331 331 * @see WP_Object_Cache::set() 332 332 * 333 333 * @param int|string $id What to call the contents in the cache … … 358 358 * expire for each time a page is accessed and PHP finishes. The method is 359 359 * more for cache plugins which use files. 360 360 * 361 * @since 2.0 361 * @since 2.0.0 362 362 * 363 363 * @param int|string $id What to call the contents in the cache 364 364 * @param mixed $data The contents to store in the cache … … 387 387 * Gives the cache hits, and cache misses. Also prints every cached group, 388 388 * key and the data. 389 389 * 390 * @since 2.0 390 * @since 2.0.0 391 391 */ 392 392 function stats() { 393 393 echo "<p>"; … … 408 408 /** 409 409 * PHP4 constructor; Calls PHP 5 style constructor 410 410 * 411 * @since 2.0 411 * @since 2.0.0 412 412 * 413 413 * @return WP_Object_Cache 414 414 */ -
canonical.php
8 8 * @author Scott Yang 9 9 * @author Mark Jaquith 10 10 * @package WordPress 11 * @since 2.3 11 * @since 2.3.0 12 12 */ 13 13 14 14 /** 15 * Redirects incoming links to the proper URL based on the site url 15 * Redirects incoming links to the proper URL based on the site url. 16 16 * 17 17 * Search engines consider www.somedomain.com and somedomain.com to be two 18 18 * different URLs when they both go to the same location. This SEO enhancement … … 26 26 * not exist based on exact WordPress query. Will instead try to parse the URL 27 27 * or query in an attempt to figure the correct page to go to. 28 28 * 29 * @since 2.3 29 * @since 2.3.0 30 30 * @uses $wp_rewrite 31 31 * @uses $is_IIS 32 32 * … … 241 241 } 242 242 243 243 /** 244 * Attempts to guess correct post based on query vars 244 * Attempts to guess correct post based on query vars. 245 245 * 246 * @since 2.3 246 * @since 2.3.0 247 247 * @uses $wpdb 248 248 * 249 249 * @return bool|string Returns False, if it can't find post, returns correct -
category.php
65 65 * 66 66 * The category will converted to maintain backwards compatibility. 67 67 * 68 * @since 2.1.068 * @since 1.5.1 69 69 * @uses get_term() Used to get the category data from the taxonomy. 70 70 * 71 71 * @param int|object $category Category ID or Category row object -
deprecated.php
1 1 <?php 2 2 /** 3 * Deprecated functions from past WordPress versions 3 * Deprecated functions from past WordPress versions. You shouldn't use these 4 * globals and functions and look for the alternatives instead. The functions 5 * and globals will be removed in a later version. 6 * 4 7 * @package WordPress 5 8 * @subpackage Deprecated 6 9 */ … … 76 79 */ 77 80 78 81 /** 79 * get_postdata() - Entire Post data82 * Entire Post data. 80 83 * 81 84 * @since 0.71 82 85 * @deprecated Use get_post() … … 112 115 } 113 116 114 117 /** 115 * start_wp() - Sets up the WordPress Loop118 * Sets up the WordPress Loop. 116 119 * 117 120 * @since 1.0.1 118 121 * @deprecated Since 1.5 - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop} … … 129 132 } 130 133 131 134 /** 132 * the_category_ID() - Return or Print Category ID135 * Return or Print Category ID. 133 136 * 134 137 * @since 0.71 135 138 * @deprecated use get_the_category() … … 152 155 } 153 156 154 157 /** 155 * the_category_head() - Print category with optional text before and after158 * Print category with optional text before and after. 156 159 * 157 160 * @since 0.71 158 161 * @deprecated use get_the_category_by_ID() … … 178 181 } 179 182 180 183 /** 181 * previous_post() - Prints link to the previous post184 * Prints link to the previous post. 182 185 * 183 186 * @since 1.5 184 187 * @deprecated Use previous_post_link() … … 214 217 } 215 218 216 219 /** 217 * next_post() - Prints link to the next post220 * Prints link to the next post. 218 221 * 219 222 * @since 0.71 220 223 * @deprecated Use next_post_link() … … 249 252 } 250 253 251 254 /** 252 * user_can_create_post() - Whether user can create a post255 * Whether user can create a post. 253 256 * 254 257 * @since 1.5 255 258 * @deprecated Use current_user_can() … … 268 271 } 269 272 270 273 /** 271 * user_can_create_draft() - Whether user can create a post274 * Whether user can create a post. 272 275 * 273 276 * @since 1.5 274 277 * @deprecated Use current_user_can() … … 287 290 } 288 291 289 292 /** 290 * user_can_edit_post() - Whether user can edit a post293 * Whether user can edit a post. 291 294 * 292 295 * @since 1.5 293 296 * @deprecated Use current_user_can() … … 315 318 } 316 319 317 320 /** 318 * user_can_delete_post() - Whether user can delete a post321 * Whether user can delete a post. 319 322 * 320 323 * @since 1.5 321 324 * @deprecated Use current_user_can() … … 334 337 } 335 338 336 339 /** 337 * user_can_set_post_date() - Whether user can set new posts' dates340 * Whether user can set new posts' dates. 338 341 * 339 342 * @since 1.5 340 343 * @deprecated Use current_user_can() … … 352 355 return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id)); 353 356 } 354 357 355 /* returns true if $user_id can edit $post_id's date */356 358 /** 357 * user_can_edit_post_date() - Whether user can delete a post359 * Whether user can delete a post. 358 360 * 359 361 * @since 1.5 360 362 * @deprecated Use current_user_can() … … 363 365 * @param int $user_id 364 366 * @param int $post_id 365 367 * @param int $blog_id Not Used 366 * @return bool 368 * @return bool returns true if $user_id can edit $post_id's date 367 369 */ 368 370 function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) { 369 371 _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); … … 372 374 return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id)); 373 375 } 374 376 375 /* returns true if $user_id can edit $post_id's comments */376 377 /** 377 * user_can_edit_post_comments() - Whether user can delete a post378 * Whether user can delete a post. 378 379 * 379 380 * @since 1.5 380 381 * @deprecated Use current_user_can() … … 383 384 * @param int $user_id 384 385 * @param int $post_id 385 386 * @param int $blog_id Not Used 386 * @return bool 387 * @return bool returns true if $user_id can edit $post_id's comments 387 388 */ 388 389 function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { 389 390 _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); … … 392 393 return user_can_edit_post($user_id, $post_id, $blog_id); 393 394 } 394 395 395 /* returns true if $user_id can delete $post_id's comments */396 396 /** 397 * user_can_delete_post_comments() - Whether user can delete a post397 * Whether user can delete a post. 398 398 * 399 399 * @since 1.5 400 400 * @deprecated Use current_user_can() … … 403 403 * @param int $user_id 404 404 * @param int $post_id 405 405 * @param int $blog_id Not Used 406 * @return bool 406 * @return bool returns true if $user_id can delete $post_id's comments 407 407 */ 408 408 function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { 409 409 _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); … … 413 413 } 414 414 415 415 /** 416 * user_can_edit_user() - Can user can edit other user416 * Can user can edit other user. 417 417 * 418 418 * @since 1.5 419 419 * @deprecated Use current_user_can() … … 435 435 } 436 436 437 437 /** 438 * get_linksbyname() -Gets the links associated with category $cat_name.438 * Gets the links associated with category $cat_name. 439 439 * 440 440 * @since 0.71 441 441 * @deprecated Use get_links() 442 442 * @see get_links() 443 443 * 444 * @param string $cat_nameOptional. The category name to use. If no match is found uses all.445 * @param string $beforeOptional. The html to output before the link.446 * @param string $afterOptional. The html to output after the link.447 * @param string $betweenOptional. The html to output between the link/image and it's description. Not used if no image or $show_images is true.448 * @param bool 449 * @param string $orderbyOptional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.444 * @param string $cat_name Optional. The category name to use. If no match is found uses all. 445 * @param string $before Optional. The html to output before the link. 446 * @param string $after Optional. The html to output after the link. 447 * @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. 448 * @param bool $show_images Optional. Whether to show images (if defined). 449 * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. 450 450 * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a 451 451 * random order. 452 * @param bool 453 * @param bool 454 * @param int 455 * @param int 452 * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined. 453 * @param bool $show_rating Optional. Show rating stars/chars. 454 * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown. 455 * @param int $show_updated Optional. Whether to show last updated timestamp 456 456 */ 457 457 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', 458 458 $show_description = true, $show_rating = false, … … 468 468 } 469 469 470 470 /** 471 * wp_get_linksbyname() -Gets the links associated with the named category.471 * Gets the links associated with the named category. 472 472 * 473 473 * @since 1.0.1 474 474 * @deprecated Use wp_get_links() … … 491 491 } 492 492 493 493 /** 494 * get_linkobjectsbyname() -Gets an array of link objects associated with category $cat_name.494 * Gets an array of link objects associated with category $cat_name. 495 495 * 496 496 * <code> 497 497 * $links = get_linkobjectsbyname('fred'); … … 523 523 } 524 524 525 525 /** 526 * get_linkobjects() -Gets an array of link objects associated with category n.526 * Gets an array of link objects associated with category n. 527 527 * 528 528 * Usage: 529 529 * <code> … … 577 577 } 578 578 579 579 /** 580 * get_linksbyname_withrating() -Gets the links associated with category 'cat_name' and display rating stars/chars.580 * Gets the links associated with category 'cat_name' and display rating stars/chars. 581 581 * 582 582 * @since 0.71 583 583 * @deprecated Use get_bookmarks() … … 604 604 } 605 605 606 606 /** 607 * get_links_withrating() -Gets the links associated with category n and display rating stars/chars.607 * Gets the links associated with category n and display rating stars/chars. 608 608 * 609 609 * @since 0.71 610 610 * @deprecated Use get_bookmarks() … … 631 631 } 632 632 633 633 /** 634 * get_autotoggle() - Gets the auto_toggle setting634 * Gets the auto_toggle setting. 635 635 * 636 636 * @since 0.71 637 637 * @deprecated No alternative function available … … 793 793 } 794 794 795 795 /** 796 * wp_set_post_cats() -Sets the categories that the post id belongs to.796 * Sets the categories that the post id belongs to. 797 797 * 798 798 * @since 1.0.1 799 799 * @deprecated Use wp_set_post_categories() … … 829 829 } 830 830 831 831 /** 832 * get_author_link() - Returns or Prints link to the author's posts832 * Returns or Prints link to the author's posts. 833 833 * 834 834 * @since 1.2 835 835 * @deprecated Use get_author_posts_url() … … 851 851 } 852 852 853 853 /** 854 * link_pages() - Print list of pages based on arguments854 * Print list of pages based on arguments. 855 855 * 856 856 * @since 0.71 857 857 * @deprecated Use wp_link_pages() … … 875 875 } 876 876 877 877 /** 878 * get_settings() - Get value based on option878 * Get value based on option. 879 879 * 880 880 * @since 0.71 881 881 * @deprecated Use get_option() … … 891 891 } 892 892 893 893 /** 894 * permalink_link() - Print the permalink of the current post in the loop894 * Print the permalink of the current post in the loop. 895 895 * 896 896 * @since 0.71 897 897 * @deprecated Use the_permalink() … … 903 903 } 904 904 905 905 /** 906 * permalink_single_rss() - Print the permalink to the RSS feed906 * Print the permalink to the RSS feed. 907 907 * 908 908 * @since 0.71 909 909 * @deprecated Use the_permalink_rss() … … 917 917 } 918 918 919 919 /** 920 * wp_get_links() -Gets the links associated with category.920 * Gets the links associated with category. 921 921 * 922 922 * @see get_links() for argument information that can be used in $args 923 923 * @since 1.0.1 … … 951 951 } 952 952 953 953 /** 954 * get_links() -Gets the links associated with category by id.954 * Gets the links associated with category by id. 955 955 * 956 956 * @since 0.71 957 957 * @deprecated Use get_bookmarks() … … 1056 1056 } 1057 1057 1058 1058 /** 1059 * get_links_list() - Output entire list of links by category1059 * Output entire list of links by category. 1060 1060 * 1061 * Output a list of all links, listed by category, using the 1062 * settings in $wpdb->linkcategories and output it as a nested 1063 * HTML unordered list. 1061 * Output a list of all links, listed by category, using the settings in 1062 * $wpdb->linkcategories and output it as a nested HTML unordered list. 1064 1063 * 1065 1064 * @author Dougal 1066 1065 * @since 1.0.1 … … 1104 1103 } 1105 1104 1106 1105 /** 1107 * links_popup_script() - Show the link to the links popup and the number of links1106 * Show the link to the links popup and the number of links. 1108 1107 * 1109 1108 * @author Fullo 1110 1109 * @link http://sprite.csr.unibo.it/fullo/ … … 1148 1147 } 1149 1148 1150 1149 /** 1151 * get_linkcatname() -Gets the name of category by id.1150 * Gets the name of category by id. 1152 1151 * 1153 1152 * @since 0.71 1154 1153 * @deprecated Use get_category() … … 1177 1176 } 1178 1177 1179 1178 /** 1180 * comment_rss_link() - Print RSS comment feed link1179 * Print RSS comment feed link. 1181 1180 * 1182 1181 * @since 1.0.1 1183 1182 * @deprecated Use post_comments_feed_link() … … 1192 1191 } 1193 1192 1194 1193 /** 1195 * get_category_rss_link() - Print/Return link to category RSS2 feed1194 * Print/Return link to category RSS2 feed. 1196 1195 * 1197 1196 * @since 1.2 1198 1197 * @deprecated Use get_category_feed_link() … … 1214 1213 } 1215 1214 1216 1215 /** 1217 * get_author_rss_link() - Print/Return link to author RSS feed1216 * Print/Return link to author RSS feed. 1218 1217 * 1219 1218 * @since 1.2 1220 1219 * @deprecated Use get_author_feed_link() … … 1235 1234 } 1236 1235 1237 1236 /** 1238 * comments_rss() - Return link to the post RSS feed1237 * Return link to the post RSS feed. 1239 1238 * 1240 1239 * @since 1.5 1241 1240 * @deprecated Use get_post_comments_feed_link() … … 1250 1249 } 1251 1250 1252 1251 /** 1253 * create_user() - An alias of wp_create_user(). 1252 * An alias of wp_create_user(). 1253 * 1254 1254 * @param string $username The user's username. 1255 1255 * @param string $password The user's password. 1256 1256 * @param string $email The user's email (optional). … … 1264 1264 } 1265 1265 1266 1266 /** 1267 * documentation_link() - Unused Admin function 1267 * Unused Admin function. 1268 * 1268 1269 * @since 2.0 1269 1270 * @param string $deprecated Unknown 1270 1271 * @deprecated 2.5 … … 1275 1276 } 1276 1277 1277 1278 /** 1278 * gzip_compression() - Unused function1279 * Unused function. 1279 1280 * 1280 1281 * @deprecated 2.5 1281 1282 */ 1282 1283 1283 function gzip_compression() { 1284 1284 return false; 1285 1285 } … … 1304 1304 return get_comment($comment_ID, ARRAY_A); 1305 1305 } 1306 1306 1307 ?> 1308 No newline at end of file 1307 ?> -
kses.php
24 24 */ 25 25 26 26 /** 27 * You can override this in your my-hacks.php file 28 * You can also override this in a plugin file. The 29 * my-hacks.php is deprecated in its usage. 27 * You can override this in your my-hacks.php file You can also override this 28 * in a plugin file. The my-hacks.php is deprecated in its usage. 30 29 * 31 30 * @since 1.2.0 32 31 */ … … 35 34 36 35 if (!CUSTOM_TAGS) { 37 36 /** 38 * Kses global for default allowable HTML tags 37 * Kses global for default allowable HTML tags. 39 38 * 40 * Can be override by using CUSTOM_TAGS constant 39 * Can be override by using CUSTOM_TAGS constant. 40 * 41 41 * @global array $allowedposttags 42 42 * @since 2.0.0 43 43 */ … … 281 281 'style' => array (), 282 282 'type' => array ()), 283 283 'var' => array ()); 284 284 285 /** 285 * Kses allowed HTML elements 286 * Kses allowed HTML elements. 286 287 * 287 288 * @global array $allowedtags 288 289 * @since 1.0.0 … … 323 324 } 324 325 325 326 /** 326 * wp_kses() -Filters content and keeps only allowable HTML elements.327 * Filters content and keeps only allowable HTML elements. 327 328 * 328 * This function makes sure that only the allowed HTML element names, 329 * attribute names and attribute values plus only sane HTML entities330 * will occur in $string. You have to remove any slashes from PHP's331 * magic quotes before youcall this function.329 * This function makes sure that only the allowed HTML element names, attribute 330 * names and attribute values plus only sane HTML entities will occur in 331 * $string. You have to remove any slashes from PHP's magic quotes before you 332 * call this function. 332 333 * 333 * The default allowed protocols are 'http', 'https', 'ftp', 'mailto', 334 * ' news', 'irc', 'gopher', 'nntp', 'feed', and finally 'telnet. This335 * covers all common link protocols, except for 'javascript' which336 * should not be allowed foruntrusted users.334 * The default allowed protocols are 'http', 'https', 'ftp', 'mailto', 'news', 335 * 'irc', 'gopher', 'nntp', 'feed', and finally 'telnet. This covers all common 336 * link protocols, except for 'javascript' which should not be allowed for 337 * untrusted users. 337 338 * 338 339 * @since 1.0.0 339 340 * … … 352 353 } 353 354 354 355 /** 355 * wp_kses_hook() -You add any kses hooks here.356 * You add any kses hooks here. 356 357 * 357 * There is currently only one kses WordPress hook and it is 358 * called here. All parameters are passed to the hooks and 359 * expected to recieve a string. 358 * There is currently only one kses WordPress hook and it is called here. All 359 * parameters are passed to the hooks and expected to recieve a string. 360 360 * 361 361 * @since 1.0.0 362 362 * … … 371 371 } 372 372 373 373 /** 374 * wp_kses_version() -This function returns kses' version number.374 * This function returns kses' version number. 375 375 * 376 376 * @since 1.0.0 377 377 * 378 * @return string Version Number378 * @return string KSES Version Number 379 379 */ 380 380 function wp_kses_version() { 381 381 return '0.2.2'; 382 382 } 383 383 384 384 /** 385 * wp_kses_split() - Searches for HTML tags, no matter how malformed385 * Searches for HTML tags, no matter how malformed. 386 386 * 387 387 * It also matches stray ">" characters. 388 388 * … … 399 399 } 400 400 401 401 /** 402 * wp_kses_split2() - Callback for wp_kses_split for fixing malformed HTML tags402 * Callback for wp_kses_split for fixing malformed HTML tags. 403 403 * 404 * This function does a lot of work. It rejects some very malformed things 405 * like <:::>. It returns an empty string, if the element isn't allowed (look406 * ma, no strip_tags()!). Otherwise it splits the tag into an element and an407 * attributelist.404 * This function does a lot of work. It rejects some very malformed things like 405 * <:::>. It returns an empty string, if the element isn't allowed (look ma, no 406 * strip_tags()!). Otherwise it splits the tag into an element and an attribute 407 * list. 408 408 * 409 409 * After the tag is split into an element and an attribute list, it is run 410 * through another filter which will remove illegal attributes and once 411 * that iscompleted, will be returned.410 * through another filter which will remove illegal attributes and once that is 411 * completed, will be returned. 412 412 * 413 413 * @access private 414 414 * @since 1.0.0 … … 460 460 } 461 461 462 462 /** 463 * wp_kses_attr() - Removes all attributes, if none are allowed for this element463 * Removes all attributes, if none are allowed for this element. 464 464 * 465 465 * If some are allowed it calls wp_kses_hair() to split them further, and then 466 466 * it builds up new HTML code from the data that kses_hair() returns. It also 467 * removes "<" and ">" characters, if there are any left. One more thing it 468 * does is to check if the tag has a closing XHTML slash, and if it does, it469 * puts onein the returned code as well.467 * removes "<" and ">" characters, if there are any left. One more thing it does 468 * is to check if the tag has a closing XHTML slash, and if it does, it puts one 469 * in the returned code as well. 470 470 * 471 471 * @since 1.0.0 472 472 * … … 531 531 } 532 532 533 533 /** 534 * wp_kses_hair() -Builds an attribute list from string containing attributes.534 * Builds an attribute list from string containing attributes. 535 535 * 536 536 * This function does a lot of work. It parses an attribute list into an array 537 537 * with attribute data, and tries to do the right thing even if it gets weird … … 660 660 } 661 661 662 662 /** 663 * wp_kses_check_attr_val() -Performs different checks for attribute values.663 * Performs different checks for attribute values. 664 664 * 665 665 * The currently implemented checks are "maxlen", "minlen", "maxval", "minval" 666 666 * and "valueless" with even more checks to come soon. … … 732 732 } 733 733 734 734 /** 735 * wp_kses_bad_protocol() - Sanitize string from bad protocols735 * Sanitize string from bad protocols. 736 736 * 737 * This function removes all non-allowed protocols from the beginning 738 * of $string. It ignores whitespace and the case of the letters, and739 * it does understand HTML entities. It does its work in a while loop,740 * so it won't befooled by a string like "javascript:javascript:alert(57)".737 * This function removes all non-allowed protocols from the beginning of 738 * $string. It ignores whitespace and the case of the letters, and it does 739 * understand HTML entities. It does its work in a while loop, so it won't be 740 * fooled by a string like "javascript:javascript:alert(57)". 741 741 * 742 742 * @since 1.0.0 743 743 * … … 759 759 } 760 760 761 761 /** 762 * wp_kses_no_null() -Removes any NULL characters in $string.762 * Removes any NULL characters in $string. 763 763 * 764 764 * @since 1.0.0 765 765 * … … 774 774 } 775 775 776 776 /** 777 * wp_kses_stripslashes() - Strips slashes from in front of quotes777 * Strips slashes from in front of quotes. 778 778 * 779 * This function changes the character sequence \" to just " 780 * It leaves all other slashes alone. It's really weird, but the781 * quoting frompreg_replace(//e) seems to require this.779 * This function changes the character sequence \" to just ". It leaves all 780 * other slashes alone. It's really weird, but the quoting from 781 * preg_replace(//e) seems to require this. 782 782 * 783 783 * @since 1.0.0 784 784 * … … 790 790 } 791 791 792 792 /** 793 * wp_kses_array_lc() -Goes through an array and changes the keys to all lower case.793 * Goes through an array and changes the keys to all lower case. 794 794 * 795 795 * @since 1.0.0 796 796 * … … 814 814 } 815 815 816 816 /** 817 * wp_kses_js_entities() -Removes the HTML JavaScript entities found in early versions of Netscape 4.817 * Removes the HTML JavaScript entities found in early versions of Netscape 4. 818 818 * 819 819 * @since 1.0.0 820 820 * … … 826 826 } 827 827 828 828 /** 829 * wp_kses_html_error() - Handles parsing errors in wp_kses_hair()829 * Handles parsing errors in wp_kses_hair(). 830 830 * 831 * The general plan is to remove everything to and including some 832 * whitespace,but it deals with quotes and apostrophes as well.831 * The general plan is to remove everything to and including some whitespace, 832 * but it deals with quotes and apostrophes as well. 833 833 * 834 834 * @since 1.0.0 835 835 * … … 841 841 } 842 842 843 843 /** 844 * wp_kses_bad_protocol_once() - Sanitizes content from bad protocols and other characters844 * Sanitizes content from bad protocols and other characters. 845 845 * 846 * This function searches for URL protocols at the beginning of $string, 847 * whilehandling whitespace and HTML entities.846 * This function searches for URL protocols at the beginning of $string, while 847 * handling whitespace and HTML entities. 848 848 * 849 849 * @since 1.0.0 850 850 * … … 866 866 } 867 867 868 868 /** 869 * wp_kses_bad_protocol_once2() -Callback for wp_kses_bad_protocol_once() regular expression.869 * Callback for wp_kses_bad_protocol_once() regular expression. 870 870 * 871 871 * This function processes URL protocols, checks to see if they're in the 872 872 * white-list or not, and returns different data depending on the answer. … … 910 910 } 911 911 912 912 /** 913 * wp_kses_normalize_entities() - Converts and fixes HTML entities913 * Converts and fixes HTML entities. 914 914 * 915 * This function normalizes HTML entities. It will convert "AT&T" to the 916 * correct "AT&T", ":" to ":", "&#XYZZY;" to "&#XYZZY;" 917 * and so on. 915 * This function normalizes HTML entities. It will convert "AT&T" to the correct 916 * "AT&T", ":" to ":", "&#XYZZY;" to "&#XYZZY;" and so on. 918 917 * 919 918 * @since 1.0.0 920 919 * … … 936 935 } 937 936 938 937 /** 939 * wp_kses_normalize_entities2() - Callback for wp_kses_normalize_entities() regular expression938 * Callback for wp_kses_normalize_entities() regular expression. 940 939 * 941 * This function helps wp_kses_normalize_entities() to only accept 16 bit 942 * valuesand nothing more for &#number; entities.940 * This function helps wp_kses_normalize_entities() to only accept 16 bit values 941 * and nothing more for &#number; entities. 943 942 * 944 943 * @access private 945 944 * @since 1.0.0 … … 956 955 } 957 956 958 957 /** 959 * wp_kses_normalize_entities3() - Callback for wp_kses_normalize_entities() for regular expression958 * Callback for wp_kses_normalize_entities() for regular expression. 960 959 * 961 * This function helps wp_kses_normalize_entities() to only accept valid Unicode numeric entities962 * in hex form.960 * This function helps wp_kses_normalize_entities() to only accept valid Unicode 961 * numeric entities in hex form. 963 962 * 964 963 * @access private 965 964 * … … 975 974 } 976 975 977 976 /** 978 * valid_unicode() -Helper function to determine if a Unicode value is valid.977 * Helper function to determine if a Unicode value is valid. 979 978 * 980 979 * @param int $i Unicode value 981 980 * @return bool true if the value was a valid Unicode number … … 988 987 } 989 988 990 989 /** 991 * wp_kses_decode_entities() -Convert all entities to their character counterparts.990 * Convert all entities to their character counterparts. 992 991 * 993 * This function decodes numeric HTML entities (A and A). It 994 * doesn't do anything with other entities like ä, but we don't need995 * them in the URLprotocol whitelisting system anyway.992 * This function decodes numeric HTML entities (A and A). It doesn't do 993 * anything with other entities like ä, but we don't need them in the URL 994 * protocol whitelisting system anyway. 996 995 * 997 996 * @since 1.0.0 998 997 * … … 1007 1006 } 1008 1007 1009 1008 /** 1010 * wp_filter_kses() - Sanitize content with allowed HTML Kses rules1009 * Sanitize content with allowed HTML Kses rules. 1011 1010 * 1012 1011 * @since 1.0.0 1013 1012 * @uses $allowedtags … … 1021 1020 } 1022 1021 1023 1022 /** 1024 * wp_filter_post_kses() - Sanitize content for allowed HTML tags for post content1023 * Sanitize content for allowed HTML tags for post content. 1025 1024 * 1026 * Post content refers to the page contents of the 'post' type and not 1027 * $_POSTdata from forms.1025 * Post content refers to the page contents of the 'post' type and not $_POST 1026 * data from forms. 1028 1027 * 1029 1028 * @since 2.0.0 1030 1029 * @uses $allowedposttags … … 1038 1037 } 1039 1038 1040 1039 /** 1041 * wp_filter_nohtml_kses() - Strips all of the HTML in the content1040 * Strips all of the HTML in the content. 1042 1041 * 1043 1042 * @since 2.1.0 1044 1043 * … … 1050 1049 } 1051 1050 1052 1051 /** 1053 * kses_init_filters() - Adds all Kses input form content filters1052 * Adds all Kses input form content filters. 1054 1053 * 1055 * All hooks have default priority. The wp_filter_kses() fucntion 1056 * is added to the 'pre_comment_content' and 'title_save_pre' 1057 * hooks. The wp_filter_post_kses() function is added to the 1058 * 'content_save_pre', 'excerpt_save_pre', and 'content_filtered_save_pre' 1059 * hooks. 1054 * All hooks have default priority. The wp_filter_kses() function is added to 1055 * the 'pre_comment_content' and 'title_save_pre' hooks. 1060 1056 * 1057 * The wp_filter_post_kses() function is added to the 'content_save_pre', 1058 * 'excerpt_save_pre', and 'content_filtered_save_pre' hooks. 1059 * 1061 1060 * @since 2.0.0 1062 1061 * @uses add_filter() See description for what functions are added to what hooks. 1063 1062 */ … … 1073 1072 } 1074 1073 1075 1074 /** 1076 * kses_remove_filters() - Removes all Kses input form content filters1075 * Removes all Kses input form content filters. 1077 1076 * 1078 * A quick procedural method to removing all of the filters 1079 * that kses uses forcontent in WordPress Loop.1077 * A quick procedural method to removing all of the filters that kses uses for 1078 * content in WordPress Loop. 1080 1079 * 1081 * Does not remove the kses_init() function from 'init' hook 1082 * (priority is default). Also does not remove kses_init() 1083 * function from 'set_current_user' hook (priority is also 1084 * default). 1080 * Does not remove the kses_init() function from 'init' hook (priority is 1081 * default). Also does not remove kses_init() function from 'set_current_user' 1082 * hook (priority is also default). 1085 1083 * 1086 1084 * @since 2.0.6 1087 1085 */ … … 1097 1095 } 1098 1096 1099 1097 /** 1100 * kses_init() - Sets up most of the Kses filters for input form content1098 * Sets up most of the Kses filters for input form content. 1101 1099 * 1102 1100 * If you remove the kses_init() function from 'init' hook and 1103 * 'set_current_user' (priority is default), then none of the 1104 * Kses filter hookswill be added.1101 * 'set_current_user' (priority is default), then none of the Kses filter hooks 1102 * will be added. 1105 1103 * 1106 * First removes all of the Kses filters in case the current user 1107 * does not need to have Kses filter the content. If the user does1108 * not have unfiltered htmlcapability, then Kses filters are added.1104 * First removes all of the Kses filters in case the current user does not need 1105 * to have Kses filter the content. If the user does not have unfiltered html 1106 * capability, then Kses filters are added. 1109 1107 * 1110 1108 * @uses kses_remove_filters() Removes the Kses filters 1111 1109 * @uses kses_init_filters() Adds the Kses filters back if the user … … 1121 1119 1122 1120 add_action('init', 'kses_init'); 1123 1121 add_action('set_current_user', 'kses_init'); 1124 ?> 1122 1123 ?> 1124 No newline at end of file -
l10n.php
7 7 */ 8 8 9 9 /** 10 * get_locale() - Gets the current locale10 * Gets the current locale. 11 11 * 12 * If the locale is set, then it will filter the locale 13 * in the 'locale' filterhook and return the value.12 * If the locale is set, then it will filter the locale in the 'locale' filter 13 * hook and return the value. 14 14 * 15 * If the locale is not set already, then the WPLANG 16 * constant is used if it is defined. Then it is filtered 17 * through the 'locale' filter hook and the value for the 18 * locale global set and the locale is returned. 15 * If the locale is not set already, then the WPLANG constant is used if it is 16 * defined. Then it is filtered through the 'locale' filter hook and the value 17 * for the locale global set and the locale is returned. 19 18 * 20 * The process to get the locale should only be done once 21 * but the locale will always be filtered using the 22 * 'locale' hook. 19 * The process to get the locale should only be done once but the locale will 20 * always be filtered using the 'locale' hook. 23 21 * 24 22 * @since 1.5.0 25 * @uses apply_filters() Calls 'locale' hook on locale value 26 * @uses $locale Gets the locale stored in the global 23 * @uses apply_filters() Calls 'locale' hook on locale value. 24 * @uses $locale Gets the locale stored in the global. 27 25 * 28 * @return string The locale of the blog or from the 'locale' hook 26 * @return string The locale of the blog or from the 'locale' hook. 29 27 */ 30 28 function get_locale() { 31 29 global $locale; … … 46 44 } 47 45 48 46 /** 49 * translate() - Retrieve the translated text47 * Retrieve the translated text. 50 48 * 51 * If the domain is set in the $l10n global, then the text is run 52 * through the domain's translate method. After it is passed to 53 * the 'gettext' filter hook, along with the untranslated text as 54 * the second parameter. 49 * If the domain is set in the $l10n global, then the text is run through the 50 * domain's translate method. After it is passed to the 'gettext' filter hook, 51 * along with the untranslated text as the second parameter. 55 52 * 56 53 * If the domain is not set, the $text is just returned. 57 54 * 58 55 * @since 2.2.0 59 * @uses $l10n Gets list of domain translated string (gettext_reader) objects 56 * @uses $l10n Gets list of domain translated string (gettext_reader) objects. 60 57 * @uses apply_filters() Calls 'gettext' on domain translated text 61 * with the untranslated text as second parameter 58 * with the untranslated text as second parameter. 62 59 * 63 * @param string $text Text to translate 64 * @param string $domain Domain to retrieve the translated text 60 * @param string $text Text to translate. 61 * @param string $domain Domain to retrieve the translated text. 65 62 * @return string Translated text 66 63 */ 67 64 function translate($text, $domain = 'default') { … … 74 71 } 75 72 76 73 /** 77 * translate_with_context() - Retrieve the translated text and strip context74 * Retrieve the translated text and strip context. 78 75 * 79 * If the domain is set in the $l10n global, then the text is run 80 * through the domain's translate method. After it is passed to 81 * the 'gettext' filter hook, along with the untranslated text as 82 * the second parameter. 76 * If the domain is set in the $l10n global, then the text is run through the 77 * domain's translate method. After it is passed to the 'gettext' filter hook, 78 * along with the untranslated text as the second parameter. 83 79 * 84 80 * If the domain is not set, the $text is just returned. 85 81 * … … 101 97 } 102 98 103 99 /** 104 * __() - Retrieve a translated string100 * Retrieves the translated string from the translate(). 105 101 * 106 * __() is a convenience function which retrieves the translated107 * string from the translate().108 *109 102 * @see translate() An alias of translate() 110 103 * @since 2.1.0 111 104 * … … 117 110 return translate($text, $domain); 118 111 } 119 112 120 // .121 113 /** 122 * _e() - Display a translated string114 * Displays the returned translated text from translate(). 123 115 * 124 * _e() is a convenience function which displays the returned125 * translated text from translate().126 *127 116 * @see translate() Echos returned translate() string 128 117 * @since 1.2.0 129 118 * … … 135 124 } 136 125 137 126 /** 138 * _c() - Retrieve context translated string127 * Retrieve context translated string. 139 128 * 140 * Quite a few times, there will be collisions with similar 141 * translatable text found in more than two places but with 142 * different translated context. 129 * Quite a few times, there will be collisions with similar translatable text 130 * found in more than two places but with different translated context. 143 131 * 144 * In order to use the separate contexts, the _c() function 145 * is used and the translatable string uses a pipe ('|') 146 * which has the context the string is in. 132 * In order to use the separate contexts, the _c() function is used and the 133 * translatable string uses a pipe ('|') which has the context the string is in. 147 134 * 148 * When the translated string is returned, it is everything 149 * before the pipe, not including the pipe character. If 150 * there is no pipe in the translated text then everything 151 * is returned. 135 * When the translated string is returned, it is everything before the pipe, not 136 * including the pipe character. If there is no pipe in the translated text then 137 * everything is returned. 152 138 * 153 139 * @since 2.2.0 154 140 * … … 161 147 } 162 148 163 149 /** 164 * __ngettext() - Retrieve the plural or single form based on the amount150 * Retrieve the plural or single form based on the amount. 165 151 * 166 * If the domain is not set in the $l10n list, then a comparsion 167 * will be madeand either $plural or $single parameters returned.152 * If the domain is not set in the $l10n list, then a comparsion will be made 153 * and either $plural or $single parameters returned. 168 154 * 169 * If the domain does exist, then the parameters $single, $plural, 170 * and $number will first be passed to the domain's ngettext method.171 * Then it will be passed to the 'ngettext' filter hook along with172 * t he same parameters. The expected type will be a string.155 * If the domain does exist, then the parameters $single, $plural, and $number 156 * will first be passed to the domain's ngettext method. Then it will be passed 157 * to the 'ngettext' filter hook along with the same parameters. The expected 158 * type will be a string. 173 159 * 174 160 * @since 1.2.0 175 161 * @uses $l10n Gets list of domain translated string (gettext_reader) objects … … 196 182 } 197 183 198 184 /** 199 * __ngettext_noop() - register plural strings in POT file, but don't translate them185 * Register plural strings in POT file, but don't translate them. 200 186 * 201 187 * Used when you want do keep structures with translatable plural strings and 202 188 * use them later. … … 222 208 } 223 209 224 210 /** 225 * load_textdomain() - Loads MO file into the list of domains211 * Loads MO file into the list of domains. 226 212 * 227 * If the domain already exists, the inclusion will fail. If the 228 * MO file is notreadable, the inclusion will fail.213 * If the domain already exists, the inclusion will fail. If the MO file is not 214 * readable, the inclusion will fail. 229 215 * 230 * On success, the mofile will be placed in the $l10n global by 231 * $domain and willbe an gettext_reader object.216 * On success, the mofile will be placed in the $l10n global by $domain and will 217 * be an gettext_reader object. 232 218 * 233 219 * @since 1.5.0 234 220 * @uses $l10n Gets list of domain translated string (gettext_reader) objects … … 260 246 } 261 247 262 248 /** 263 * load_default_textdomain() - Loads default translated strings based on locale249 * Loads default translated strings based on locale. 264 250 * 265 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root. 266 * Thetranslated (.mo) file is named based off of the locale.251 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The 252 * translated (.mo) file is named based off of the locale. 267 253 * 268 254 * @since 1.5.0 269 255 */ … … 276 262 } 277 263 278 264 /** 279 * load_plugin_textdomain() - Loads the plugin's translated strings265 * Loads the plugin's translated strings. 280 266 * 281 * If the path is not given then it will be the root of the plugin 282 * directory. The .mo file should be named based on the domain witha283 * dash followed by a dash, and then the locale exactly.267 * If the path is not given then it will be the root of the plugin directory. 268 * The .mo file should be named based on the domain with a dash followed by a 269 * dash, and then the locale exactly. 284 270 * 285 271 * @since 1.5.0 286 272 * … … 304 290 } 305 291 306 292 /** 307 * load_theme_textdomain() - Includes theme's translated strings for the theme293 * Loads the theme's translated strings. 308 294 * 309 295 * If the current locale exists as a .mo file in the theme's root directory, it 310 296 * will be included in the translated strings by the $domain. … … 322 308 load_textdomain($domain, $mofile); 323 309 } 324 310 325 ?> 311 ?> 312 No newline at end of file -
locale.php
7 7 */ 8 8 9 9 /** 10 * {@internal Missing Short Description}}10 * Class that loads the calendar locale. 11 11 * 12 * {@internal Missing Long Description}}13 *14 12 * @since 2.1.0 15 13 */ 16 14 class WP_Locale { -
plugin.php
11 11 * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'} 12 12 * type are valid. 13 13 * 14 * Also see the {@link http://codex.wordpress.org/Plugin_API Plugin API} for more information15 * and examples on how to use a lot of these functions.14 * Also see the {@link http://codex.wordpress.org/Plugin_API Plugin API} for 15 * more information and examples on how to use a lot of these functions. 16 16 * 17 17 * @package WordPress 18 18 * @subpackage Plugin … … 27 27 * can specify that one or more of its PHP functions is executed to 28 28 * modify specific types of text at these times, using the Filter API. 29 29 * 30 * To use the API, the following code should be used to bind a callback to the filter 30 * To use the API, the following code should be used to bind a callback to the 31 * filter. 32 * 31 33 * <code> 32 34 * function example_hook($example) { echo $example; } 33 *34 35 * add_filter('example_filter', 'example_hook'); 35 36 * </code> 36 37 * 37 * In WordPress 1.5.1+, hooked functions can take extra arguments that are set when 38 * the matching do_action() or apply_filters() call is run. The <tt>$accepted_args 39 * allow for calling functions only when the number of args match. Hooked functions 40 * can take extra arguments that are set when the matching <tt>do_action()</tt> or 41 * <tt>apply_filters()</tt> call is run. For example, the action <tt>comment_id_not_found</tt> 42 * will pass any functions that hook onto it the ID of the requested comment. 38 * In WordPress 1.5.1+, hooked functions can take extra arguments that are set 39 * when the matching do_action() or apply_filters() call is run. The 40 * $accepted_args allow for calling functions only when the number of args 41 * match. Hooked functions can take extra arguments that are set when the 42 * matching do_action() or apply_filters() call is run. For example, the action 43 * comment_id_not_found will pass any functions that hook onto it the ID of the 44 * requested comment. 43 45 * 44 * <strong>Note:</strong> the function will return true no matter if the function was hooked 45 * fails or not. There are no checks for whether the function exists beforehand and no checks 46 * to whether the <tt>$function_to_add is even a string. It is up to you to take care and 47 * this is done for optimization purposes, so everything is as quick as possible. 46 * <strong>Note:</strong> the function will return true no matter if the 47 * function was hooked fails or not. There are no checks for whether the 48 * function exists beforehand and no checks to whether the <tt>$function_to_add 49 * is even a string. It is up to you to take care and this is done for 50 * optimization purposes, so everything is as quick as possible. 48 51 * 49 52 * @package WordPress 50 53 * @subpackage Plugin … … 53 56 * wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)]'] 54 57 * @global array $merged_filters Tracks the tags that need to be merged for later. If the hook is added, it doesn't need to run through that process. 55 58 * 56 * @param string $tag The name of the filter to hook the <tt>$function_to_add</tt>to.59 * @param string $tag The name of the filter to hook the $function_to_add to. 57 60 * @param callback $function_to_add The name of the function to be called when the filter is applied. 58 61 * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. 59 62 * @param int $accepted_args optional. The number of arguments the function accept (default 1). … … 101 104 /** 102 105 * Call the functions added to a filter hook. 103 106 * 104 * The callback functions attached to filter hook <tt>$tag</tt> are invoked by105 * calling this function. This function can be used to create a new filter hook106 * bysimply calling this function with the name of the new hook specified using107 * the <tt>$tag</a>parameter.107 * The callback functions attached to filter hook $tag are invoked by calling 108 * this function. This function can be used to create a new filter hook by 109 * simply calling this function with the name of the new hook specified using 110 * the $tag parameter. 108 111 * 109 112 * The function allows for additional arguments to be added and passed to hooks. 110 113 * <code> … … 232 235 } 233 236 234 237 /** 235 * Ret urnthe name of the current filter or action.238 * Retrieve the name of the current filter or action. 236 239 * 237 240 * @package WordPress 238 241 * @subpackage Plugin … … 260 263 * @subpackage Plugin 261 264 * @since 1.2 262 265 * 263 * @param string $tag The name of the action to which the <tt>$function_to-add</tt>is hooked.266 * @param string $tag The name of the action to which the $function_to_add is hooked. 264 267 * @param callback $function_to_add The name of the function you wish to be called. 265 268 * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. 266 269 * @param int $accepted_args optional. The number of arguments the function accept (default 1). … … 273 276 /** 274 277 * Execute functions hooked on a specific action hook. 275 278 * 276 * This function invokes all functions attached to action hook <tt>$tag</tt>.277 * It ispossible to create new action hooks by simply calling this function,279 * This function invokes all functions attached to action hook $tag. It is 280 * possible to create new action hooks by simply calling this function, 278 281 * specifying the name of the new hook using the <tt>$tag</tt> parameter. 279 282 * 280 * You can pass extra arguments to the hooks, much like you can with apply_filters(). 283 * You can pass extra arguments to the hooks, much like you can with 284 * apply_filters(). 281 285 * 282 * @see apply_filters() This function works similar with the exception that nothing is283 * returned and only the functions or methods are called.286 * @see apply_filters() This function works similar with the exception that 287 * nothing is returned and only the functions or methods are called. 284 288 * 285 289 * @package WordPress 286 290 * @subpackage Plugin … … 340 344 } 341 345 342 346 /** 343 * Ret urnthe number times an action is fired.347 * Retrieve the number times an action is fired. 344 348 * 345 349 * @package WordPress 346 350 * @subpackage Plugin … … 362 366 /** 363 367 * Execute functions hooked on a specific action hook, specifying arguments in an array. 364 368 * 365 * @see do_action() This function is identical, but the arguments passed to 366 * thefunctions hooked to <tt>$tag</tt> are supplied using an array.369 * @see do_action() This function is identical, but the arguments passed to the 370 * functions hooked to <tt>$tag</tt> are supplied using an array. 367 371 * 368 372 * @package WordPress 369 373 * @subpackage Plugin … … 498 502 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is 499 503 * activated. In the name of this hook, PLUGINNAME is replaced with the name of 500 504 * the plugin, including the optional subdirectory. For example, when the plugin 501 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the502 * name of this hook will become 'activate_sampleplugin/sample.php'503 * When the pluginconsists of only one file and is (as by default) located at504 * <tt>wp-content/plugin/sample.php</tt>the name of this hook will be505 * is located in wp-content/plugin/sampleplugin/sample.php, then the name of 506 * this hook will become 'activate_sampleplugin/sample.php'. When the plugin 507 * consists of only one file and is (as by default) located at 508 * wp-content/plugin/sample.php the name of this hook will be 505 509 * 'activate_sample.php'. 506 510 * 507 511 * @package WordPress … … 524 528 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is 525 529 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name 526 530 * of the plugin, including the optional subdirectory. For example, when the 527 * plugin is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then531 * plugin is located in wp-content/plugin/sampleplugin/sample.php, then 528 532 * the name of this hook will become 'activate_sampleplugin/sample.php'. 529 533 * 530 534 * When the plugin consists of only one file and is (as by default) located at 531 * <tt>wp-content/plugin/sample.php</tt>the name of this hook will be535 * wp-content/plugin/sample.php the name of this hook will be 532 536 * 'activate_sample.php'. 533 537 * 534 538 * @package WordPress … … 631 635 * 632 636 * @package WordPress 633 637 * @subpackage Plugin 638 * @access private 634 639 * @since 2.2.3 635 *636 640 * @link http://trac.wordpress.org/ticket/3875 637 641 * 638 * @access private639 *640 642 * @global array $wp_filter Storage for all of the filters and actions 641 643 * @param string $tag Used in counting how many hooks were applied 642 644 * @param string|array $function Used for creating unique id -
rss.php
387 387 require_once( dirname(__FILE__) . '/class-snoopy.php'); 388 388 389 389 if ( !function_exists('fetch_rss') ) : 390 /** 391 * Build Magpie object based on RSS from URL. 392 * 393 * @since unknown 394 * @package External 395 * @subpackage MagpieRSS 396 * 397 * @param string $url URL to retrieve feed 398 * @return bool|MagpieRSS false on failure or MagpieRSS object on success. 399 */ 390 400 function fetch_rss ($url) { 391 401 // initialize constants 392 402 init(); … … 515 525 } // end fetch_rss() 516 526 endif; 517 527 528 /** 529 * Retrieve URL headers and content using Snoopy. 530 * 531 * @since unknown 532 * @package External 533 * @subpackage MagpieRSS 534 * 535 * @param string $url URL to retrieve 536 * @param array $headers Optional. Headers to send to the URL. 537 * @return Snoopy 538 */ 518 539 function _fetch_remote_file ($url, $headers = "" ) { 519 540 // Snoopy is an HTTP client in PHP 520 541 $client = new Snoopy(); … … 530 551 531 552 } 532 553 554 /** 555 * Retrieve 556 * 557 * @since unknown 558 * @package External 559 * @subpackage MagpieRSS 560 * 561 * @param unknown_type $resp 562 * @return unknown 563 */ 533 564 function _response_to_rss ($resp) { 534 565 $rss = new MagpieRSS( $resp->results ); 535 566 … … 570 601 } // end if ($rss and !$rss->error) 571 602 } 572 603 573 /*=======================================================================*\ 574 Function: init 575 Purpose: setup constants with default values 576 check for user overrides 577 \*=======================================================================*/ 604 /** 605 * Setup constants with default values, unless user overrides. 606 * 607 * @since unknown 608 * @package External 609 * @subpackage MagpieRSS 610 */ 578 611 function init () { 579 612 if ( defined('MAGPIE_INITALIZED') ) { 580 613 return; … … 835 868 endif; 836 869 837 870 if ( !function_exists('wp_rss') ) : 871 /** 872 * Display all RSS items in a HTML ordered list. 873 * 874 * @since unknown 875 * @package External 876 * @subpackage MagpieRSS 877 * 878 * @param string $url URL of feed to display. Will not auto sense feed URL. 879 * @param int $num_items Optional. Number of items to display, default is all. 880 */ 838 881 function wp_rss( $url, $num_items = -1 ) { 839 882 if ( $rss = fetch_rss( $url ) ) { 840 883 echo '<ul>'; … … 860 903 endif; 861 904 862 905 if ( !function_exists('get_rss') ) : 906 /** 907 * Display RSS items in HTML list items. 908 * 909 * You have to specify which HTML list you want, either ordered or unordered 910 * before using the function. You also have to specify how many items you wish 911 * to display. You can't display all of them like you can with wp_rss() 912 * function. 913 * 914 * @since unknown 915 * @package External 916 * @subpackage MagpieRSS 917 * 918 * @param string $url URL of feed to display. Will not auto sense feed URL. 919 * @param int $num_items Optional. Number of items to display, default is all. 920 * @return bool False on failure. 921 */ 863 922 function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS 864 923 $rss = fetch_rss($url); 865 924 if ( $rss ) { -
taxonomy.php
1 1 <?php 2 2 /** 3 * Taxonomy API 4 * 3 5 * @package WordPress 4 6 * @subpackage Taxonomy 5 * @since 2.3 7 * @since 2.3.0 6 8 */ 7 9 8 10 // … … 11 13 12 14 /** 13 15 * Default Taxonomy Objects 14 * @since 2.3 16 * @since 2.3.0 15 17 * @global array $wp_taxonomies 16 18 */ 17 19 $wp_taxonomies = array(); … … 30 32 * 31 33 * @package WordPress 32 34 * @subpackage Taxonomy 33 * @since 2.3 35 * @since 2.3.0 34 36 * 35 37 * @uses $wp_taxonomies 36 38 * … … 65 67 * 66 68 * @package WordPress 67 69 * @subpackage Taxonomy 68 * @since 2.3 70 * @since 2.3.0 69 71 * 70 72 * @uses $wp_taxonomies 71 73 * @uses is_taxonomy() Checks whether taxonomy exists … … 87 89 * 88 90 * @package WordPress 89 91 * @subpackage Taxonomy 90 * @since 2.3 92 * @since 2.3.0 91 93 * 92 94 * @uses $wp_taxonomies 93 95 * … … 110 112 * 111 113 * @package WordPress 112 114 * @subpackage Taxonomy 113 * @since 2.3 115 * @since 2.3.0 114 116 * 115 117 * @uses is_taxonomy() Checks whether taxonomy exists 116 118 * @uses get_taxonomy() Used to get the taxonomy object … … 153 155 * 154 156 * @package WordPress 155 157 * @subpackage Taxonomy 156 * @since 2.3 158 * @since 2.3.0 157 159 * @uses $wp_taxonomies Inserts new taxonomy object into the list 158 160 * @uses $wp_rewrite Adds rewrite tags and permastructs 159 161 * @uses $wp Adds query vars … … 210 212 * 211 213 * @package WordPress 212 214 * @subpackage Taxonomy 213 * @since 2.3 215 * @since 2.3.0 214 216 * 215 217 * @uses $wpdb 216 218 * @uses wp_parse_args() Creates an array from string $args. … … 281 283 * 282 284 * @package WordPress 283 285 * @subpackage Taxonomy 284 * @since 2.3 286 * @since 2.3.0 285 287 * 286 288 * @uses $wpdb 287 289 * @uses sanitize_term() Cleanses the term based on $filter context before returning. … … 347 349 * 348 350 * @package WordPress 349 351 * @subpackage Taxonomy 350 * @since 2.3 352 * @since 2.3.0 351 353 * 352 354 * @uses $wpdb 353 355 * @uses sanitize_term() Cleanses the term based on $filter context before returning. … … 408 410 * 409 411 * @package WordPress 410 412 * @subpackage Taxonomy 411 * @since 2.3 413 * @since 2.3.0 412 414 * 413 415 * @uses $wpdb 414 416 * @uses _get_term_hierarchy() … … 446 448 * 447 449 * @package WordPress 448 450 * @subpackage Taxonomy 449 * @since 2.3 451 * @since 2.3.0 450 452 * 451 453 * @uses sanitize_term_field() Passes the return value in sanitize_term_field on success. 452 454 * … … 479 481 * 480 482 * @package WordPress 481 483 * @subpackage Taxonomy 482 * @since 2.3 484 * @since 2.3.0 483 485 * 484 486 * @uses sanitize_term() Passes the return value on success 485 487 * … … 543 545 * 544 546 * @package WordPress 545 547 * @subpackage Taxonomy 546 * @since 2.3 548 * @since 2.3.0 547 549 * 548 550 * @uses $wpdb 549 551 * @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings. … … 755 757 * 756 758 * @package WordPress 757 759 * @subpackage Taxonomy 758 * @since 2.3 760 * @since 2.3.0 759 761 * 760 762 * @uses $wpdb 761 763 * … … 809 811 * 810 812 * @package WordPress 811 813 * @subpackage Taxonomy 812 * @since 2.3 814 * @since 2.3.0 813 815 * 814 816 * @uses sanitize_term_field Used to sanitize all fields in a term 815 817 * … … 854 856 * 855 857 * @package WordPress 856 858 * @subpackage Taxonomy 857 * @since 2.3 859 * @since 2.3.0 858 860 * 859 861 * @uses $wpdb 860 862 * … … 914 916 * 915 917 * @package WordPress 916 918 * @subpackage Taxonomy 917 * @since 2.3 919 * @since 2.3.0 918 920 * 919 921 * @uses $wpdb 920 922 * @uses wp_parse_args() Turns strings into arrays and merges defaults into an array. … … 946 948 * 947 949 * @package WordPress 948 950 * @subpackage Taxonomy 949 * @since 2.3 951 * @since 2.3.0 950 952 * @uses $wpdb 951 953 * 952 954 * @param int $object_id The term Object Id that refers to the term … … 979 981 * 980 982 * @package WordPress 981 983 * @subpackage Taxonomy 982 * @since 2.3 984 * @since 2.3.0 983 985 * 984 986 * @uses $wpdb 985 987 * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action … … 1073 1075 * 1074 1076 * @package WordPress 1075 1077 * @subpackage Taxonomy 1076 * @since 2.3 1078 * @since 2.3.0 1077 1079 * @uses $wpdb 1078 1080 * 1079 1081 * @param int|array $object_id The id of the object(s) to retrieve. … … 1197 1199 * 1198 1200 * @package WordPress 1199 1201 * @subpackage Taxonomy 1200 * @since 2.3 1202 * @since 2.3.0 1201 1203 * @uses $wpdb 1202 1204 * 1203 1205 * @uses do_action() Calls 'create_term' hook with the term id and taxonomy id as parameters. … … 1302 1304 * 1303 1305 * @package WordPress 1304 1306 * @subpackage Taxonomy 1305 * @since 2.3 1307 * @since 2.3.0 1306 1308 * @uses $wpdb 1307 1309 * 1308 1310 * @param int $object_id The object to relate to. … … 1388 1390 * 1389 1391 * @package WordPress 1390 1392 * @subpackage Taxonomy 1391 * @since 2.3 1393 * @since 2.3.0 1392 1394 * @uses $wpdb 1393 1395 * 1394 1396 * @param string $slug The string that will be tried for a unique slug … … 1455 1457 * 1456 1458 * @package WordPress 1457 1459 * @subpackage Taxonomy 1458 * @since 2.3 1460 * @since 2.3.0 1459 1461 * 1460 1462 * @uses $wpdb 1461 1463 * @uses do_action() Will call both 'edit_term' and 'edit_$taxonomy' twice. … … 1552 1554 /** 1553 1555 * Enable or disable term counting. 1554 1556 * 1555 * @since 2. 61557 * @since 2.5.0 1556 1558 * 1557 * @param bool $defer Optional. 1558 * @return bool 1559 * @param bool $defer Optional. Enable if true, disable if false. 1560 * @return bool Whether term counting is enabled or disabled. 1559 1561 */ 1560 function wp_defer_term_counting($defer= NULL) {1562 function wp_defer_term_counting($defer=null) { 1561 1563 static $_defer = false; 1562 1564 1563 1565 if ( is_bool($defer) ) { 1564 1566 $_defer = $defer; 1565 1567 // flush any deferred counts 1566 1568 if ( !$defer ) 1567 wp_update_term_count( NULL, NULL, true );1569 wp_update_term_count( null, null, true ); 1568 1570 } 1569 1571 1570 1572 return $_defer; … … 1581 1583 * 1582 1584 * @package WordPress 1583 1585 * @subpackage Taxonomy 1584 * @since 2.3 1586 * @since 2.3.0 1585 1587 * @uses $wpdb 1586 1588 * 1587 1589 * @param int|array $terms The ID of the terms … … 1617 1619 /** 1618 1620 * Perform term count update immediately. 1619 1621 * 1620 * @since 2. 61622 * @since 2.5.0 1621 1623 * 1622 1624 * @param array $terms IDs of Terms to update. 1623 1625 * @param string $taxonomy The context of the term. … … 1659 1661 * 1660 1662 * @package WordPress 1661 1663 * @subpackage Taxonomy 1662 * @since 2.3 1664 * @since 2.3.0 1663 1665 * 1664 1666 * @see get_object_taxonomies() for more on $object_type 1665 1667 * @uses do_action() Will call action hook named, 'clean_object_term_cache' after completion. … … 1685 1687 * 1686 1688 * @package WordPress 1687 1689 * @subpackage Taxonomy 1688 * @since 2.3 1690 * @since 2.3.0 1689 1691 * @uses $wpdb 1690 1692 * 1691 1693 * @param int|array $ids Single or list of Term IDs … … 1731 1733 * 1732 1734 * @package WordPress 1733 1735 * @subpackage Taxonomy 1734 * @since 2.3 1736 * @since 2.3.0 1735 1737 * 1736 1738 * @uses wp_cache_get() Retrieves taxonomy relationship from cache 1737 1739 * … … 1760 1762 * 1761 1763 * @package WordPress 1762 1764 * @subpackage Taxonomy 1763 * @since 2.3 1765 * @since 2.3.0 1764 1766 * @uses wp_get_object_terms() Used to get terms from the database to update 1765 1767 * 1766 1768 * @param string|array $object_ids Single or list of term object ID(s) … … 1820 1822 * 1821 1823 * @package WordPress 1822 1824 * @subpackage Taxonomy 1823 * @since 2.3 1825 * @since 2.3.0 1824 1826 * 1825 1827 * @param array $terms List of Term objects to change 1826 1828 * @param string $taxonomy Optional. Update Term to this taxonomy in cache … … 1846 1848 * @package WordPress 1847 1849 * @subpackage Taxonomy 1848 1850 * @access private 1849 * @since 2.3 1851 * @since 2.3.0 1850 1852 * 1851 1853 * @uses update_option() Stores all of the children in "$taxonomy_children" 1852 1854 * option. That is the name of the taxonomy, immediately followed by '_children'. … … 1883 1885 * @package WordPress 1884 1886 * @subpackage Taxonomy 1885 1887 * @access private 1886 * @since 2.3 1888 * @since 2.3.0 1887 1889 * 1888 1890 * @param int $term_id Look for this Term ID in $terms 1889 1891 * @param array $terms List of Term IDs … … 1940 1942 * @package WordPress 1941 1943 * @subpackage Taxonomy 1942 1944 * @access private 1943 * @since 2.3 1945 * @since 2.3.0 1944 1946 * @uses $wpdb 1945 1947 * 1946 1948 * @param array $terms List of Term IDs … … 2003 2005 * @package WordPress 2004 2006 * @subpackage Taxonomy 2005 2007 * @access private 2006 * @since 2.3 2008 * @since 2.3.0 2007 2009 * @uses $wpdb 2008 2010 * 2009 2011 * @param array $terms List of Term IDs … … 2021 2023 /** 2022 2024 * Generates a permalink for a taxonomy term archive. 2023 2025 * 2024 * @since 2. 62026 * @since 2.5.0 2025 2027 * 2026 2028 * @param object|int|string $term 2027 2029 * @param string $taxonomy … … 2077 2079 * 'sep' : default is empty string. Separate every taxonomy with value in this. 2078 2080 * 'after' : default is empty string. Display this after the taxonomies list. 2079 2081 * 2080 * @since 2. 62082 * @since 2.5.0 2081 2083 * @uses get_the_taxonomies() 2082 2084 * 2083 2085 * @param array $args Override the defaults. … … 2102 2104 * This function can be used within the loop. It will also return an array of 2103 2105 * the taxonomies with links to the taxonomy and name. 2104 2106 * 2105 * @since 2. 62107 * @since 2.5.0 2106 2108 * 2107 2109 * @param int $post Optional. Post ID or will use Global Post ID (in loop). 2108 2110 * @return array … … 2147 2149 /** 2148 2150 * Retrieve all taxonomies of a post with just the names. 2149 2151 * 2150 * @since 2. 62152 * @since 2.5.0 2151 2153 * @uses get_object_taxonomies() 2152 2154 * 2153 2155 * @param int $post Optional. Post ID -
update.php
14 14 * isn't installing. 15 15 * 16 16 * @package WordPress 17 * @since 2.3 17 * @since 2.3.0 18 18 * @uses $wp_version Used to check against the newest WordPress version. 19 19 * 20 20 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. … … 83 83 * isn't installing. 84 84 * 85 85 * @package WordPress 86 * @since 2.3 86 * @since 2.3.0 87 87 * @uses $wp_version Used to notidy the WordPress version. 88 88 * 89 89 * @return mixed Returns null if update is unsupported. Returns false if check is too soon.