WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/07/2020 04:12:11 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct usage of the dynamic auto_update_{$type} filter.

This ensures that the canonical name of the filter is used in Site Health debug data, as well as on plugin and theme screens, so the developer reference site remains correct.

Props johnbillion.
Fixes #50868.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r48703 r48750  
    232232            $filter_payload = (object) array_merge( $filter_payload, array_intersect_key( $plugin_data, $filter_payload ) );
    233233
    234             /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */
    235             $auto_update_forced = apply_filters( 'auto_update_plugin', null, $filter_payload );
     234            $type = 'plugin';
     235            /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
     236            $auto_update_forced = apply_filters( "auto_update_{$type}", null, $filter_payload );
     237
    236238            if ( ! is_null( $auto_update_forced ) ) {
    237239                $plugin_data['auto-update-forced'] = $auto_update_forced;
Note: See TracChangeset for help on using the changeset viewer.