Changeset 29218
- Timestamp:
- 07/18/2014 04:49:19 AM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/forms.css
r28179 r29218 466 466 467 467 .search-box input[name="s"], 468 #search-plugins input[name="s"],468 .tablenav .search-plugins input[name="s"], 469 469 .tagsdiv .newtag { 470 470 float: left; -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r29201 r29218 27 27 // These are the tabs which are shown on the page 28 28 $tabs = array(); 29 $tabs['dashboard'] = __( 'Search' ); 29 30 30 if ( 'search' == $tab ) 31 31 $tabs['search'] = __( 'Search Results' ); 32 $tabs['upload'] = __( 'Upload' );33 32 $tabs['featured'] = _x( 'Featured', 'Plugin Installer' ); 34 33 $tabs['popular'] = _x( 'Popular', 'Plugin Installer' ); … … 39 38 } 40 39 41 $nonmenu_tabs = array( ' plugin-information' ); //Valid actions to perform which do not have a Menu item.40 $nonmenu_tabs = array( 'upload', 'plugin-information' ); //Valid actions to perform which do not have a Menu item. 42 41 43 42 /** … … 147 146 $display_tabs = array(); 148 147 foreach ( (array) $tabs as $action => $text ) { 149 $class = ( $action == $tab ) ? ' class="current"' : ''; 148 $class = 'wp-filter-link'; 149 $class .= ( $action == $tab ) ? ' current' : ''; 150 150 $href = self_admin_url('plugin-install.php?tab=' . $action); 151 $display_tabs['plugin-install-'.$action] = "<a href='$href' $class>$text</a>";151 $display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>"; 152 152 } 153 153 154 154 return $display_tabs; 155 } 156 157 /** 158 * Override parent views so we can use the filter bar display. 159 */ 160 public function views() { 161 $views = $this->get_views(); 162 163 /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ 164 $views = apply_filters( "views_{$this->screen->id}", $views ); 165 166 ?> 167 <div class="wp-filter"> 168 <ul class="wp-filter-links"> 169 <?php 170 if ( ! empty( $views ) ) { 171 foreach ( $views as $class => $view ) { 172 $views[ $class ] = "\t<li class='$class'>$view"; 173 } 174 echo implode( " </li>\n", $views ) . "</li>\n"; 175 } 176 ?> 177 </ul> 178 179 <?php install_search_form( false ); ?> 180 </div> 181 <?php 155 182 } 156 183 -
trunk/src/wp-admin/includes/plugin-install.php
r29206 r29218 164 164 $type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term'; 165 165 $term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : ''; 166 167 ?><form id="search-plugins" method="get" action=""> 166 $input_attrs = ''; 167 $button_type = 'button'; 168 169 // assume no $type_selector means it's a simplified search form 170 if ( ! $type_selector ) { 171 $input_attrs = 'class="wp-filter-search" placeholder="' . esc_attr__( 'Search Plugins' ) . '" '; 172 $button_type .= ' screen-reader-text'; 173 } 174 175 ?><form class="search-plugins" method="get" action=""> 168 176 <input type="hidden" name="tab" value="search" /> 169 177 <?php if ( $type_selector ) : ?> … … 174 182 </select> 175 183 <?php endif; ?> 176 <input type="search" name="s" id="plugin-search-input" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" /> 177 <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label> 178 <?php submit_button( __( 'Search Plugins' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?> 184 <label><span class="screen-reader-text"><?php _e('Search Plugins'); ?></span> 185 <input type="search" name="s" value="<?php echo esc_attr($term) ?>" <?php echo $input_attrs; ?>/> 186 </label> 187 <?php submit_button( __( 'Search Plugins' ), $button_type, false, false, array( 'id' => 'search-submit' ) ); ?> 179 188 </form><?php 180 189 } -
trunk/src/wp-admin/plugin-install.php
r27469 r29218 74 74 ?> 75 75 <div class="wrap"> 76 <h2><?php echo esc_html( $title ); ?></h2> 76 <h2> 77 <?php 78 echo esc_html( $title ); 79 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 80 ?> 81 <a href="<?php echo $href; ?>" class="upload add-new-h2"><?php _e( 'Upload Plugin' ); ?></a> 82 </h2> 77 83 78 84 <?php $wp_list_table->views(); ?>
Note: See TracChangeset
for help on using the changeset viewer.