WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/07/2020 07:23:04 PM (4 months ago)
Author:
whyisjake
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.

This brings the changes from [48750] to the 5.5 branch.

Props johnbillion.
Fixes #50868, see [48750].

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/class-wp-plugins-list-table.php

    r48704 r48756  
    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.