WordPress.org

Make WordPress Core

Changeset 16978


Ignore:
Timestamp:
12/16/10 06:12:55 (4 years ago)
Author:
nacin
Message:

Use maybe_network_admin_url. see #15840.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import.php

    r16976 r16978  
    4545require_once ('admin-header.php'); 
    4646$parent_file = 'tools.php'; 
    47 $href = is_multisite() ? network_admin_url( 'plugin-install.php' ) : admin_url( 'plugin-install.php' ); 
    4847?> 
    4948 
     
    110109            } 
    111110            if ( empty($action) ) 
    112                 $action = '<a href="' . esc_url( $href . '?tab=plugin-information&plugin=' . $plugin_slug . 
    113                                         '&from=import&TB_iframe=true&width=600&height=550' ) . '" class="thickbox" title="' . 
     111                $action = '<a href="' . esc_url( maybe_network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . 
     112                                        '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' . 
    114113                                        esc_attr__('Install importer') . '">' . $data[0] . '</a>'; 
    115114        } else { 
     
    132131 
    133132if ( current_user_can('install_plugins') ) 
    134     echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( $href . '?tab=search&type=tag&s=importer' ) ) . '</p>'; 
     133    echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( maybe_network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>'; 
    135134?> 
    136135 
  • trunk/wp-admin/includes/update.php

    r16747 r16978  
    9999        $cur->response = ''; 
    100100 
    101     $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 
    102  
    103101    switch ( $cur->response ) { 
    104102    case 'development' : 
    105         return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href ); 
     103        return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], maybe_network_admin_url( 'update-core.php' ) ); 
    106104    break; 
    107105 
    108106    case 'upgrade' : 
    109         return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current); 
     107        return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', maybe_network_admin_url( 'update-core.php' ), $cur->current); 
    110108    break; 
    111109 
     
    133131 
    134132    if ( current_user_can('update_core') ) { 
    135         $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 
    136         $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, $href ); 
     133        $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, maybe_network_admin_url( 'update-core.php' ) ); 
    137134    } else { 
    138135        $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); 
     
    152149 
    153150    if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { 
    154         $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 
    155         $msg .= " <a href='" . $href . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 
     151        $msg .= " <a href='" . maybe_network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 
    156152    } 
    157153 
  • trunk/wp-includes/admin-bar.php

    r16957 r16978  
    275275    $update_title .= '</span>'; 
    276276 
    277     $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 
    278  
    279     $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => $href ) ); 
     277    $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => maybe_network_admin_url( 'update-core.php' ) ) ); 
    280278} 
    281279 
Note: See TracChangeset for help on using the changeset viewer.