plugins_update_check_locales

plugins_update_check_locales

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('plugins_update_check_locales') is found 2 times:

  • /wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php line 381
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    // Install translations.
    $installed_locales = array_values( get_available_languages() );
    /** This filter is documented in wp-includes/update.php */
    $installed_locales = apply_filters( 'plugins_update_check_locales', $installed_locales );
     
    $language_packs = array_map(
        static function ( $item ) {
            return (object) $item;
        },
        $api->language_packs
  • /wp-includes/update.php line 407
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
     *
     * @param string[] $locales Plugin locales. Default is all available locales of the site.
     */
    $locales = apply_filters( 'plugins_update_check_locales', $locales );
    $locales = array_unique( $locales );
     
    if ( $doing_cron ) {
        $timeout = 30; // 30 seconds.
    } else {
        // Three seconds, plus one extra second for every 10 plugins.