Make WordPress Core

Changeset 54287


Ignore:
Timestamp:
09/22/2022 11:11:45 AM (19 months ago)
Author:
SergeyBiryukov
Message:

Docs: Use typed array notation for the $locales parameter in plugin update filters.

The value comes from get_available_languages(), which returns an array of strings.

This affects:

  • plugins_update_check_locales filter.
  • update_plugins_{$hostname} filter.

Follow-up to [36630], [46660], [50921], [53933], [54284].

See #55646.

File:
1 edited

Legend:

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

    r54284 r54287  
    401401     * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
    402402     *
    403      * @param array $locales Plugin locales. Default is all available locales of the site.
     403     * @param string[] $locales Plugin locales. Default is all available locales of the site.
    404404     */
    405405    $locales = apply_filters( 'plugins_update_check_locales', $locales );
     
    507507         * @param array       $plugin_data      Plugin headers.
    508508         * @param string      $plugin_file      Plugin filename.
    509          * @param array       $locales          Installed locales to look up translations for.
     509         * @param string[]    $locales          Installed locales to look up translations for.
    510510         */
    511511        $update = apply_filters( "update_plugins_{$hostname}", false, $plugin_data, $plugin_file, $locales );
Note: See TracChangeset for help on using the changeset viewer.