get_name()); $element->start_injection([ 'type' => 'control', 'at' => 'after', 'of' => $args['of'], ]); $element->add_group_control( Group_Control_Mask_Image::get_type(), [ 'name' => 'image_masking', 'selector' => '{{WRAPPER}} ' . $args['selector'], 'condition' => $args['condition'], ] ); $element->end_injection(); } /** * @param string $widget_name * @return mixed */ public static function widget_to_args_map($widget_name = '') { $map = [ 'image' => [ 'of' => 'image', 'selector' => '.elementor-image', 'condition' => [] ], 'image-box' => [ 'of' => 'image', 'selector' => '.elementor-image-box-img', 'condition' => [] ], 'ha-card' => [ 'of' => 'image', 'selector' => '.ha-card-figure img', 'condition' => [] ], 'ha-infobox' => [ 'of' => 'image', 'selector' => '.ha-infobox-figure.ha-infobox-figure--image', 'condition' => [ 'type' => 'image' ] ], 'ha-promo-box' => [ 'of' => 'image', 'selector' => '.ha-promo-box-thumb', 'condition' => [] ], 'ha-member' => [ 'of' => 'image', 'selector' => '.ha-member-figure', 'condition' => [] ] ]; return $map[$widget_name]; } } }