WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2016 04:55:01 AM (3 years ago)
Author:
wonderboymusic
Message:

Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r38028 r38457  
    9292        }
    9393
     94        $blog_id = get_current_blog_id();
    9495        if ( is_multisite() ) {
    9596            if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
    96                 printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) );
     97                printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ), network_admin_url( 'theme-install.php' ) );
    9798
    9899                return;
    99100            } elseif ( current_user_can( 'manage_network_themes' ) ) {
    100                 printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ) );
     101                printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ) );
    101102
    102103                return;
Note: See TracChangeset for help on using the changeset viewer.