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-site-health.php

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