summaryrefslogtreecommitdiffstats
path: root/wp-admin/themes.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/themes.php')
-rw-r--r--wp-admin/themes.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 31a2e26..59d3689 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -215,7 +215,9 @@ if ( current_user_can( 'switch_themes' ) ) {
} else {
$themes = wp_prepare_themes_for_js( array( wp_get_theme() ) );
}
-wp_reset_vars( array( 'theme', 'search' ) );
+
+$theme = ! empty( $_REQUEST['theme'] ) ? sanitize_text_field( $_REQUEST['theme'] ) : '';
+$search = ! empty( $_REQUEST['search'] ) ? sanitize_text_field( $_REQUEST['search'] ) : '';
wp_localize_script(
'theme',
@@ -229,12 +231,11 @@ wp_localize_script(
'adminUrl' => parse_url( admin_url(), PHP_URL_PATH ),
),
'l10n' => array(
- 'addNew' => __( 'Add New Theme' ),
- 'search' => __( 'Search Installed Themes' ),
- 'searchPlaceholder' => __( 'Search installed themes...' ), // Placeholder (no ellipsis).
+ 'addNew' => __( 'Add New Theme' ),
+ 'search' => __( 'Search installed themes' ),
/* translators: %d: Number of themes. */
- 'themesFound' => __( 'Number of Themes found: %d' ),
- 'noThemesFound' => __( 'No themes found. Try a different search.' ),
+ 'themesFound' => __( 'Number of Themes found: %d' ),
+ 'noThemesFound' => __( 'No themes found. Try a different search.' ),
),
)
);
@@ -250,14 +251,12 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<h1 class="wp-heading-inline"><?php esc_html_e( 'Themes' ); ?>
<span class="title-count theme-count"><?php echo ! empty( $_GET['search'] ) ? __( '&hellip;' ) : count( $themes ); ?></span>
</h1>
-
<?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html__( 'Add New Theme' ); ?></a>
<?php endif; ?>
-
- <form class="search-form"></form>
-
<hr class="wp-header-end">
+ <form class="search-form search-themes"><p class="search-box"></p></form>
+
<?php
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
wp_admin_notice(