Skip to content

Commit

Permalink
revert of block autoload settings
Browse files Browse the repository at this point in the history
  • Loading branch information
paul bearne committed Apr 30, 2024
1 parent 9d68d77 commit 7577608
Show file tree
Hide file tree
Showing 37 changed files with 92 additions and 94 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
if ( get_option( 'db_upgraded' ) ) {

flush_rewrite_rules();
update_option( 'db_upgraded', false, 'on' );
update_option( 'db_upgraded', false );

/**
* Fires on the next page load after a successful DB upgrade.
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ function wp_ajax_delete_inactive_widgets() {
$id_base = implode( '-', $pieces );
$widget = get_option( 'widget_' . $id_base );
unset( $widget[ $multi_number ] );
update_option( 'widget_' . $id_base, $widget, 'off' );
update_option( 'widget_' . $id_base, $widget );
unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] );
}

Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-plugin-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function upgrade( $plugin, $args = array() ) {

if ( isset( $past_failure_emails[ $plugin ] ) ) {
unset( $past_failure_emails[ $plugin ] );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails, 'off' );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
}

return true;
Expand Down Expand Up @@ -444,7 +444,7 @@ public function bulk_upgrade( $plugins, $args = array() ) {
unset( $past_failure_emails[ $plugin ] );
}

update_option( 'auto_plugin_theme_update_emails', $past_failure_emails, 'off' );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );

return $results;
}
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-theme-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function upgrade( $theme, $args = array() ) {

if ( isset( $past_failure_emails[ $theme ] ) ) {
unset( $past_failure_emails[ $theme ] );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails, 'off' );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
}

return true;
Expand Down Expand Up @@ -545,7 +545,7 @@ public function bulk_upgrade( $themes, $args = array() ) {
unset( $past_failure_emails[ $theme ] );
}

update_option( 'auto_plugin_theme_update_emails', $past_failure_emails, 'off' );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );

return $results;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-automatic-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ protected function send_plugin_theme_email( $type, $successful_updates, $failed_
$result = wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );

if ( $result ) {
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails, 'off' );
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-plugins-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function prepare_items() {
if ( $screen->in_admin( 'network' ) ) {
update_site_option( 'recently_activated', $recently_activated );
} else {
update_option( 'recently_activated', $recently_activated, 'off' );
update_option( 'recently_activated', $recently_activated );
}

$plugin_info = get_site_transient( 'update_plugins' );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-privacy-policy-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function text_change_check() {

// Cache the result for use before `admin_init` (see above).
if ( $cached !== $state ) {
update_option( '_wp_suggested_policy_text_has_changed', $state, 'off' );
update_option( '_wp_suggested_policy_text_has_changed', $state );
}

return 'changed' === $state;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ public static function create_lock( $lock_name, $release_timeout = null ) {
}

// Update the lock, as by this point we've definitely got a lock, just need to fire the actions.
update_option( $lock_option, time(), 'off' );
update_option( $lock_option, time() );

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
}
}

update_option( 'dashboard_widget_options', $widget_options, 'off' );
update_option( 'dashboard_widget_options', $widget_options );

$locale = get_user_locale();
$cache_key = 'dash_v2_' . md5( $widget_id . '_' . $locale );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
);

if ( ! wp_installing() ) {
update_option( 'ftp_credentials', $stored_credentials, 'off' );
update_option( 'ftp_credentials', $stored_credentials );
}

return $credentials;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function update_recently_edited( $file ) {
$oldfiles[] = $file;
}

update_option( 'recently_edited', $oldfiles, 'off' );
update_option( 'recently_edited', $oldfiles );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selecte
wp_get_nav_menus( array( 'fields' => 'ids' ) )
);

update_option( 'nav_menu_options', $nav_menu_option, 'off' );
update_option( 'nav_menu_options', $nav_menu_option );

wp_defer_term_counting( false );

Expand Down
14 changes: 7 additions & 7 deletions src/wp-admin/includes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
$current = get_option( 'active_plugins', array() );
$current[] = $plugin;
sort( $current );
update_option( 'active_plugins', $current, 'off' );
update_option( 'active_plugins', $current );
}

if ( ! $silent ) {
Expand Down Expand Up @@ -844,7 +844,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
}

if ( $do_blog ) {
update_option( 'active_plugins', $current, 'off' );
update_option( 'active_plugins', $current );
}
if ( $do_network ) {
update_site_option( 'active_sitewide_plugins', $network_current );
Expand Down Expand Up @@ -1072,7 +1072,7 @@ function validate_active_plugins() {
$plugins = get_option( 'active_plugins', array() );
// Validate vartype: array.
if ( ! is_array( $plugins ) ) {
update_option( 'active_plugins', array(), 'off' );
update_option( 'active_plugins', array() );
$plugins = array();
}

Expand Down Expand Up @@ -1306,7 +1306,7 @@ function uninstall_plugin( $plugin ) {
if ( file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
if ( isset( $uninstallable_plugins[ $file ] ) ) {
unset( $uninstallable_plugins[ $file ] );
update_option( 'uninstall_plugins', $uninstallable_plugins, 'off' );
update_option( 'uninstall_plugins', $uninstallable_plugins );
}
unset( $uninstallable_plugins );

Expand All @@ -1321,7 +1321,7 @@ function uninstall_plugin( $plugin ) {
if ( isset( $uninstallable_plugins[ $file ] ) ) {
$callable = $uninstallable_plugins[ $file ];
unset( $uninstallable_plugins[ $file ] );
update_option( 'uninstall_plugins', $uninstallable_plugins, 'off' );
update_option( 'uninstall_plugins', $uninstallable_plugins );
unset( $uninstallable_plugins );

wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
Expand Down Expand Up @@ -2612,7 +2612,7 @@ function deactivated_plugins_notice() {

if ( false === $blog_deactivated_plugins ) {
// Option not in database, add an empty array to avoid extra DB queries on subsequent loads.
update_option( 'wp_force_deactivated_plugins', array(), 'off' );
update_option( 'wp_force_deactivated_plugins', array() );
}

if ( is_multisite() ) {
Expand Down Expand Up @@ -2666,7 +2666,7 @@ function deactivated_plugins_notice() {
}

// Empty the options.
update_option( 'wp_force_deactivated_plugins', array(), 'off' );
update_option( 'wp_force_deactivated_plugins', array() );
if ( is_multisite() ) {
update_site_option( 'wp_force_deactivated_plugins', array() );
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ function populate_options( array $options = array() ) {

// In case it is set, but blank, update "home".
if ( ! __get_option( 'home' ) ) {
update_option( 'home', $guessurl, 'on' );
update_option( 'home', $guessurl );
}

// Delete unused options.
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ function _upgrade_core_deactivate_incompatible_plugins() {
} else {
$deactivated_plugins = get_option( 'wp_force_deactivated_plugins', array() );
$deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg );
update_option( 'wp_force_deactivated_plugins', $deactivated_plugins, 'off' );
update_option( 'wp_force_deactivated_plugins', $deactivated_plugins );
}
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
}
Expand Down
Loading

0 comments on commit 7577608

Please sign in to comment.