Taxonomy: Disallow overriding the `name` property when registering a taxonomy.

Props wpfo for initial patch, swissspidy.
Merges [40049] to the 4.7 branch.
Fixes #39308.

Built from https://develop.svn.wordpress.org/branches/4.7@40083


git-svn-id: http://core.svn.wordpress.org/branches/4.7@40020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2017-02-20 06:16:53 +00:00
parent 2dda813ae2
commit 5789e5f074
2 changed files with 3 additions and 1 deletions

View File

@ -333,6 +333,8 @@ final class WP_Taxonomy {
}
}
$args['name'] = $this->name;
foreach ( $args as $property_name => $property_value ) {
$this->$property_name = $property_value;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7.3-alpha-40081';
$wp_version = '4.7.3-alpha-40083';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.