From 6f89fc8d453db7989cfb1b8440e15533a07c15ea Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Oct 2025 10:15:30 +0000 Subject: [PATCH] Coding Standards: Use more meaningful variable names in Theme Editor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]: > Don’t abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting. Follow-up to [41721], [60928]. See #63168. Built from https://develop.svn.wordpress.org/trunk@60932 git-svn-id: http://core.svn.wordpress.org/trunk@60268 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/theme-editor.php | 8 +++++--- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index e7fd3fa88b..f82db5986d 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -121,9 +121,11 @@ $edit_error = null; $posted_content = null; if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) { - $r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); - if ( is_wp_error( $r ) ) { - $edit_error = $r; + $edit_result = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); + + if ( is_wp_error( $edit_result ) ) { + $edit_error = $edit_result; + if ( check_ajax_referer( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce', false ) && isset( $_POST['newcontent'] ) ) { $posted_content = wp_unslash( $_POST['newcontent'] ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6b16006fcb..7b4f8e1c05 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60931'; +$wp_version = '6.9-alpha-60932'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.