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

Props wpfo for initial patch.
Fixes #39308.
Built from https://develop.svn.wordpress.org/trunk@40049


git-svn-id: http://core.svn.wordpress.org/trunk@39986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-02-06 19:39:42 +00:00
parent 6de5a9f8e3
commit 71fb840a24
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.8-alpha-40048';
$wp_version = '4.8-alpha-40049';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.