2024-03-12 14:48:43 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Modify user roles capabilities
|
|
|
|
*
|
|
|
|
* Docs: https://wordpress.org/documentation/article/roles-and-capabilities/
|
|
|
|
*
|
2024-04-03 03:21:48 +02:00
|
|
|
* @package Xarxaprod_theme
|
|
|
|
* @since Xarxaprod_theme 1.0.0
|
2024-03-12 14:48:43 +01:00
|
|
|
*/
|
|
|
|
// https://wordpress.stackexchange.com/questions/4191/allow-editors-to-edit-menus
|
|
|
|
// add editor the privilege to edit theme
|
|
|
|
|
|
|
|
// get the the role object
|
|
|
|
$role_object = get_role( 'editor' );
|
|
|
|
|
|
|
|
// add $cap capability to this role object
|
|
|
|
// add edit theme
|
|
|
|
$role_object->add_cap( 'edit_theme_options' );
|
|
|
|
// add export CF7 DB
|
|
|
|
$role_object->add_cap( 'cfdb7_access' );
|