Make WordPress Core

Ticket #58404: 58404-3.patch

File 58404-3.patch, 768 bytes (added by nihar007, 10 months ago)

I tested my last patch and saw, there was some unwanted code. I'm so sorry for this. I added the correct code and also wrote the right comment.

  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index 71280f0437..5177132676 100644
    a b function wp_update_term( $term_id, $taxonomy, $args = array() ) { 
    31623162                return new WP_Error( 'invalid_term', __( 'Empty Term.' ) );
    31633163        }
    31643164
     3165        /**
     3166        * Filters a term before it is sanitized and updated into the database.
     3167        *
     3168        * @since 6.4
     3169        *
     3170        * @param WP_Term         $term     Term object
     3171        * @param string          $taxonomy Taxonomy slug.
     3172        * @param array           $args     Array of arguments passed to wp_update_term().
     3173        */
     3174        $term = apply_filters( 'pre_update_term', $term, $taxonomy, $args );
     3175
    31653176        $term = (array) $term->data;
    31663177
    31673178        // Escape data pulled from DB.