populate_roles_280() WordPress Function

This function will allow you to add new roles to your Wordpress site. This is useful if you want to add a new user type, or if you want to change the capabilities of an existing user type.

populate_roles_280() #

Create and modify WordPress roles for WordPress 2.8.


Source

File: wp-admin/includes/schema.php

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

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


Top ↑

Changelog

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