Expand the Edit Abilities

use Elementor\Controls_Manager; use Elementor\Group_Control_Background; function add_background_and_overlay_to_layout_tab($element, $args) { // === NORMAL BACKGROUND === $element->start_controls_section( ‘custom_background_layout’, [ ‘label’ => __(‘Background (Layout Tab)’, ‘textdomain’), ‘tab’ => Controls_Manager::TAB_LAYOUT, ] ); $element->add_group_control( Group_Control_Background::get_type(), [ ‘name’ => ‘custom_background’, ‘label’ => __(‘Background’, ‘textdomain’), ‘types’ => [‘classic’,…Continue reading

Protect Elementor Forms

/** * Protect Elementor Forms */ add_action( ‘elementor_pro/forms/validation/email’, function( $field, $record, $ajax_handler ) { // validate email format if ( ! is_email( $field[‘value’] ) ) { $ajax_handler->add_error( $field[‘id’], ‘Invalid Email address, it must be in the format [email protected]’ ); return;…Continue reading

Request Approval to add new Plugins

// Prevent new plugin installations but allow updates to existing plugins add_filter(‘user_has_cap’, ‘prevent_plugin_installation_for_all_users’, 10, 4); function prevent_plugin_installation_for_all_users($allcaps, $cap, $args, $user) { // Prevent plugin installation for all users if (isset($args[0]) && $args[0] === ‘install_plugins’) { $allcaps[$cap[0]] = false; } //…Continue reading