[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-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
/
atomic-widgets
/
database
/
migrations
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 add-capabilities.php
768 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: add-capabilities.php
<?php namespace Elementor\Modules\AtomicWidgets\Database\Migrations; use Elementor\Core\Database\Base_Migration; class Add_Capabilities extends Base_Migration { const ACCESS_STYLES_TAB = 'elementor_atomic_widgets_access_styles_tab'; const EDIT_LOCAL_CSS_CLASS = 'elementor_atomic_widgets_edit_local_css_class'; public function up() { $capabilities = [ self::ACCESS_STYLES_TAB => [ 'administrator', 'editor', 'author', 'contributor', 'shop_manager' ], self::EDIT_LOCAL_CSS_CLASS => [ 'administrator', 'editor', 'author', 'contributor', 'shop_manager' ], ]; foreach ( $capabilities as $cap => $roles ) { foreach ( $roles as $role_name ) { $role = get_role( $role_name ); if ( $role ) { $role->add_cap( $cap ); } } } } }