Ticket #15800: 15800.patch
File 15800.patch, 6.1 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/ms.php
797 797 } 798 798 799 799 /** 800 * Output the html for the network Edit Site page tabs 801 * 802 * @since 3.9.0 803 * 804 * @uses apply_filters() Calls 'network_edit_site_tabs' on 'info', 'users', 'themes', and settings tabs. 805 * @uses apply_filters() Calls 'network_edit_site_tab_html' on 'tab_html 806 * 807 * @param int $id The blog_id of the current site being edited. 808 */ 809 function network_edit_site_tabs( $id ) { 810 global $pagenow; 811 $tabs = array( 812 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php' ), 813 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php' ), 814 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php' ), 815 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ), 816 ); 817 $tabs = apply_filters( 'network_edit_site_tabs', $tabs, $id, $pagenow ); 818 819 foreach ( $tabs as $tab_id => $tab ) { 820 if ( isset( $tab['menu-slug'] ) && isset( $tab['callback-function'] ) ) { 821 $menu_slug = plugin_basename( $tab['menu-slug'] ); 822 $html = sprintf( 823 '<a href="%s" class="nav-tab %s">%s</a>', 824 add_query_arg( array( 'id' => $id ), network_admin_url( 'admin.php?page=' . $tab['menu-slug'] ) ), 825 isset( $_GET['page'] ) && $menu_slug == $_GET['page'] ? ' nav-tab-active' : '', 826 esc_html( $tab['label'] ) 827 ); 828 echo $html; 829 $admin_page_hooks[$menu_slug] = sanitize_title( $tab['label'] ); 830 } 831 else { 832 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 833 $tab_html = '<a href="' . $tab['url'] . '?id=' . $id . '" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 834 echo apply_filters( 'network_edit_site_tab_html', $tab_html, $tab, $class, $id ); 835 } 836 } 837 } 838 839 /** 800 840 * Thickbox image paths for Network Admin. 801 841 * 802 842 * @since 3.1.0 -
wp-admin/network/site-info.php
98 98 <div class="wrap"> 99 99 <h2 id="edit-site"><?php echo $title_site_url_linked ?></h2> 100 100 <h3 class="nav-tab-wrapper"> 101 <?php 102 $tabs = array( 103 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php' ), 104 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php' ), 105 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php' ), 106 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ), 107 ); 108 foreach ( $tabs as $tab_id => $tab ) { 109 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 110 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 111 } 112 ?> 101 <?php network_edit_site_tabs( $id ) ?> 113 102 </h3> 114 103 <?php 115 104 if ( ! empty( $messages ) ) { -
wp-admin/network/site-settings.php
89 89 <div class="wrap"> 90 90 <h2 id="edit-site"><?php echo $title_site_url_linked ?></h2> 91 91 <h3 class="nav-tab-wrapper"> 92 <?php 93 $tabs = array( 94 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php' ), 95 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php' ), 96 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php' ), 97 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ), 98 ); 99 foreach ( $tabs as $tab_id => $tab ) { 100 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 101 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 102 } 103 ?> 92 <?php network_edit_site_tabs( $id ) ?> 104 93 </h3> 105 94 <?php 106 95 if ( ! empty( $messages ) ) { -
wp-admin/network/site-themes.php
137 137 <div class="wrap"> 138 138 <h2 id="edit-site"><?php echo $title_site_url_linked ?></h2> 139 139 <h3 class="nav-tab-wrapper"> 140 <?php 141 $tabs = array( 142 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php' ), 143 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php' ), 144 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php' ), 145 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ), 146 ); 147 foreach ( $tabs as $tab_id => $tab ) { 148 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 149 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 150 } 151 ?> 140 <?php network_edit_site_tabs( $id ) ?> 152 141 </h3><?php 153 142 154 143 if ( isset( $_GET['enabled'] ) ) { -
wp-admin/network/site-users.php
186 186 <div class="wrap"> 187 187 <h2 id="edit-site"><?php echo $title_site_url_linked ?></h2> 188 188 <h3 class="nav-tab-wrapper"> 189 <?php 190 $tabs = array( 191 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php' ), 192 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php' ), 193 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php' ), 194 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ), 195 ); 196 foreach ( $tabs as $tab_id => $tab ) { 197 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 198 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 199 } 200 ?> 189 <?php network_edit_site_tabs( $id ) ?> 201 190 </h3><?php 202 191 203 192 if ( isset($_GET['update']) ) :