test

WPTurbo » Snippets » test
0

Created with:

User role generator

Visibility: 

public

Creator: Todor Rangelov

Customize with WPTurbo AI
X

Add Snippet To Project

New Project
Add To Existing Project
				register_activation_hook( __FILE__, 'frgi_register_custom_user_roles' );

/**
 * Registers a custom user role with specific capabilities.
 *
 * This function is called when the plugin is activated.
 *
 * @since 1.0.0
 *
 * @return void
 */
function frgi_register_custom_user_roles() : void {
	add_role( 'applicant', 'Applicant', [
		"edit_published_posts",
		"read",
		"edit_frgiapplication",
	]);
}
			

Register an account to save your snippets or go Pro to get more features.