Make WordPress Core


Ignore:
Timestamp:
10/06/2013 03:30:51 PM (12 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-includes/update.php.

Props ShinichiN.
Fixes #25467.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r25652 r25699  
    4343        return false;
    4444
    45     $locale = apply_filters( 'core_version_check_locale', get_locale() );
     45    $locale = get_locale();
     46    /**
     47     * Filter the locale requested for WordPress core translations.
     48     *
     49     * @since 2.8.0
     50     *
     51     * @param string $locale Current locale.
     52     */
     53    $locale = apply_filters( 'core_version_check_locale', $locale );
    4654
    4755    // Update last_checked for current to prevent multiple blocking requests if request hangs
     
    213221    $to_send = compact( 'plugins', 'active' );
    214222
     223    $locales = array( get_locale() );
    215224    /**
    216225     * Filter the locales requested for plugin translations.
     
    218227     * @since 3.7.0
    219228     *
    220      * @param array $locales Defaults to the current locale of the site.
     229     * @param array $locales Plugin locale. Default is current locale of the site.
    221230     */
    222     $locales = apply_filters( 'plugins_update_check_locales', array( get_locale() ) );
     231    $locales = apply_filters( 'plugins_update_check_locales', $locales );
    223232
    224233    $options = array(
     
    348357    $request['themes'] = $themes;
    349358
     359    $locales = array( get_locale() );
    350360    /**
    351361     * Filter the locales requested for theme translations.
     
    353363     * @since 3.7.0
    354364     *
    355      * @param array $locales Defaults to the current locale of the site.
     365     * @param array $locales Theme locale. Default is current locale of the site.
    356366     */
    357     $locales = apply_filters( 'themes_update_check_locales', array( get_locale() ) );
     367    $locales = apply_filters( 'themes_update_check_locales', $locales );
    358368
    359369    $options = array(
     
    444454    $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';
    445455
    446     return apply_filters( 'wp_get_update_data', array( 'counts' => $counts, 'title' => $update_title ), $titles );
     456    $update_data = array( 'counts' => $counts, 'title' => $update_title );
     457    /**
     458     * Filter the returned array of update data for plugins, themes, and WordPress core.
     459     *
     460     * @since 3.5.0
     461     *
     462     * @param array $update_data {
     463     *     Fetched update data.
     464     *
     465     *     @type array   $counts       An array of counts for available plugin, theme, and WordPress updates.
     466     *     @type string  $update_title Titles of available updates.
     467     * }
     468     * @param array $titles An array of update counts and UI strings for available updates.
     469     */
     470    return apply_filters( 'wp_get_update_data', $update_data, $titles );
    447471}
    448472
Note: See TracChangeset for help on using the changeset viewer.