mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +00:00
MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function. This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation. Props spacedmonkey. See #28290. git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -55,9 +55,9 @@ if ( $action ) {
|
||||
unset( $recent[ $plugin ] );
|
||||
update_option( 'recently_activated', $recent );
|
||||
} else {
|
||||
$recent = (array) get_site_option( 'recently_activated' );
|
||||
$recent = (array) get_network_option( 'recently_activated' );
|
||||
unset( $recent[ $plugin ] );
|
||||
update_site_option( 'recently_activated', $recent );
|
||||
update_network_option( 'recently_activated', $recent );
|
||||
}
|
||||
|
||||
if ( isset($_GET['from']) && 'import' == $_GET['from'] ) {
|
||||
@@ -101,7 +101,7 @@ if ( $action ) {
|
||||
if ( ! is_network_admin() ) {
|
||||
$recent = (array) get_option('recently_activated' );
|
||||
} else {
|
||||
$recent = (array) get_site_option('recently_activated' );
|
||||
$recent = (array) get_network_option( 'recently_activated' );
|
||||
}
|
||||
|
||||
foreach ( $plugins as $plugin ) {
|
||||
@@ -111,7 +111,7 @@ if ( $action ) {
|
||||
if ( ! is_network_admin() ) {
|
||||
update_option( 'recently_activated', $recent );
|
||||
} else {
|
||||
update_site_option( 'recently_activated', $recent );
|
||||
update_network_option( 'recently_activated', $recent );
|
||||
}
|
||||
|
||||
wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") );
|
||||
@@ -182,7 +182,7 @@ if ( $action ) {
|
||||
if ( ! is_network_admin() ) {
|
||||
update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) );
|
||||
} else {
|
||||
update_site_option( 'recently_activated', array( $plugin => time() ) + (array) get_site_option( 'recently_activated' ) );
|
||||
update_network_option( 'recently_activated', array( $plugin => time() ) + (array) get_network_option( 'recently_activated' ) );
|
||||
}
|
||||
|
||||
if ( headers_sent() )
|
||||
@@ -220,7 +220,7 @@ if ( $action ) {
|
||||
if ( ! is_network_admin() ) {
|
||||
update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) );
|
||||
} else {
|
||||
update_site_option( 'recently_activated', $deactivated + (array) get_site_option( 'recently_activated' ) );
|
||||
update_network_option( 'recently_activated', $deactivated + (array) get_network_option( 'recently_activated' ) );
|
||||
}
|
||||
|
||||
wp_redirect( self_admin_url("plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s") );
|
||||
@@ -382,7 +382,7 @@ if ( $action ) {
|
||||
if ( ! is_network_admin() ) {
|
||||
update_option( 'recently_activated', array() );
|
||||
} else {
|
||||
update_site_option( 'recently_activated', array() );
|
||||
update_network_option( 'recently_activated', array() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user