settings ) ) { $this->settings = get_option( $this->options_key, array() ); } return isset( $this->settings[ $name ] ) ? $this->settings[ $name ] : $default; } /** * Select template field * * @return void */ public function select_template_field( $value ) { $doc_type = isset( $value['doc_type'] ) ? $value['doc_type'] : 'single'; $templates = jet_woo_builder_post_type()->get_templates_list( $doc_type ); $options = get_option( $this->options_key ); $current_option = str_replace( array( $this->options_key, '[', ']' ), '', $value['id'] ); ?> %s', $value['desc'] ); ?> options_key ); $current_option = str_replace( array( $this->options_key, '[', ']' ), '', $value['id'] ); $default = isset( $value['default'] ) ? $value['default'] : ''; $option_val = isset( $options[ $current_option ] ) ? $options[ $current_option ] : $default; ?> %s', $value['desc'] ); ?> plugin_path( 'includes/settings/class-jet-woo-builder-shop-settings-page.php' ); $settings[ $this->key ] = new Jet_Woo_Builder_Shop_Settings_Page(); return $settings; } /** * Returns the instance. * * @since 1.0.0 * @return object */ public static function get_instance() { // If the single instance hasn't been set, set it now. if ( null == self::$instance ) { self::$instance = new self; } return self::$instance; } } } /** * Returns instance of Jet_Woo_Builder_Shop_Settings * * @return object */ function jet_woo_builder_shop_settings() { return Jet_Woo_Builder_Shop_Settings::get_instance(); }