id = 'search'; $this->desc = __( 'Search', 'ajax-product-search-woocommerce' ); parent::__construct( $handle_autoload ); } /** * get_settings. * * @version 1.0.0 * @since 1.0.0 */ function get_settings( $settings = null ) { $new_settings = array( array( 'title' => __( 'Cache', 'ajax-product-search-woocommerce' ), 'type' => 'title', 'id' => 'alg_wc_aps_search_cache_opt', ), array( 'title' => __( 'Enable cache', 'ajax-product-search-woocommerce' ), 'desc' => __( 'Saves search results in a transient', 'ajax-product-search-woocommerce' ), 'desc_tip' => __( 'It helps improving search speed in high traffic sites', 'ajax-product-search-woocommerce' ), 'id' => self::OPTION_CACHE_ENABLE, 'default' => 'yes', 'type' => 'checkbox', ), array( 'title' => __( 'Cache timeout', 'ajax-product-search-woocommerce' ), 'desc' => __( 'The amount of time results will be stored in transient (in hours)', 'ajax-product-search-woocommerce' ), 'id' => self::OPTION_CACHE_TIME, 'default' => '4', 'type' => 'number', ), array( 'type' => 'sectionend', 'id' => 'alg_wc_aps_search_cache_opt', ), ); return parent::get_settings( array_merge( $settings, $new_settings ) ); } } }