diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/themes.php | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-upstream.tar.xz wordpress-upstream.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/themes.php')
-rw-r--r-- | wp-admin/themes.php | 19 |
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'] ) ? __( '…' ) : 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( |