er->add_control(
'pa_condition_loc_method',
array(
'label' => __( 'Location Detect Method', 'premium-addons-for-elementor' ),
'type' => Controls_Manager::SELECT,
'default' => 'old',
'label_block' => true,
'options' => array(
'old' => __( 'Old', 'premium-addons-for-elementor' ),
'new' => __( 'New', 'premium-addons-for-elementor' ),
),
'condition' => array(
'pa_condition_key' => 'ip_location',
),
)
);
$should_apply = apply_filters( 'pa_display_conditions_values', true );
$values = $repeater->get_controls();
if ( $should_apply ) {
// $values = array_values( $values );
}
$element->add_control(
'pa_condition_repeater',
array(
'label' => __( 'Conditions', 'premium-addons-for-elementor' ),
'type' => Controls_Manager::REPEATER,
'label_block' => true,
'fields' => $values,
'title_field' => '<# print( pa_condition_key.replace(/_/g, " ").split(" ").map((s) => s.charAt(0).toUpperCase() + s.substring(1)).join(" ")) #>',
'prevent_empty' => false,
'condition' => array(
'pa_display_conditions_switcher' => 'yes',
),
)
);
$this->add_helpful_information( $element );
$element->end_controls_section();
}
/**
* Add Help & Docs
*
* @since 4.9.39
* @access private
* @param object $element for current element.
*/
private function add_helpful_information( $element ) {
$element->add_control(
'pa_condition_info',
array(
'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ),
'separator' => 'before',
'type' => Controls_Manager::HEADING,
'condition' => array(
'pa_display_conditions_switcher' => 'yes',
),
)
);
$docs = array(
'https://premiumaddons.com/docs/elementor-display-conditions-tutorial/' => __( 'Getting started »', 'premium-addons-for-elementor' ),
'https://premiumaddons.com/docs/elementor-editor-not-loading-with-display-conditions/' => __( 'Fix editor not loading with Display Conditions enabled »', 'premium-addons-for-elementor' ),
'https://premiumaddons.com/docs/how-to-show-hide-element-based-on-browser-elementor-display-conditions/' => __( 'Show/Hide Element Based on Browser »', 'premium-addons-for-elementor' ),
'https://premiumaddons.com/docs/how-to-show-hide-element-on-specific-time-range-elementor-display-conditions/' => __( 'Show/Hide Element Based on Time Range »', 'premium-addons-for-elementor' ),
'https://premiumaddons.com/docs/how-to-show-hide-element-with-location-elementor-display-conditions/' => __( 'Show/Hide Element Based on Location »', 'premium-addons-for-elementor' ),
);
$doc_index = 1;
foreach ( $docs as $url => $title ) {
$doc_url = Helper_Functions::get_campaign_link( $url, 'conditions-addon', 'wp-editor', 'get-support' );
$element->add_control(
'pa_condition_doc_' . $doc_index,
array(
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf( '%s', $doc_url, $title ),
'content_classes' => 'editor-pa-doc',
'condition' => array(
'pa_display_conditions_switcher' => 'yes',
),
)
);
++$doc_index;
}
}
/**
* Check Script Enqueue
*
* Check if the script files should be loaded.
*
* @since 4.9.21
* @access public
*
* @param object $element for current element.
*/
public function check_script_enqueue( $element ) {
if ( self::$load_script ) {
return;
}
$settings = $element->get_active_settings();
if ( ! empty( $settings[ 'pa_display_conditions_switcher' ] ) ) {
$this->enqueue_scripts();
self::$load_script = true;
remove_action( 'elementor/frontend/before_render', array( $this, 'check_script_enqueue' ) );
}
}
/**
* Returns an instance of this class.
*
* @access public
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
}
Fatal error: Uncaught Error: Class 'PremiumAddons\Modules\PA_Display_Conditions\Module' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/premium-addons-for-elementor/includes/addons-integration.php:1727
Stack trace:
#0 /var/www/html/dportilho.com.br/web/wp-content/plugins/premium-addons-for-elementor/includes/addons-integration.php(111): PremiumAddons\Includes\Addons_Integration->load_pa_extensions()
#1 /var/www/html/dportilho.com.br/web/wp-content/plugins/premium-addons-for-elementor/includes/addons-integration.php(1790): PremiumAddons\Includes\Addons_Integration->__construct()
#2 /var/www/html/dportilho.com.br/web/wp-content/plugins/premium-addons-for-elementor/includes/class-pa-core.php(102): PremiumAddons\Includes\Addons_Integration::get_instance()
#3 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): PremiumAddons\Includes\PA_Core->pa_init('')
#4 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/html/dportilho.c in /var/www/html/dportilho.com.br/web/wp-content/plugins/premium-addons-for-elementor/includes/addons-integration.php on line 1727