value ) { $cb_enabled = ' selected'; } else { $cb_disabled = ' selected'; } // Label ON. $this->field['on'] = $this->field['on'] ?? esc_html__( 'On', 'redux-framework' ); // Label OFF. $this->field['off'] = $this->field['off'] ?? esc_html__( 'Off', 'redux-framework' ); echo '
'; } /** * Enqueue Function. * If this field requires any scripts, or css define this function and register/enqueue the scripts/css * * @since ReduxFramework 0.0.4 */ public function enqueue() { wp_enqueue_script( 'redux-field-switch', Redux_Core::$url . 'inc/fields/switch/redux-switch' . Redux_Functions::is_min() . '.js', array( 'jquery', 'redux-js' ), $this->timestamp, true ); if ( $this->parent->args['dev_mode'] ) { wp_enqueue_style( 'redux-field-switch', Redux_Core::$url . 'inc/fields/switch/redux-switch.css', array(), $this->timestamp ); } } } } class_alias( 'Redux_Switch', 'ReduxFramework_Switch' );