Make WordPress Core


Ignore:
Timestamp:
08/03/2012 05:51:42 PM (12 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-sites-list-table.php

    r21323 r21414  
    231231                            <a href="<?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
    232232                            <?php
    233                             if ( 'list' != $mode )
    234                                 echo '<p>' . sprintf( _x( '%1$s &#8211; <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>';
     233                            if ( 'list' != $mode ) {
     234                                switch_to_blog( $blog['blog_id'] );
     235                                echo '<p>' . sprintf( _x( '%1$s &#8211; <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_option( 'blogname' ), get_option( 'blogdescription ' ) ) . '</p>';
     236                                restore_current_blog();
     237                            }
    235238
    236239                            // Preordered.
Note: See TracChangeset for help on using the changeset viewer.