id = '';
$this->desc = __( 'General', 'ajax-product-search-woocommerce' );
parent::__construct( $handle_autoload );
}
/**
* get_settings.
*
* @version 1.0.6
* @since 1.0.0
*/
function get_settings( $settings = null ) {
$new_settings = array(
array(
'title' => __( 'General Options', 'ajax-product-search-woocommerce' ),
'type' => 'title',
'id' => 'alg_wc_aps_opt',
),
array(
'title' => 'Pro version',
'enable' => !class_exists('Alg_WC_APS_Pro_Core'),
'type' => 'wccso_metabox',
'accordion' => array(
'title' => __( 'Take a look on some of its features:', 'ajax-product-search-woocommerce' ),
'items' => array(
array(
'trigger' => __( 'Display product thumbnail, price and categories on search results', 'ajax-product-search-woocommerce'),
'img_src' => plugin_dir_url( __FILE__ ) . '../../assets/dist/images/autocomplete.png',
),
array(
'trigger' => __( 'Play with some styling options', 'ajax-product-search-woocommerce'),
'img_src' => plugin_dir_url( __FILE__ ) . '../../assets/dist/images/styling-options.gif',
),
array(
'trigger' => __( 'A more complete search widget', 'ajax-product-search-woocommerce'),
'img_src' => plugin_dir_url( __FILE__ ) . '../../assets/dist/images/widget.png',
),
array(
'trigger' => __( 'Select multiple results', 'ajax-product-search-woocommerce' ),
'img_src' => plugin_dir_url( __FILE__ ) . '../../assets/dist/images/multiple-selection.png',
),
array(
'trigger' => __( 'Choose if you want to redirect on search result selection', 'ajax-product-search-woocommerce' ),
),
array(
'trigger' => __( 'Support', 'ajax-product-search-woocommerce' ),
),
),
),
'call_to_action' => array(
'href' => $this->pro_version_url,
'label' => 'Upgrade to Pro version now',
),
'description' => __( 'Do you like the free version of this plugin? Imagine what the Pro version can do for you!', 'ajax-product-search-woocommerce' ) . '
' . sprintf( __( 'Check it out here or on this link: %1$s', 'ajax-product-search-woocommerce' ), esc_url( $this->pro_version_url ) ),
'id' => self::OPTION_METABOX_PRO,
),
array(
'title' => __( 'Enable Plugin', 'ajax-product-search-woocommerce' ),
'desc' => __( 'Enable "Ajax Product Search for WooCommerce" plugin', 'ajax-product-search-woocommerce' ),
'id' => self::OPTION_ENABLE_PLUGIN,
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Load Select2', 'ajax-product-search-woocommerce' ),
'desc' => sprintf( __( 'Loads most recent version of Select2', 'ajax-product-search-woocommerce' ), 'https://select2.github.io/' ),
'desc_tip' => __( 'Mark this only if you are not loading Select2 nowhere else. Select2 is responsible for improving the html select element.', 'ajax-product-search-woocommerce' ).'
'.__( 'It is required for this plugin to work. If you are uncertain, please let it enabled.', 'ajax-product-search-woocommerce' ),
'id' => self::OPTION_SELECT2_ENABLE,
'default' => 'yes',
'type' => 'checkbox',
),
array(
'type' => 'sectionend',
'id' => 'alg_wc_aps_opt',
),
);
return parent::get_settings( array_merge( $settings, $new_settings ) );
}
}
}