field['id']; if ( 'new' == $existing ) { $field_prefix = 'data-'; } // visual builder if( $js ){ $name = $existing; } // preview if ( ! empty( $this->field['preview'] ) ){ $preview = 'preview-'. $this->field['preview']; } // primary if( isset( $this->field['primary'] ) ){ $primary = $this->field['primary']; } if( isset( $this->field['secondary'] ) ){ $secondary = $this->field['secondary']; } if( empty( $this->field['options'][$primary][2] ) ){ $this->field['options'][$primary][2] = ''; } // output ----- if( empty( $this->field['options'] ) ){ echo 'please enter default fields'; return false; } echo '
'; echo ''; echo ''. esc_html__( 'Add new', 'mfn-opts' ) .''; echo '
'; // visual builder if( ! $vb ){ echo $this->get_description(); } } /** * Enqueue */ public function enqueue() { wp_enqueue_script( 'mfn-opts-field-tabs', MFN_OPTIONS_URI .'fields/tabs/field_tabs.js', array( 'jquery' ), MFN_THEME_VERSION, true ); } }