Warning: This method has been deprecated. Use WP_Roles::for_site() instead.

WP_Roles::_init() WordPress Method

The WP_Roles::_init() method is used to initialize the roles feature for a site. This method is called internally by the Wordpress core when the feature is first enabled.

WP_Roles::_init() #

Set up the object properties.


Description

The role key is set to the current prefix for the $wpdb object with ‘user_roles’ appended. If the $wp_user_roles global is set, then it will be used and the role option will not be updated or used.


Top ↑

Source

File: wp-includes/class-wp-roles.php

	protected function _init() {
		_deprecated_function( __METHOD__, '4.9.0', 'WP_Roles::for_site()' );

		$this->for_site();
	}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Use WP_Roles::for_site()
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.