| Server IP : 108.167.142.43 / Your IP : 216.73.217.58 Web Server : Apache System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : delarice ( 2406) PHP Version : 8.3.36 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/delarice/www/wp-content/plugins/elementor-pro/modules/atomic-form/ |
Upload File : |
<?php
namespace ElementorPro\Modules\AtomicForm;
use Elementor\Modules\AtomicWidgets\Controls\Types\Switch_Control;
use Elementor\Modules\AtomicWidgets\PropDependencies\Manager as Dependency_Manager;
use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\Boolean_Prop_Type;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Default_Value_Provider {
const TOGGLE_PROP = 'has-default-value';
public static function get_toggle_prop(): Boolean_Prop_Type {
return Boolean_Prop_Type::make()->default( false );
}
public static function get_dependencies(): ?array {
return Dependency_Manager::make()
->where( [
'operator' => 'eq',
'path' => [ self::TOGGLE_PROP ],
'value' => true,
'effect' => 'hide',
] )
->get();
}
public static function get_toggle_control(): Switch_Control {
return Switch_Control::bind_to( self::TOGGLE_PROP )
->set_label( __( 'Default value', 'elementor-pro' ) );
}
}