WordPress.org

Make WordPress Core

Ticket #39308: ticket_39308_solution_2.patch

File ticket_39308_solution_2.patch, 524 bytes (added by wpfo, 5 years ago)

ticket_39308_solution_2.patch

  • class-wp-taxonomy.php

     
    334334                }
    335335
    336336                foreach ( $args as $property_name => $property_value ) {
    337                         $this->$property_name = $property_value;
     337                        // Avoid overwriting 'name' Property ('Taxonomy key')
     338                        if ( 'name' !== $property_name ) {
     339                                $this->$property_name = $property_value;
     340                        }
    338341                }
    339342
    340343                $this->labels = get_taxonomy_labels( $this );