populate_roles_260() WordPress Function

This function will populate the roles for a given site. It is useful for sites that need to have a lot of roles, or for sites that are using a custom role system.

populate_roles_260() #

Create and modify WordPress roles for WordPress 2.6.


Source

File: wp-admin/includes/schema.php

function populate_roles_260() {
	$role = get_role( 'administrator' );

	if ( ! empty( $role ) ) {
		$role->add_cap( 'update_plugins' );
		$role->add_cap( 'delete_plugins' );
	}
}


Top ↑

Changelog

Changelog
VersionDescription
2.6.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.