Make WordPress Core

Ticket #56754: #56754.patch

File #56754.patch, 944 bytes (added by hilayt24, 2 years ago)

I fixed the PHPCS errors and checked the changes in the site also.

  • src/wp-admin/includes/taxonomy.php

    diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php
    index 2326e9eb50..6f6d502711 100644
    a b function wp_insert_category( $catarr, $wp_error = false ) { 
    186186 * @return int|false The ID number of the new or updated Category on success. Zero or FALSE on failure.
    187187 */
    188188function wp_update_category( $catarr ) {
    189         $cat_ID = (int) $catarr['cat_ID'];
     189        $cat_id = (int) $catarr['cat_ID'];
    190190
    191         if ( isset( $catarr['category_parent'] ) && ( $cat_ID == $catarr['category_parent'] ) ) {
     191        if ( isset( $catarr['category_parent'] ) && ( $cat_id == $catarr['category_parent'] ) ) {
    192192                return false;
    193193        }
    194194
    195195        // First, get all of the original fields.
    196         $category = get_term( $cat_ID, 'category', ARRAY_A );
     196        $category = get_term( $cat_id, 'category', ARRAY_A );
    197197        _make_cat_compat( $category );
    198198
    199199        // Escape data pulled from DB.