Make WordPress Core

Ticket #7550: 7550.corrections.r8781.patch

File 7550.corrections.r8781.patch, 34.5 KB (added by jacobsantos, 15 years ago)

More corrections based off of r8781

  • l10n.php

     
    77 */
    88
    99/**
    10  * get_locale() - Gets the current locale
     10 * Gets the current locale.
    1111 *
    12  * If the locale is set, then it will filter the locale
    13  * in the 'locale' filter hook 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.
    1414 *
    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.
    1918 *
    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.
    2321 *
    2422 * @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.
    2725 *
    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.
    2927 */
    3028function get_locale() {
    3129        global $locale;
     
    4644}
    4745
    4846/**
    49  * translate() - Retrieve the translated text
     47 * Retrieve the translated text.
    5048 *
    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.
    5552 *
    5653 * If the domain is not set, the $text is just returned.
    5754 *
    5855 * @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.
    6057 * @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.
    6259 *
    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.
    6562 * @return string Translated text
    6663 */
    6764function translate($text, $domain = 'default') {
     
    7471}
    7572
    7673/**
    77  * translate_with_context() - Retrieve the translated text and strip context
     74 * Retrieve the translated text and strip context.
    7875 *
    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.
    8379 *
    8480 * If the domain is not set, the $text is just returned.
    8581 *
     
    10197}
    10298
    10399/**
    104  * __() - Retrieve a translated string
     100 * Retrieves the translated string from the translate().
    105101 *
    106  * __() is a convenience function which retrieves the translated
    107  * string from the translate().
    108  *
    109102 * @see translate() An alias of translate()
    110103 * @since 2.1.0
    111104 *
     
    117110        return translate($text, $domain);
    118111}
    119112
    120 // .
    121113/**
    122  * _e() - Display a translated string
     114 * Displays the returned translated text from translate().
    123115 *
    124  * _e() is a convenience function which displays the returned
    125  * translated text from translate().
    126  *
    127116 * @see translate() Echos returned translate() string
    128117 * @since 1.2.0
    129118 *
     
    135124}
    136125
    137126/**
    138  * _c() - Retrieve context translated string
     127 * Retrieve context translated string.
    139128 *
    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.
    143131 *
    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.
    147134 *
    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.
    152138 *
    153139 * @since 2.2.0
    154140 *
     
    161147}
    162148
    163149/**
    164  * __ngettext() - Retrieve the plural or single form based on the amount
     150 * Retrieve the plural or single form based on the amount.
    165151 *
    166  * If the domain is not set in the $l10n list, then a comparsion
    167  * will be made and 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.
    168154 *
    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 with
    172  * the 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.
    173159 *
    174160 * @since 1.2.0
    175161 * @uses $l10n Gets list of domain translated string (gettext_reader) objects
     
    196182}
    197183
    198184/**
    199  * __ngettext_noop() - register plural strings in POT file, but don't translate them
     185 * Register plural strings in POT file, but don't translate them.
    200186 *
    201187 * Used when you want do keep structures with translatable plural strings and
    202188 * use them later.
     
    222208}
    223209
    224210/**
    225  * load_textdomain() - Loads MO file into the list of domains
     211 * Loads MO file into the list of domains.
    226212 *
    227  * If the domain already exists, the inclusion will fail. If the
    228  * MO file is not readable, 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.
    229215 *
    230  * On success, the mofile will be placed in the $l10n global by
    231  * $domain and will be 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.
    232218 *
    233219 * @since 1.5.0
    234220 * @uses $l10n Gets list of domain translated string (gettext_reader) objects
     
    260246}
    261247
    262248/**
    263  * load_default_textdomain() - Loads default translated strings based on locale
     249 * Loads default translated strings based on locale.
    264250 *
    265  * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.
    266  * The translated (.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.
    267253 *
    268254 * @since 1.5.0
    269255 */
     
    276262}
    277263
    278264/**
    279  * load_plugin_textdomain() - Loads the plugin's translated strings
     265 * Loads the plugin's translated strings.
    280266 *
    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 with a
    283  * 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.
    284270 *
    285271 * @since 1.5.0
    286272 *
     
    304290}
    305291
    306292/**
    307  * load_theme_textdomain() - Includes theme's translated strings for the theme
     293 * Loads the theme's translated strings.
    308294 *
    309295 * If the current locale exists as a .mo file in the theme's root directory, it
    310296 * will be included in the translated strings by the $domain.
  • locale.php

     
    77 */
    88
    99/**
    10  * {@internal Missing Short Description}}
     10 * Class that loads the calendar locale.
    1111 *
    12  * {@internal Missing Long Description}}
    13  *
    1412 * @since 2.1.0
    1513 */
    1614class WP_Locale {
  • plugin.php

     
    1111 * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'}
    1212 * type are valid.
    1313 *
    14  * Also see the {@link http://codex.wordpress.org/Plugin_API Plugin API} for more information
    15  * 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.
    1616 *
    1717 * @package WordPress
    1818 * @subpackage Plugin
     
    2727 * can specify that one or more of its PHP functions is executed to
    2828 * modify specific types of text at these times, using the Filter API.
    2929 *
    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 *
    3133 * <code>
    3234 * function example_hook($example) { echo $example; }
    33  *
    3435 * add_filter('example_filter', 'example_hook');
    3536 * </code>
    3637 *
    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.
    4345 *
    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.
    4851 *
    4952 * @package WordPress
    5053 * @subpackage Plugin
     
    5356 *      wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)]']
    5457 * @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.
    5558 *
    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.
    5760 * @param callback $function_to_add The name of the function to be called when the filter is applied.
    5861 * @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.
    5962 * @param int $accepted_args optional. The number of arguments the function accept (default 1).
     
    101104/**
    102105 * Call the functions added to a filter hook.
    103106 *
    104  * The callback functions attached to filter hook <tt>$tag</tt> are invoked by
    105  * calling this function. This function can be used to create a new filter hook
    106  * by simply calling this function with the name of the new hook specified using
    107  * 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.
    108111 *
    109112 * The function allows for additional arguments to be added and passed to hooks.
    110113 * <code>
     
    232235}
    233236
    234237/**
    235  * Return the name of the current filter or action.
     238 * Retrieve the name of the current filter or action.
    236239 *
    237240 * @package WordPress
    238241 * @subpackage Plugin
     
    260263 * @subpackage Plugin
    261264 * @since 1.2
    262265 *
    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.
    264267 * @param callback $function_to_add The name of the function you wish to be called.
    265268 * @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.
    266269 * @param int $accepted_args optional. The number of arguments the function accept (default 1).
     
    273276/**
    274277 * Execute functions hooked on a specific action hook.
    275278 *
    276  * This function invokes all functions attached to action hook <tt>$tag</tt>.
    277  * It is possible 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,
    278281 * specifying the name of the new hook using the <tt>$tag</tt> parameter.
    279282 *
    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().
    281285 *
    282  * @see apply_filters() This function works similar with the exception that nothing is
    283  * 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.
    284288 *
    285289 * @package WordPress
    286290 * @subpackage Plugin
     
    340344}
    341345
    342346/**
    343  * Return the number times an action is fired.
     347 * Retrieve the number times an action is fired.
    344348 *
    345349 * @package WordPress
    346350 * @subpackage Plugin
     
    362366/**
    363367 * Execute functions hooked on a specific action hook, specifying arguments in an array.
    364368 *
    365  * @see do_action() This function is identical, but the arguments passed to
    366  * the functions 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.
    367371 *
    368372 * @package WordPress
    369373 * @subpackage Plugin
     
    498502 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is
    499503 * activated. In the name of this hook, PLUGINNAME is replaced with the name of
    500504 * the plugin, including the optional subdirectory. For example, when the plugin
    501  * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the
    502  * name of this hook will become 'activate_sampleplugin/sample.php'
    503  * When the plugin consists of only one file and is (as by default) located at
    504  * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be
     505 * 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
    505509 * 'activate_sample.php'.
    506510 *
    507511 * @package WordPress
     
    524528 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is
    525529 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name
    526530 * of the plugin, including the optional subdirectory. For example, when the
    527  * plugin is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then
     531 * plugin is located in wp-content/plugin/sampleplugin/sample.php, then
    528532 * the name of this hook will become 'activate_sampleplugin/sample.php'.
    529533 *
    530534 * 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 be
     535 * wp-content/plugin/sample.php the name of this hook will be
    532536 * 'activate_sample.php'.
    533537 *
    534538 * @package WordPress
     
    631635 *
    632636 * @package WordPress
    633637 * @subpackage Plugin
     638 * @access private
    634639 * @since 2.2.3
    635  *
    636640 * @link http://trac.wordpress.org/ticket/3875
    637641 *
    638  * @access private
    639  *
    640642 * @global array $wp_filter Storage for all of the filters and actions
    641643 * @param string $tag Used in counting how many hooks were applied
    642644 * @param string|array $function Used for creating unique id
  • registration.php

     
    66 */
    77
    88/**
    9  * username_exists() - Checks whether the given username exists.
     9 * Checks whether the given username exists.
    1010 *
    1111 * @since 2.0.0
    1212 *
     
    2222}
    2323
    2424/**
    25  * email_exists() - Checks whether the given email exists.
     25 * Checks whether the given email exists.
    2626 *
    2727 * @since 2.1.0
    2828 * @uses $wpdb
     
    3838}
    3939
    4040/**
    41  * validate_username() - Checks whether an username is valid.
     41 * Checks whether an username is valid.
    4242 *
    4343 * @since 2.0.1
    4444 * @uses apply_filters() Calls 'validate_username' hook on $valid check and $username as parameters
     
    5353}
    5454
    5555/**
    56  * wp_insert_user() - Insert an user into the database.
     56 * Insert an user into the database.
    5757 *
    58  * Can update a current user or insert a new user based on whether
    59  * the user's ID is present.
     58 * Can update a current user or insert a new user based on whether the user's ID
     59 * is present.
    6060 *
    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.
     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.
    6463 *
    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.
     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.
    7169 *
    7270 * The $userdata array can contain the following fields:
    7371 * 'ID' - An integer that will be used for updating an existing user.
     
    7775 *              The default is the user's username.
    7876 * 'user_url' - A string containing the user's URL for the user's web site.
    7977 * '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).
    8382 * 'nickname' - The user's nickname, defaults to the user's username.
    8483 * 'first_name' - The user's first name.
    8584 * 'last_name' - The user's last name.
    8685 * 'description' - A string containing content about the user.
    87  * 'rich_editing' - A string for whether to enable the rich editor or not. False if not
    88  *              empty.
     86 * 'rich_editing' - A string for whether to enable the rich editor or not. False
     87 *              if not empty.
    8988 * 'user_registered' - The date the user registered. Format is 'Y-m-d H:i:s'.
    9089 * 'role' - A string used to set the user's role.
    9190 * 'jabber' - User's Jabber account.
     
    208207}
    209208
    210209/**
    211  * wp_update_user() - Update an user in the database
     210 * Update an user in the database.
    212211 *
    213  * It is possible to update a user's password by specifying the
    214  * 'user_pass' value in the $userdata parameter array.
     212 * It is possible to update a user's password by specifying the 'user_pass'
     213 * value in the $userdata parameter array.
    215214 *
    216  * If $userdata does not contain an 'ID' key, then a new user
    217  * will be created and the new user's ID will be returned.
     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.
    218217 *
    219  * If current user's password is being updated, then the cookies
    220  * will be cleared.
     218 * If current user's password is being updated, then the cookies will be
     219 * cleared.
    221220 *
    222221 * @since 2.0.0
    223222 * @see wp_insert_user() For what fields can be set in $userdata
     
    258257}
    259258
    260259/**
    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.
    262261 *
    263262 * Creates a new user with just the username, password, and email. For a more
    264263 * detail creation of a user, use wp_insert_user() to specify more infomation.
  • rss.php

     
    387387require_once( dirname(__FILE__) . '/class-snoopy.php');
    388388
    389389if ( !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 */
    390400function fetch_rss ($url) {
    391401        // initialize constants
    392402        init();
     
    515525} // end fetch_rss()
    516526endif;
    517527
     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 */
    518539function _fetch_remote_file ($url, $headers = "" ) {
    519540        // Snoopy is an HTTP client in PHP
    520541        $client = new Snoopy();
     
    530551
    531552}
    532553
     554/**
     555 * Retrieve
     556 *
     557 * @since unknown
     558 * @package External
     559 * @subpackage MagpieRSS
     560 *
     561 * @param unknown_type $resp
     562 * @return unknown
     563 */
    533564function _response_to_rss ($resp) {
    534565        $rss = new MagpieRSS( $resp->results );
    535566
     
    570601        } // end if ($rss and !$rss->error)
    571602}
    572603
    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 */
    578611function init () {
    579612        if ( defined('MAGPIE_INITALIZED') ) {
    580613                return;
     
    835868endif;
    836869
    837870if ( !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 */
    838881function wp_rss( $url, $num_items = -1 ) {
    839882        if ( $rss = fetch_rss( $url ) ) {
    840883                echo '<ul>';
     
    860903endif;
    861904
    862905if ( !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 */
    863922function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS
    864923        $rss = fetch_rss($url);
    865924        if ( $rss ) {
  • script-loader.php

     
    3030 *
    3131 * Localizes a few of the scripts.
    3232 *
    33  * @since unknown
     33 * @since 2.6.0
    3434 *
    3535 * @param object $scripts WP_Scripts object.
    3636 */
  • taxonomy.php

     
    11<?php
    22/**
     3 * Taxonomy API
     4 *
    35 * @package WordPress
    46 * @subpackage Taxonomy
    5  * @since 2.3
     7 * @since 2.3.0
    68 */
    79
    810//
     
    1113
    1214/**
    1315 * Default Taxonomy Objects
    14  * @since 2.3
     16 * @since 2.3.0
    1517 * @global array $wp_taxonomies
    1618 */
    1719$wp_taxonomies = array();
     
    3032 *
    3133 * @package WordPress
    3234 * @subpackage Taxonomy
    33  * @since 2.3
     35 * @since 2.3.0
    3436 *
    3537 * @uses $wp_taxonomies
    3638 *
     
    6567 *
    6668 * @package WordPress
    6769 * @subpackage Taxonomy
    68  * @since 2.3
     70 * @since 2.3.0
    6971 *
    7072 * @uses $wp_taxonomies
    7173 * @uses is_taxonomy() Checks whether taxonomy exists
     
    8789 *
    8890 * @package WordPress
    8991 * @subpackage Taxonomy
    90  * @since 2.3
     92 * @since 2.3.0
    9193 *
    9294 * @uses $wp_taxonomies
    9395 *
     
    110112 *
    111113 * @package WordPress
    112114 * @subpackage Taxonomy
    113  * @since 2.3
     115 * @since 2.3.0
    114116 *
    115117 * @uses is_taxonomy() Checks whether taxonomy exists
    116118 * @uses get_taxonomy() Used to get the taxonomy object
     
    153155 *
    154156 * @package WordPress
    155157 * @subpackage Taxonomy
    156  * @since 2.3
     158 * @since 2.3.0
    157159 * @uses $wp_taxonomies Inserts new taxonomy object into the list
    158160 * @uses $wp_rewrite Adds rewrite tags and permastructs
    159161 * @uses $wp Adds query vars
     
    210212 *
    211213 * @package WordPress
    212214 * @subpackage Taxonomy
    213  * @since 2.3
     215 * @since 2.3.0
    214216 *
    215217 * @uses $wpdb
    216218 * @uses wp_parse_args() Creates an array from string $args.
     
    281283 *
    282284 * @package WordPress
    283285 * @subpackage Taxonomy
    284  * @since 2.3
     286 * @since 2.3.0
    285287 *
    286288 * @uses $wpdb
    287289 * @uses sanitize_term() Cleanses the term based on $filter context before returning.
     
    347349 *
    348350 * @package WordPress
    349351 * @subpackage Taxonomy
    350  * @since 2.3
     352 * @since 2.3.0
    351353 *
    352354 * @uses $wpdb
    353355 * @uses sanitize_term() Cleanses the term based on $filter context before returning.
     
    408410 *
    409411 * @package WordPress
    410412 * @subpackage Taxonomy
    411  * @since 2.3
     413 * @since 2.3.0
    412414 *
    413415 * @uses $wpdb
    414416 * @uses _get_term_hierarchy()
     
    446448 *
    447449 * @package WordPress
    448450 * @subpackage Taxonomy
    449  * @since 2.3
     451 * @since 2.3.0
    450452 *
    451453 * @uses sanitize_term_field() Passes the return value in sanitize_term_field on success.
    452454 *
     
    479481 *
    480482 * @package WordPress
    481483 * @subpackage Taxonomy
    482  * @since 2.3
     484 * @since 2.3.0
    483485 *
    484486 * @uses sanitize_term() Passes the return value on success
    485487 *
     
    543545 *
    544546 * @package WordPress
    545547 * @subpackage Taxonomy
    546  * @since 2.3
     548 * @since 2.3.0
    547549 *
    548550 * @uses $wpdb
    549551 * @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings.
     
    757759 *
    758760 * @package WordPress
    759761 * @subpackage Taxonomy
    760  * @since 2.3
     762 * @since 2.3.0
    761763 *
    762764 * @uses $wpdb
    763765 *
     
    811813 *
    812814 * @package WordPress
    813815 * @subpackage Taxonomy
    814  * @since 2.3
     816 * @since 2.3.0
    815817 *
    816818 * @uses sanitize_term_field Used to sanitize all fields in a term
    817819 *
     
    856858 *
    857859 * @package WordPress
    858860 * @subpackage Taxonomy
    859  * @since 2.3
     861 * @since 2.3.0
    860862 *
    861863 * @uses $wpdb
    862864 *
     
    916918 *
    917919 * @package WordPress
    918920 * @subpackage Taxonomy
    919  * @since 2.3
     921 * @since 2.3.0
    920922 *
    921923 * @uses $wpdb
    922924 * @uses wp_parse_args() Turns strings into arrays and merges defaults into an array.
     
    948950 *
    949951 * @package WordPress
    950952 * @subpackage Taxonomy
    951  * @since 2.3
     953 * @since 2.3.0
    952954 * @uses $wpdb
    953955 *
    954956 * @param int $object_id The term Object Id that refers to the term
     
    981983 *
    982984 * @package WordPress
    983985 * @subpackage Taxonomy
    984  * @since 2.3
     986 * @since 2.3.0
    985987 *
    986988 * @uses $wpdb
    987989 * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action
     
    10751077 *
    10761078 * @package WordPress
    10771079 * @subpackage Taxonomy
    1078  * @since 2.3
     1080 * @since 2.3.0
    10791081 * @uses $wpdb
    10801082 *
    10811083 * @param int|array $object_id The id of the object(s) to retrieve.
     
    11991201 *
    12001202 * @package WordPress
    12011203 * @subpackage Taxonomy
    1202  * @since 2.3
     1204 * @since 2.3.0
    12031205 * @uses $wpdb
    12041206 *
    12051207 * @uses do_action() Calls 'create_term' hook with the term id and taxonomy id as parameters.
     
    13041306 *
    13051307 * @package WordPress
    13061308 * @subpackage Taxonomy
    1307  * @since 2.3
     1309 * @since 2.3.0
    13081310 * @uses $wpdb
    13091311 *
    13101312 * @param int $object_id The object to relate to.
     
    13901392 *
    13911393 * @package WordPress
    13921394 * @subpackage Taxonomy
    1393  * @since 2.3
     1395 * @since 2.3.0
    13941396 * @uses $wpdb
    13951397 *
    13961398 * @param string $slug The string that will be tried for a unique slug
     
    14571459 *
    14581460 * @package WordPress
    14591461 * @subpackage Taxonomy
    1460  * @since 2.3
     1462 * @since 2.3.0
    14611463 *
    14621464 * @uses $wpdb
    14631465 * @uses do_action() Will call both 'edit_term' and 'edit_$taxonomy' twice.
     
    15541556/**
    15551557 * Enable or disable term counting.
    15561558 *
    1557  * @since 2.6
     1559 * @since 2.5.0
    15581560 *
    1559  * @param bool $defer Optional.
    1560  * @return bool
     1561 * @param bool $defer Optional. Enable if true, disable if false.
     1562 * @return bool Whether term counting is enabled or disabled.
    15611563 */
    1562 function wp_defer_term_counting($defer=NULL) {
     1564function wp_defer_term_counting($defer=null) {
    15631565        static $_defer = false;
    15641566
    15651567        if ( is_bool($defer) ) {
    15661568                $_defer = $defer;
    15671569                // flush any deferred counts
    15681570                if ( !$defer )
    1569                         wp_update_term_count( NULL, NULL, true );
     1571                        wp_update_term_count( null, null, true );
    15701572        }
    15711573
    15721574        return $_defer;
     
    15831585 *
    15841586 * @package WordPress
    15851587 * @subpackage Taxonomy
    1586  * @since 2.3
     1588 * @since 2.3.0
    15871589 * @uses $wpdb
    15881590 *
    15891591 * @param int|array $terms The ID of the terms
     
    16191621/**
    16201622 * Perform term count update immediately.
    16211623 *
    1622  * @since 2.6
     1624 * @since 2.5.0
    16231625 *
    16241626 * @param array $terms IDs of Terms to update.
    16251627 * @param string $taxonomy The context of the term.
     
    16611663 *
    16621664 * @package WordPress
    16631665 * @subpackage Taxonomy
    1664  * @since 2.3
     1666 * @since 2.3.0
    16651667 *
    16661668 * @see get_object_taxonomies() for more on $object_type
    16671669 * @uses do_action() Will call action hook named, 'clean_object_term_cache' after completion.
     
    16871689 *
    16881690 * @package WordPress
    16891691 * @subpackage Taxonomy
    1690  * @since 2.3
     1692 * @since 2.3.0
    16911693 * @uses $wpdb
    16921694 *
    16931695 * @param int|array $ids Single or list of Term IDs
     
    17331735 *
    17341736 * @package WordPress
    17351737 * @subpackage Taxonomy
    1736  * @since 2.3
     1738 * @since 2.3.0
    17371739 *
    17381740 * @uses wp_cache_get() Retrieves taxonomy relationship from cache
    17391741 *
     
    17621764 *
    17631765 * @package WordPress
    17641766 * @subpackage Taxonomy
    1765  * @since 2.3
     1767 * @since 2.3.0
    17661768 * @uses wp_get_object_terms() Used to get terms from the database to update
    17671769 *
    17681770 * @param string|array $object_ids Single or list of term object ID(s)
     
    18221824 *
    18231825 * @package WordPress
    18241826 * @subpackage Taxonomy
    1825  * @since 2.3
     1827 * @since 2.3.0
    18261828 *
    18271829 * @param array $terms List of Term objects to change
    18281830 * @param string $taxonomy Optional. Update Term to this taxonomy in cache
     
    18481850 * @package WordPress
    18491851 * @subpackage Taxonomy
    18501852 * @access private
    1851  * @since 2.3
     1853 * @since 2.3.0
    18521854 *
    18531855 * @uses update_option() Stores all of the children in "$taxonomy_children"
    18541856 *       option. That is the name of the taxonomy, immediately followed by '_children'.
     
    18851887 * @package WordPress
    18861888 * @subpackage Taxonomy
    18871889 * @access private
    1888  * @since 2.3
     1890 * @since 2.3.0
    18891891 *
    18901892 * @param int $term_id Look for this Term ID in $terms
    18911893 * @param array $terms List of Term IDs
     
    19421944 * @package WordPress
    19431945 * @subpackage Taxonomy
    19441946 * @access private
    1945  * @since 2.3
     1947 * @since 2.3.0
    19461948 * @uses $wpdb
    19471949 *
    19481950 * @param array $terms List of Term IDs
     
    20052007 * @package WordPress
    20062008 * @subpackage Taxonomy
    20072009 * @access private
    2008  * @since 2.3
     2010 * @since 2.3.0
    20092011 * @uses $wpdb
    20102012 *
    20112013 * @param array $terms List of Term IDs
     
    20232025/**
    20242026 * Generates a permalink for a taxonomy term archive.
    20252027 *
    2026  * @since 2.6
     2028 * @since 2.5.0
    20272029 *
    20282030 * @param object|int|string $term
    20292031 * @param string $taxonomy
     
    20792081 * 'sep' : default is empty string. Separate every taxonomy with value in this.
    20802082 * 'after' : default is empty string. Display this after the taxonomies list.
    20812083 *
    2082  * @since 2.6
     2084 * @since 2.5.0
    20832085 * @uses get_the_taxonomies()
    20842086 *
    20852087 * @param array $args Override the defaults.
     
    21042106 * This function can be used within the loop. It will also return an array of
    21052107 * the taxonomies with links to the taxonomy and name.
    21062108 *
    2107  * @since 2.6
     2109 * @since 2.5.0
    21082110 *
    21092111 * @param int $post Optional. Post ID or will use Global Post ID (in loop).
    21102112 * @return array
     
    21492151/**
    21502152 * Retrieve all taxonomies of a post with just the names.
    21512153 *
    2152  * @since 2.6
     2154 * @since 2.5.0
    21532155 * @uses get_object_taxonomies()
    21542156 *
    21552157 * @param int $post Optional. Post ID