initialize_settings(); } add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) ); } /** * Add options page */ public function add_admin_page() { add_menu_page( esc_html__( 'Adv. Woo Search', 'aws' ), esc_html__( 'Adv. Woo Search', 'aws' ), 'manage_options', 'aws-options', array( &$this, 'display_admin_page' ), 'dashicons-search' ); } /** * Generate and display options page */ public function display_admin_page() { $options = $this->options_array(); $nonce = wp_create_nonce( 'plugin-settings' ); $tabs = array( 'general' => esc_html__( 'General', 'aws' ), 'form' => esc_html__( 'Search Form', 'aws' ), 'results' => esc_html__( 'Search Results', 'aws' ) ); $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_text_field( $_GET['tab'] ); $tabs_html = ''; foreach ( $tabs as $name => $label ) { $tabs_html .= '' . $label . ''; } $tabs_html .= '' . esc_html__( 'Get Premium', 'aws' ) . ''; $tabs_html = '
| ' . esc_html__( 'Activation', 'aws' ) . ' | '; echo '';
echo ' ';
echo esc_html__( 'In case you need to add plugin search form on your website, you can do it in several ways:', 'aws' ) . ' ';
echo ''; echo ' ';
echo '1. ' . esc_html__( 'Enable a "Seamless integration" option ( may not work with some themes )', 'aws' ) . ' ';
echo ''; echo '2. ' . sprintf( esc_html__( 'Add search form using shortcode %s', 'aws' ), " [aws_search_form]" ) . ''; echo '3. ' . esc_html__( 'Add search form as widget for one of your theme widget areas. Go to Appearance -> Widgets and drag&drop AWS Widget to one of your widget areas', 'aws' ) . ' '; echo '4. ' . sprintf( esc_html__( 'Add PHP code to the necessary files of your theme: %s', 'aws' ), " <?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); } ?>" ) . ''; echo ' | ';
echo '
|---|---|
| ' . esc_html__( 'Reindex table', 'aws' ) . ' | '; echo '';
echo ' 0% '; echo '' . sprintf( esc_html__( 'This action only need for %s one time %s - after you activate this plugin. After this all products changes will be re-indexed automatically.', 'aws' ), '', '' ) . ' ' . __( 'Update all data in plugins index table. Index table - table with products data where plugin is searching all typed terms. Use this button if you think that plugin not shows last actual data in its search results. CAUTION: this can take large amount of time.', 'aws' ) . ' ' . esc_html__( 'Products in index:', 'aws' ) . ' ' . AWS_Helpers::get_indexed_products_count() . ''; echo ''; echo ' | ';
echo '
| ' . esc_html__( 'Clear cache', 'aws' ) . ' | '; echo '';
echo ' '; echo '' . esc_html__( 'Clear cache for all search results.', 'aws' ) . ''; echo ' | ';
echo '