[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
modules
/
global-classes
/
database
/
migrations
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 add-capabilities.php
894 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: add-capabilities.php
<?php namespace Elementor\Modules\GlobalClasses\Database\Migrations; use Elementor\Core\Database\Base_Migration; class Add_Capabilities extends Base_Migration { const UPDATE_CLASS = 'elementor_global_classes_update_class'; const REMOVE_CSS_CLASS = 'elementor_global_classes_remove_class'; const APPLY_CSS_CLASS = 'elementor_global_classes_apply_class'; public function up() { $capabilities = [ self::UPDATE_CLASS => [ 'administrator' ], self::REMOVE_CSS_CLASS => [ 'administrator', 'editor', 'author', 'contributor', 'shop_manager' ], self::APPLY_CSS_CLASS => [ 'administrator', 'editor', 'author', 'contributor', 'shop_manager' ], ]; foreach ( $capabilities as $capability => $roles ) { foreach ( $roles as $role_name ) { $role = get_role( $role_name ); if ( $role ) { $role->add_cap( $capability ); } } } } }