mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +00:00
Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().
Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead. Group multiple operations within a single switch where possible. fixes #21432 git-svn-id: https://develop.svn.wordpress.org/trunk@21414 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -230,8 +230,11 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
echo "<td class='column-$column_name $column_name'$style>"; ?>
|
||||
<a href="<?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
|
||||
<?php
|
||||
if ( 'list' != $mode )
|
||||
echo '<p>' . sprintf( _x( '%1$s – <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</p>';
|
||||
if ( 'list' != $mode ) {
|
||||
switch_to_blog( $blog['blog_id'] );
|
||||
echo '<p>' . sprintf( _x( '%1$s – <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_option( 'blogname' ), get_option( 'blogdescription ' ) ) . '</p>';
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
// Preordered.
|
||||
$actions = array(
|
||||
|
||||
@@ -411,7 +411,10 @@ function fix_import_form_size( $size ) {
|
||||
|
||||
// Edit blog upload space setting on Edit Blog page
|
||||
function upload_space_setting( $id ) {
|
||||
$quota = get_blog_option( $id, 'blog_upload_space' );
|
||||
switch_to_blog( $id );
|
||||
$quota = get_option( 'blog_upload_space' );
|
||||
restore_current_blog();
|
||||
|
||||
if ( !$quota )
|
||||
$quota = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user