Make WordPress Core

Changeset 60932


Ignore:
Timestamp:
10/14/2025 10:13:41 AM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use more meaningful variable names in Theme Editor.

Per the Naming Conventions:

Don’t abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to [41721], [60928].

See #63168.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/theme-editor.php

    r60681 r60932  
    122122
    123123if ( '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'] );
Note: See TracChangeset for help on using the changeset viewer.