parent = $parent; $this->field = $field; $this->value = $value; } /** * Field Render Function. * Takes the vars and outputs the HTML for the field in the settings * * @since ReduxFramework 0.0.4 */ function render() { $cb_enabled = $cb_disabled = ''; //no errors, please // //Get selected if ( (int) $this->value == 1 ) { $cb_enabled = ' selected'; } else { $cb_disabled = ' selected'; } //Label ON if ( ! isset( $this->field['on'] ) ) { $on = __( 'On', 'redux-framework' ); } else { $on = $this->field['on']; } //Label OFF if ( ! isset( $this->field['off'] ) ) { $off = __( 'Off', 'redux-framework' ); } else { $off = $this->field['off']; } echo '
'; echo ''; echo ''; //echo ''; echo ''; echo '
'; } //function /** * Enqueue Function. * If this field requires any scripts, or css define this function and register/enqueue the scripts/css * * @since ReduxFramework 0.0.4 */ function enqueue() { wp_enqueue_script( 'redux-field-switch-js', ReduxFramework::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js', array( 'jquery', 'redux-js' ), time(), true ); wp_enqueue_style( 'redux-field-switch-css', ReduxFramework::$_url . 'inc/fields/switch/field_switch.css', time(), true ); } } }