Make WordPress Core


Ignore:
Timestamp:
10/20/2020 05:37:16 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Introduce a wrapper for the auto_update_{$type} filter checks.

This allows for cleaner checks whether auto-updates are forced for a plugin or theme.

Follow-up to [48750].

Props rebasaurus, garrett-eclipse, SergeyBiryukov.
Fixes #50875.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r49011 r49241  
    717717        }
    718718
    719         $type = 'theme';
    720         /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
    721         $auto_update_forced = apply_filters( "auto_update_{$type}", null, $auto_update_filter_payload );
     719        $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, $auto_update_filter_payload );
    722720
    723721        $prepared_themes[ $slug ] = array(
Note: See TracChangeset for help on using the changeset viewer.