Make WordPress Core


Ignore:
Timestamp:
08/07/2020 04:12:11 PM (6 years 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-site-health.php

    r48742 r48750  
    23732373        );
    23742374
     2375        $type = 'plugin';
    23752376        /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
    2376         $test_plugins_enabled = apply_filters( 'auto_update_plugin', true, $mock_plugin );
     2377        $test_plugins_enabled = apply_filters( "auto_update_{$type}", true, $mock_plugin );
     2378
     2379        $type = 'theme';
    23772380        /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
    2378         $test_themes_enabled    = apply_filters( 'auto_update_theme', true, $mock_theme );
     2381        $test_themes_enabled = apply_filters( "auto_update_{$type}", true, $mock_theme );
     2382
    23792383        $ui_enabled_for_plugins = wp_is_auto_update_enabled_for_type( 'plugin' );
    23802384        $ui_enabled_for_themes  = wp_is_auto_update_enabled_for_type( 'theme' );
Note: See TracChangeset for help on using the changeset viewer.