Skip to content

Commit ce984ff

Browse files
Coding Standards: Use more meaningful variable names in Theme Editor.
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60932 602fd350-edb4-49c9-b593-d223f7449a82
1 parent fe9b235 commit ce984ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/wp-admin/theme-editor.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@
121121
$posted_content = null;
122122

123123
if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
124-
$r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) );
125-
if ( is_wp_error( $r ) ) {
126-
$edit_error = $r;
124+
$edit_result = wp_edit_theme_plugin_file( wp_unslash( $_POST ) );
125+
126+
if ( is_wp_error( $edit_result ) ) {
127+
$edit_error = $edit_result;
128+
127129
if ( check_ajax_referer( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce', false ) && isset( $_POST['newcontent'] ) ) {
128130
$posted_content = wp_unslash( $_POST['newcontent'] );
129131
}

0 commit comments

Comments
 (0)