mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -716,9 +716,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
);
|
||||
}
|
||||
|
||||
$type = 'theme';
|
||||
/** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
|
||||
$auto_update_forced = apply_filters( "auto_update_{$type}", null, $auto_update_filter_payload );
|
||||
$auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, $auto_update_filter_payload );
|
||||
|
||||
$prepared_themes[ $slug ] = array(
|
||||
'id' => $slug,
|
||||
|
||||
Reference in New Issue
Block a user