Roles: Fix a PHP error introduced in [39082].
The now deprecated `WP_Roles::reinit()` method was trying to call `__deprecated_function()`, instead of `_deprecated_function()`. See 23016. git-svn-id: https://develop.svn.wordpress.org/trunk@39088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5d924daeb3
commit
d4de97ad6f
@ -149,7 +149,7 @@ class WP_Roles {
|
||||
* @access public
|
||||
*/
|
||||
public function reinit() {
|
||||
__deprecated_function( __METHOD__, '4.7.0', 'new WP_Roles()' );
|
||||
_deprecated_function( __METHOD__, '4.7.0', 'new WP_Roles()' );
|
||||
$this->_init();
|
||||
}
|
||||
|
||||
|
@ -1654,4 +1654,13 @@ class Tests_User_Capabilities extends WP_UnitTestCase {
|
||||
public function _hook_wp_roles_init( $wp_roles ) {
|
||||
$wp_roles->add_role( $this->_role_test_wp_roles_init['role'], $this->_role_test_wp_roles_init['info']['name'], $this->_role_test_wp_roles_init['info']['capabilities'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 23016
|
||||
* @expectedDeprecated WP_Roles::reinit
|
||||
*/
|
||||
public function test_wp_roles_reinit_deprecated() {
|
||||
$wp_roles = new WP_Roles();
|
||||
$wp_roles->reinit();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user