Changeset 29634 for trunk/src/wp-admin/theme-install.php
- Timestamp:
- 08/27/2014 01:31:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/theme-install.php
r29596 r29634 27 27 $submenu_file = 'themes.php'; 28 28 } 29 30 $tabs = array(31 'upload' => __( 'Upload Theme' ),32 'browse-themes' => _x( 'Browse', 'themes' ),33 );34 29 35 30 $sections = array( … … 114 109 ?> 115 110 <div class="wrap"> 116 <h2> 117 <?php echo esc_html( $title ); ?> 118 <?php 119 /** 120 * Filter the tabs shown on the Install Themes screen. 121 * 122 * @since 2.8.0 123 * @param array $tabs The tabs shown on the Install Themes screen. Defaults are 124 * 'upload' and 'browse-themes'. 125 */ 126 $tabs = apply_filters( 'install_themes_tabs', $tabs ); 127 foreach ( $tabs as $tab_slug => $tab_name ) { 128 echo '<a href="#" class="' . esc_attr( $tab_slug ) . ' add-new-h2">' . $tab_name . '</a>'; 129 } 130 ?> 131 </h2> 111 <h2><?php 112 echo esc_html( $title ); 113 114 /** 115 * Filter the tabs shown on the Add Themes screen. 116 * 117 * This filter is for backwards compatibility only, 118 * for the suppression of the upload tab. 119 * 120 * @since 2.8.0 121 * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'. 122 */ 123 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); 124 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { 125 echo ' <a href="#" class="upload add-new-h2">' . __( 'Upload Theme' ) . '</a>'; 126 echo ' <a href="#" class="browse-themes add-new-h2">' . _x( 'Browse', 'themes' ) . '</a>'; 127 } 128 ?></h2> 132 129 133 130 <div class="upload-theme">
Note: See TracChangeset
for help on using the changeset viewer.