96 } |
96 } |
97 ?> |
97 ?> |
98 <form id="search-themes" method="get"> |
98 <form id="search-themes" method="get"> |
99 <input type="hidden" name="tab" value="search" /> |
99 <input type="hidden" name="tab" value="search" /> |
100 <?php if ( $type_selector ) : ?> |
100 <?php if ( $type_selector ) : ?> |
101 <label class="screen-reader-text" for="typeselector"><?php _e( 'Type of search' ); ?></label> |
101 <label class="screen-reader-text" for="typeselector"> |
|
102 <?php |
|
103 /* translators: Hidden accessibility text. */ |
|
104 _e( 'Type of search' ); |
|
105 ?> |
|
106 </label> |
102 <select name="type" id="typeselector"> |
107 <select name="type" id="typeselector"> |
103 <option value="term" <?php selected( 'term', $type ); ?>><?php _e( 'Keyword' ); ?></option> |
108 <option value="term" <?php selected( 'term', $type ); ?>><?php _e( 'Keyword' ); ?></option> |
104 <option value="author" <?php selected( 'author', $type ); ?>><?php _e( 'Author' ); ?></option> |
109 <option value="author" <?php selected( 'author', $type ); ?>><?php _e( 'Author' ); ?></option> |
105 <option value="tag" <?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Theme Installer' ); ?></option> |
110 <option value="tag" <?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Theme Installer' ); ?></option> |
106 </select> |
111 </select> |
107 <label class="screen-reader-text" for="s"> |
112 <label class="screen-reader-text" for="s"> |
108 <?php |
113 <?php |
109 switch ( $type ) { |
114 switch ( $type ) { |
110 case 'term': |
115 case 'term': |
|
116 /* translators: Hidden accessibility text. */ |
111 _e( 'Search by keyword' ); |
117 _e( 'Search by keyword' ); |
112 break; |
118 break; |
113 case 'author': |
119 case 'author': |
|
120 /* translators: Hidden accessibility text. */ |
114 _e( 'Search by author' ); |
121 _e( 'Search by author' ); |
115 break; |
122 break; |
116 case 'tag': |
123 case 'tag': |
|
124 /* translators: Hidden accessibility text. */ |
117 _e( 'Search by tag' ); |
125 _e( 'Search by tag' ); |
118 break; |
126 break; |
119 } |
127 } |
120 ?> |
128 ?> |
121 </label> |
129 </label> |
122 <?php else : ?> |
130 <?php else : ?> |
123 <label class="screen-reader-text" for="s"><?php _e( 'Search by keyword' ); ?></label> |
131 <label class="screen-reader-text" for="s"> |
|
132 <?php |
|
133 /* translators: Hidden accessibility text. */ |
|
134 _e( 'Search by keyword' ); |
|
135 ?> |
|
136 </label> |
124 <?php endif; ?> |
137 <?php endif; ?> |
125 <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr( $term ); ?>" autofocus="autofocus" /> |
138 <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr( $term ); ?>" autofocus="autofocus" /> |
126 <?php submit_button( __( 'Search' ), '', 'search', false ); ?> |
139 <?php submit_button( __( 'Search' ), '', 'search', false ); ?> |
127 </form> |
140 </form> |
128 <?php |
141 <?php |
173 </form> |
186 </form> |
174 <?php |
187 <?php |
175 } |
188 } |
176 |
189 |
177 /** |
190 /** |
|
191 * Displays a form to upload themes from zip files. |
|
192 * |
178 * @since 2.8.0 |
193 * @since 2.8.0 |
179 */ |
194 */ |
180 function install_themes_upload() { |
195 function install_themes_upload() { |
181 ?> |
196 ?> |
182 <p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install or update it by uploading it here.' ); ?></p> |
197 <p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install or update it by uploading it here.' ); ?></p> |
183 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>"> |
198 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo esc_url( self_admin_url( 'update.php?action=upload-theme' ) ); ?>"> |
184 <?php wp_nonce_field( 'theme-upload' ); ?> |
199 <?php wp_nonce_field( 'theme-upload' ); ?> |
185 <label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label> |
200 <label class="screen-reader-text" for="themezip"> |
|
201 <?php |
|
202 /* translators: Hidden accessibility text. */ |
|
203 _e( 'Theme zip file' ); |
|
204 ?> |
|
205 </label> |
186 <input type="file" id="themezip" name="themezip" accept=".zip" /> |
206 <input type="file" id="themezip" name="themezip" accept=".zip" /> |
187 <?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?> |
207 <?php submit_button( _x( 'Install Now', 'theme' ), '', 'install-theme-submit', false ); ?> |
188 </form> |
208 </form> |
189 <?php |
209 <?php |
190 } |
210 } |
191 |
211 |
192 /** |
212 /** |
221 if ( ! isset( $wp_list_table ) ) { |
241 if ( ! isset( $wp_list_table ) ) { |
222 $wp_list_table = _get_list_table( 'WP_Theme_Install_List_Table' ); |
242 $wp_list_table = _get_list_table( 'WP_Theme_Install_List_Table' ); |
223 } |
243 } |
224 $wp_list_table->prepare_items(); |
244 $wp_list_table->prepare_items(); |
225 $wp_list_table->display(); |
245 $wp_list_table->display(); |
226 |
|
227 } |
246 } |
228 |
247 |
229 /** |
248 /** |
230 * Displays theme information in dialog box form. |
249 * Displays theme information in dialog box form. |
231 * |
250 * |