diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/theme-editor.php --- a/wp/wp-admin/theme-editor.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/theme-editor.php Tue Sep 27 16:37:53 2022 +0200 @@ -1,6 +1,6 @@ ' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '
' ); } +// Used in the HTML title tag. $title = __( 'Edit Themes' ); $parent_file = 'themes.php'; @@ -26,9 +27,9 @@ 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => - '' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '
' . + '' . __( 'You can use the theme file editor to edit the individual CSS and PHP files which make up your theme.' ) . '
' . '' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '
' . - '' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '
' . + '' . __( 'For PHP files, you can use the documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '
' . '' . __( 'When using a keyboard to navigate:' ) . '
' . '' . __( 'For more information:' ) . '
' . '' . __( 'Documentation on Theme Development' ) . '
' . - '' . __( 'Documentation on Using Themes' ) . '
' . + '' . __( 'Documentation on Editing Themes' ) . '
' . '' . __( 'Documentation on Editing Files' ) . '
' . '' . __( 'Documentation on Template Tags' ) . '
' . '' . __( 'Support' ) . '
' @@ -195,14 +196,14 @@ - +
built-in CSS editor.' ), + __( 'There is no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.' ), esc_url( add_query_arg( 'autofocus[section]', 'custom_css', admin_url( 'customize.php' ) ) ) ); ?> @@ -342,10 +343,12 @@ $excluded_referer_basenames = array( 'theme-editor.php', 'wp-login.php' ); - if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { - $return_url = $referer; - } else { - $return_url = admin_url( '/' ); + $return_url = admin_url( '/' ); + if ( $referer ) { + $referer_path = parse_url( $referer, PHP_URL_PATH ); + if ( is_string( $referer_path ) && ! in_array( basename( $referer_path ), $excluded_referer_basenames, true ) ) { + $return_url = $referer; + } } ?>