Changeset 8782
- Timestamp:
- 08/30/2008 09:23:43 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r8600 r8782 8 8 9 9 /** 10 * get_locale() - Gets the current locale 11 * 12 * If the locale is set, then it will filter the locale 13 * in the 'locale' filter hook and return the value. 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. 19 * 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. 23 * 24 * @since 1.5.0 25 * @uses apply_filters() Calls 'locale' hook on locale value 26 * @uses $locale Gets the locale stored in the global 27 * 28 * @return string The locale of the blog or from the 'locale' hook 10 * Gets the current locale. 11 * 12 * If the locale is set, then it will filter the locale in the 'locale' filter 13 * hook and return the value. 14 * 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. 18 * 19 * The process to get the locale should only be done once but the locale will 20 * always be filtered using the 'locale' hook. 21 * 22 * @since 1.5.0 23 * @uses apply_filters() Calls 'locale' hook on locale value. 24 * @uses $locale Gets the locale stored in the global. 25 * 26 * @return string The locale of the blog or from the 'locale' hook. 29 27 */ 30 28 function get_locale() { … … 47 45 48 46 /** 49 * translate() - Retrieve the translated text 50 * 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. 47 * Retrieve the translated text. 48 * 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 62 * 63 * @param string $text Text to translate 64 * @param string $domain Domain to retrieve the translated text 58 * with the untranslated text as second parameter. 59 * 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 */ … … 75 72 76 73 /** 77 * translate_with_context() - Retrieve the translated text and strip context 78 * 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. 74 * Retrieve the translated text and strip context. 75 * 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. … … 102 98 103 99 /** 104 * __() - Retrieve a translated string 105 * 106 * __() is a convenience function which retrieves the translated 107 * string from the translate(). 100 * Retrieves the translated string from the translate(). 108 101 * 109 102 * @see translate() An alias of translate() … … 118 111 } 119 112 120 // . 121 /** 122 * _e() - Display a translated string 123 * 124 * _e() is a convenience function which displays the returned 125 * translated text from translate(). 113 /** 114 * Displays the returned translated text from translate(). 126 115 * 127 116 * @see translate() Echos returned translate() string … … 136 125 137 126 /** 138 * _c() - Retrieve context translated string 139 * 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. 143 * 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. 147 * 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. 127 * Retrieve context translated string. 128 * 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. 131 * 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. 134 * 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 … … 162 148 163 149 /** 164 * __ngettext() - Retrieve the plural or single form based on the amount165 * 166 * If the domain is not set in the $l10n list, then a comparsion 167 * will be madeand either $plural or $single parameters returned.168 * 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.150 * Retrieve the plural or single form based on the amount. 151 * 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. 154 * 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 … … 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 … … 223 209 224 210 /** 225 * load_textdomain() - Loads MO file into the list of domains226 * 227 * If the domain already exists, the inclusion will fail. If the 228 * MO file is notreadable, the inclusion will fail.229 * 230 * On success, the mofile will be placed in the $l10n global by 231 * $domain and willbe an gettext_reader object.211 * Loads MO file into the list of domains. 212 * 213 * If the domain already exists, the inclusion will fail. If the MO file is not 214 * readable, the inclusion will fail. 215 * 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 … … 261 247 262 248 /** 263 * load_default_textdomain() - Loads default translated strings based on locale264 * 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.249 * Loads default translated strings based on locale. 250 * 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 … … 277 263 278 264 /** 279 * load_plugin_textdomain() - Loads the plugin's translated strings280 * 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.265 * Loads the plugin's translated strings. 266 * 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 … … 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 -
trunk/wp-includes/locale.php
r8572 r8782 8 8 9 9 /** 10 * {@internal Missing Short Description}} 11 * 12 * {@internal Missing Long Description}} 10 * Class that loads the calendar locale. 13 11 * 14 12 * @since 2.1.0 -
trunk/wp-includes/plugin.php
r8660 r8782 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 … … 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. 43 * 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. 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. 45 * 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 … … 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. … … 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. … … 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 … … 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. … … 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(). 281 * 282 * @see apply_filters() This function works similar with the exception that nothing is 283 * returned and only the functions or methods are called. 283 * You can pass extra arguments to the hooks, much like you can with 284 * apply_filters(). 285 * 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 … … 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 … … 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 … … 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 * … … 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 * … … 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 *638 * @access private639 641 * 640 642 * @global array $wp_filter Storage for all of the filters and actions -
trunk/wp-includes/registration.php
r8701 r8782 7 7 8 8 /** 9 * username_exists() -Checks whether the given username exists.9 * Checks whether the given username exists. 10 10 * 11 11 * @since 2.0.0 … … 23 23 24 24 /** 25 * email_exists() -Checks whether the given email exists.25 * Checks whether the given email exists. 26 26 * 27 27 * @since 2.1.0 … … 39 39 40 40 /** 41 * validate_username() -Checks whether an username is valid.41 * Checks whether an username is valid. 42 42 * 43 43 * @since 2.0.1 … … 54 54 55 55 /** 56 * wp_insert_user() - Insert an user into the database. 57 * 58 * Can update a current user or insert a new user based on whether 59 * the user's ID is present. 60 * 61 * Can be used to update the user's info (see below), set the user's 62 * role, and set the user's preference on whether they want the rich 63 * editor on. 64 * 65 * Most of the $userdata array fields have filters associated with 66 * the values. The exceptions are 'rich_editing', 'role', 'jabber', 67 * 'aim', 'yim', 'user_registered', and 'ID'. The filters have the 68 * prefix 'pre_user_' followed by the field name. An example using 69 * 'description' would have the filter called, 'pre_user_description' 70 * that can be hooked into. 56 * Insert an user into the database. 57 * 58 * Can update a current user or insert a new user based on whether the user's ID 59 * is present. 60 * 61 * Can be used to update the user's info (see below), set the user's role, and 62 * set the user's preference on whether they want the rich editor on. 63 * 64 * Most of the $userdata array fields have filters associated with the values. 65 * The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim', 66 * 'user_registered', and 'ID'. The filters have the prefix 'pre_user_' followed 67 * by the field name. An example using 'description' would have the filter 68 * called, 'pre_user_description' that can be hooked into. 71 69 * 72 70 * The $userdata array can contain the following fields: … … 78 76 * 'user_url' - A string containing the user's URL for the user's web site. 79 77 * 'user_email' - A string containing the user's email address. 80 * 'display_name' - A string that will be shown on the site. Defaults to user's username. 81 * It is likely that you will want to change this, for both appearance and security 82 * through obscurity (that is if you don't use and delete the default 'admin' user). 78 * 'display_name' - A string that will be shown on the site. Defaults to user's 79 * username. It is likely that you will want to change this, for both 80 * appearance and security through obscurity (that is if you don't use and 81 * delete the default 'admin' user). 83 82 * 'nickname' - The user's nickname, defaults to the user's username. 84 83 * 'first_name' - The user's first name. 85 84 * 'last_name' - The user's last name. 86 85 * 'description' - A string containing content about the user. 87 * 'rich_editing' - A string for whether to enable the rich editor or not. False if not88 * empty.86 * 'rich_editing' - A string for whether to enable the rich editor or not. False 87 * if not empty. 89 88 * 'user_registered' - The date the user registered. Format is 'Y-m-d H:i:s'. 90 89 * 'role' - A string used to set the user's role. … … 209 208 210 209 /** 211 * wp_update_user() - Update an user in the database212 * 213 * It is possible to update a user's password by specifying the 214 * 'user_pass'value in the $userdata parameter array.215 * 216 * If $userdata does not contain an 'ID' key, then a new user 217 * will be createdand the new user's ID will be returned.218 * 219 * If current user's password is being updated, then the cookies 220 * will becleared.210 * Update an user in the database. 211 * 212 * It is possible to update a user's password by specifying the 'user_pass' 213 * value in the $userdata parameter array. 214 * 215 * If $userdata does not contain an 'ID' key, then a new user will be created 216 * and the new user's ID will be returned. 217 * 218 * If current user's password is being updated, then the cookies will be 219 * cleared. 221 220 * 222 221 * @since 2.0.0 … … 259 258 260 259 /** 261 * wp_create_user() -A simpler way of inserting an user into the database.260 * A simpler way of inserting an user into the database. 262 261 * 263 262 * Creates a new user with just the username, password, and email. For a more -
trunk/wp-includes/rss.php
r8572 r8782 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 … … 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 … … 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 ); … … 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') ) { … … 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 ) ) { … … 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); -
trunk/wp-includes/script-loader.php
r8781 r8782 31 31 * Localizes a few of the scripts. 32 32 * 33 * @since unknown33 * @since 2.6.0 34 34 * 35 35 * @param object $scripts WP_Scripts object. -
trunk/wp-includes/taxonomy.php
r8732 r8782 1 1 <?php 2 2 /** 3 * @package WordPress 4 * @subpackage Taxonomy 5 * @since 2.3 3 * Taxonomy API 4 * 5 * @package WordPress 6 * @subpackage Taxonomy 7 * @since 2.3.0 6 8 */ 7 9 … … 12 14 /** 13 15 * Default Taxonomy Objects 14 * @since 2.3 16 * @since 2.3.0 15 17 * @global array $wp_taxonomies 16 18 */ … … 31 33 * @package WordPress 32 34 * @subpackage Taxonomy 33 * @since 2.3 35 * @since 2.3.0 34 36 * 35 37 * @uses $wp_taxonomies … … 66 68 * @package WordPress 67 69 * @subpackage Taxonomy 68 * @since 2.3 70 * @since 2.3.0 69 71 * 70 72 * @uses $wp_taxonomies … … 88 90 * @package WordPress 89 91 * @subpackage Taxonomy 90 * @since 2.3 92 * @since 2.3.0 91 93 * 92 94 * @uses $wp_taxonomies … … 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 … … 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 … … 211 213 * @package WordPress 212 214 * @subpackage Taxonomy 213 * @since 2.3 215 * @since 2.3.0 214 216 * 215 217 * @uses $wpdb … … 282 284 * @package WordPress 283 285 * @subpackage Taxonomy 284 * @since 2.3 286 * @since 2.3.0 285 287 * 286 288 * @uses $wpdb … … 348 350 * @package WordPress 349 351 * @subpackage Taxonomy 350 * @since 2.3 352 * @since 2.3.0 351 353 * 352 354 * @uses $wpdb … … 409 411 * @package WordPress 410 412 * @subpackage Taxonomy 411 * @since 2.3 413 * @since 2.3.0 412 414 * 413 415 * @uses $wpdb … … 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. … … 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 … … 544 546 * @package WordPress 545 547 * @subpackage Taxonomy 546 * @since 2.3 548 * @since 2.3.0 547 549 * 548 550 * @uses $wpdb … … 758 760 * @package WordPress 759 761 * @subpackage Taxonomy 760 * @since 2.3 762 * @since 2.3.0 761 763 * 762 764 * @uses $wpdb … … 812 814 * @package WordPress 813 815 * @subpackage Taxonomy 814 * @since 2.3 816 * @since 2.3.0 815 817 * 816 818 * @uses sanitize_term_field Used to sanitize all fields in a term … … 857 859 * @package WordPress 858 860 * @subpackage Taxonomy 859 * @since 2.3 861 * @since 2.3.0 860 862 * 861 863 * @uses $wpdb … … 917 919 * @package WordPress 918 920 * @subpackage Taxonomy 919 * @since 2.3 921 * @since 2.3.0 920 922 * 921 923 * @uses $wpdb … … 949 951 * @package WordPress 950 952 * @subpackage Taxonomy 951 * @since 2.3 953 * @since 2.3.0 952 954 * @uses $wpdb 953 955 * … … 982 984 * @package WordPress 983 985 * @subpackage Taxonomy 984 * @since 2.3 986 * @since 2.3.0 985 987 * 986 988 * @uses $wpdb … … 1076 1078 * @package WordPress 1077 1079 * @subpackage Taxonomy 1078 * @since 2.3 1080 * @since 2.3.0 1079 1081 * @uses $wpdb 1080 1082 * … … 1200 1202 * @package WordPress 1201 1203 * @subpackage Taxonomy 1202 * @since 2.3 1204 * @since 2.3.0 1203 1205 * @uses $wpdb 1204 1206 * … … 1305 1307 * @package WordPress 1306 1308 * @subpackage Taxonomy 1307 * @since 2.3 1309 * @since 2.3.0 1308 1310 * @uses $wpdb 1309 1311 * … … 1391 1393 * @package WordPress 1392 1394 * @subpackage Taxonomy 1393 * @since 2.3 1395 * @since 2.3.0 1394 1396 * @uses $wpdb 1395 1397 * … … 1458 1460 * @package WordPress 1459 1461 * @subpackage Taxonomy 1460 * @since 2.3 1462 * @since 2.3.0 1461 1463 * 1462 1464 * @uses $wpdb … … 1555 1557 * Enable or disable term counting. 1556 1558 * 1557 * @since 2. 61558 * 1559 * @param bool $defer Optional. 1560 * @return bool 1561 */ 1562 function wp_defer_term_counting($defer= NULL) {1559 * @since 2.5.0 1560 * 1561 * @param bool $defer Optional. Enable if true, disable if false. 1562 * @return bool Whether term counting is enabled or disabled. 1563 */ 1564 function wp_defer_term_counting($defer=null) { 1563 1565 static $_defer = false; 1564 1566 … … 1567 1569 // flush any deferred counts 1568 1570 if ( !$defer ) 1569 wp_update_term_count( NULL, NULL, true );1571 wp_update_term_count( null, null, true ); 1570 1572 } 1571 1573 … … 1584 1586 * @package WordPress 1585 1587 * @subpackage Taxonomy 1586 * @since 2.3 1588 * @since 2.3.0 1587 1589 * @uses $wpdb 1588 1590 * … … 1620 1622 * Perform term count update immediately. 1621 1623 * 1622 * @since 2. 61624 * @since 2.5.0 1623 1625 * 1624 1626 * @param array $terms IDs of Terms to update. … … 1662 1664 * @package WordPress 1663 1665 * @subpackage Taxonomy 1664 * @since 2.3 1666 * @since 2.3.0 1665 1667 * 1666 1668 * @see get_object_taxonomies() for more on $object_type … … 1688 1690 * @package WordPress 1689 1691 * @subpackage Taxonomy 1690 * @since 2.3 1692 * @since 2.3.0 1691 1693 * @uses $wpdb 1692 1694 * … … 1734 1736 * @package WordPress 1735 1737 * @subpackage Taxonomy 1736 * @since 2.3 1738 * @since 2.3.0 1737 1739 * 1738 1740 * @uses wp_cache_get() Retrieves taxonomy relationship from cache … … 1763 1765 * @package WordPress 1764 1766 * @subpackage Taxonomy 1765 * @since 2.3 1767 * @since 2.3.0 1766 1768 * @uses wp_get_object_terms() Used to get terms from the database to update 1767 1769 * … … 1823 1825 * @package WordPress 1824 1826 * @subpackage Taxonomy 1825 * @since 2.3 1827 * @since 2.3.0 1826 1828 * 1827 1829 * @param array $terms List of Term objects to change … … 1849 1851 * @subpackage Taxonomy 1850 1852 * @access private 1851 * @since 2.3 1853 * @since 2.3.0 1852 1854 * 1853 1855 * @uses update_option() Stores all of the children in "$taxonomy_children" … … 1886 1888 * @subpackage Taxonomy 1887 1889 * @access private 1888 * @since 2.3 1890 * @since 2.3.0 1889 1891 * 1890 1892 * @param int $term_id Look for this Term ID in $terms … … 1943 1945 * @subpackage Taxonomy 1944 1946 * @access private 1945 * @since 2.3 1947 * @since 2.3.0 1946 1948 * @uses $wpdb 1947 1949 * … … 2006 2008 * @subpackage Taxonomy 2007 2009 * @access private 2008 * @since 2.3 2010 * @since 2.3.0 2009 2011 * @uses $wpdb 2010 2012 * … … 2024 2026 * Generates a permalink for a taxonomy term archive. 2025 2027 * 2026 * @since 2. 62028 * @since 2.5.0 2027 2029 * 2028 2030 * @param object|int|string $term … … 2080 2082 * 'after' : default is empty string. Display this after the taxonomies list. 2081 2083 * 2082 * @since 2. 62084 * @since 2.5.0 2083 2085 * @uses get_the_taxonomies() 2084 2086 * … … 2105 2107 * the taxonomies with links to the taxonomy and name. 2106 2108 * 2107 * @since 2. 62109 * @since 2.5.0 2108 2110 * 2109 2111 * @param int $post Optional. Post ID or will use Global Post ID (in loop). … … 2150 2152 * Retrieve all taxonomies of a post with just the names. 2151 2153 * 2152 * @since 2. 62154 * @since 2.5.0 2153 2155 * @uses get_object_taxonomies() 2154 2156 *
Note: See TracChangeset
for help on using the changeset viewer.