Changeset 2775870
- Timestamp:
- 08/26/2022 02:44:11 AM (4 years ago)
- Location:
- keyspider-search/trunk
- Files:
-
- 8 edited
-
README.txt (modified) (5 diffs)
-
admin/class-keyspider-search-admin-action.php (modified) (1 diff)
-
admin/templates/authorize.php (modified) (1 diff)
-
includes/class-keyspider-search.php (modified) (2 diffs)
-
keyspider-search.php (modified) (2 diffs)
-
public/class-keyspider-search-public.php (modified) (4 diffs)
-
public/js/keyspider-search-public.js (modified) (1 diff)
-
public/partials/keyspider-search-page-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
keyspider-search/trunk/README.txt
r2619722 r2775870 4 4 Tags: search, site search, search indexing, relevant search, search by category, autocomplete, suggest, typeahead, instant search, custom search 5 5 Requires at least: 3.9 6 Tested up to: 5.8.17 Stable tag: 1. 0.06 Tested up to: 6.0.1 7 Stable tag: 1.1.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 41 41 42 == Note == 43 44 We use jsdelivr Open Source CDN(https://cdn.jsdelivr.net/gh/keyspidr/Enduser-CDN-JS-library/keyspider-search-js-lib.js)to load Keyspider javascript library. 45 46 42 47 == Installation == 43 48 44 49 1. Go to [keyspider.io](https://keyspider.io/?utm_channel=wp-plugin-readme&utm_source=wordpress-org) and sign up for an account. 45 2. After logging in to Keyspider Search, get your API Key from the dashboard. [more details] (https://docs.keyspider.io/docs/api-key/)50 2. After logging in to Keyspider Search, get your API Key from the dashboard. [more details]https://docs.keyspider.io/docs/api-key/ 46 51 3. Install the Keyspider Search WordPress plugin from the WordPress dashboard. 47 52 4. Activate the plugin through the 'plugins' menu in WordPress. … … 58 63 4. Provide accurate search results by adding synonyms. 59 64 65 60 66 == Frequently Asked Questions == 61 67 … … 64 70 = How can I create a Keyspider Search account? = 65 71 66 Sign up at [keyspider.io](https://keyspider.io)for a free trial72 Sign up at https://keyspider.io for a free trial 67 73 68 74 = How to use the Keyspider Search plugin? = 69 75 70 Please read the [documentation](https://docs.keyspider.io/docs/integrate-keyspider-search-on-your-wordpress-website/) to know how to use the Keyspider Search plugin on your site.76 Please read the documentation(https://docs.keyspider.io/docs/integrate-keyspider-search-on-your-wordpress-website/) to know how to use the Keyspider Search plugin on your site. 71 77 72 78 = Can I add a search page in the WordPress menu? = … … 87 93 = 1.0.0 = 88 94 * Initial release 95 96 = 1.1.0 = 97 * Search form shortcode added 98 * Search page shortcode updated -
keyspider-search/trunk/admin/class-keyspider-search-admin-action.php
r2619714 r2775870 50 50 $organization_id = sanitize_text_field(trim($_POST['keyspider_organization_id'])); 51 51 $api_key = sanitize_text_field(trim($_POST['keyspider_api_key'])); 52 $keyspider_search_page = sanitize_text_field(trim($_POST['keyspider_search_page'])); 52 53 53 54 update_option( 'keyspider_organization_id' , $organization_id ); 54 55 update_option( 'keyspider_api_key' , $api_key ); 56 update_option( 'keyspider_search_page' , $keyspider_search_page ); 57 55 58 56 59 $redirectParams['success'] = true; -
keyspider-search/trunk/admin/templates/authorize.php
r2619714 r2775870 43 43 44 44 <tr> 45 <th scope="row"><label for="keyspider_search_page">Search Page Path/Slug</label></th> 46 <td><input class="regular-text" type="text" id="keyspider_search_page" name="keyspider_search_page" value="<?php echo esc_attr(get_option('keyspider_search_page')); ?>" autocomplete="off" /></td> 47 </tr> 48 49 <tr> 45 50 <th scope="row"></th> 46 51 <td><input type="submit" name="Submit" value="Submit" class="button-primary" /></td> -
keyspider-search/trunk/includes/class-keyspider-search.php
r2619714 r2775870 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1. 0.067 * @since 1.1.0 68 68 */ 69 69 public function __construct() { … … 71 71 $this->version = KEYSPIDER_SEARCH_VERSION; 72 72 } else { 73 $this->version = '1. 0.0';73 $this->version = '1.1.0'; 74 74 } 75 75 $this->plugin_name = 'keyspider-search'; -
keyspider-search/trunk/keyspider-search.php
r2619714 r2775870 2 2 3 3 /** 4 * The plugin bootstrap file5 *6 * This file is read by WordPress to generate the plugin information in the plugin7 * admin area. This file also includes all of the dependencies used by the plugin,8 * registers the activation and deactivation functions, and defines a function9 * that starts the plugin.10 4 * 11 5 * @link Keyspider 12 * @since 1. 0.06 * @since 1.1.0 13 7 * @package Keyspider_Search 14 8 * 15 * @wordpress-plugin16 9 * Plugin Name: Keyspider Search 17 10 * Plugin URI: https://docs.keyspider.io/docs/integrate-keyspider-search-on-your-wordpress-website/ 18 * Description: Th is is a short description of what the plugin does. It's displayed in the WordPress admin area.19 * Version: 1. 0.011 * Description: The Keyspider Site Search WordPress plugin is a refined, customizable, and more relevant search engine that replaces the default WordPress search. 12 * Version: 1.1.0 20 13 * Author: Keyspider 21 14 * Author URI: Keyspider.io … … 33 26 /** 34 27 * Currently plugin version. 35 * Start at version 1. 0.0 and use SemVer - https://semver.org28 * Start at version 1.1.0 and use SemVer - https://semver.org 36 29 * Rename this for your plugin and update it as you release new versions. 37 30 */ 38 define( 'KEYSPIDER_SEARCH_VERSION', '1. 0.0' );31 define( 'KEYSPIDER_SEARCH_VERSION', '1.1.0' ); 39 32 40 33 /** -
keyspider-search/trunk/public/class-keyspider-search-public.php
r2674699 r2775870 119 119 */ 120 120 121 wp_register_script( 'keyspider-search-js', 'https://cdn.jsdelivr.net/gh/keyspidr/Enduser-CDN-JS-library/keyspider-search-js-lib.js', null, $this->version, false ); 122 wp_enqueue_script('keyspider-search-js'); 121 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/keyspider-search-public.js', array( 'jquery' ), $this->version, false ); 123 122 124 123 } … … 148 147 $organizationId = get_option('keyspider_organization_id'); 149 148 $apiKey = get_option('keyspider_api_key'); 149 $keyspider_search_page = site_url().get_option('keyspider_search_page'); 150 150 151 151 152 /*Parsing in Keyspider JS library*/ … … 153 154 wp_enqueue_script( 'keyspider-js-footer' ); 154 155 wp_add_inline_script( 'keyspider-js-footer', 'window.addEventListener("load", function () { 155 window.searchInit && window.searchInit("'. esc_js($apiKey) .'", "'. esc_js($organizationId) .'"); 156 window.searchInit && window.searchInit("'. esc_js($apiKey) .'", "'. esc_js($organizationId) .'", "'. esc_js($keyspider_search_page) .'","q"); 157 window.searchOnlyInit && window.searchOnlyInit("'. esc_js($apiKey) .'", "'. esc_js($organizationId) .'", "'. esc_js($keyspider_search_page) .'","q"); 156 158 });'); 157 159 158 159 160 } 160 161 … … 178 179 // register shortcode 179 180 add_shortcode('keyspidersearch', 'keyspider_searchform'); 181 182 183 function keyspider_searchform_widget() { 184 185 // form html tags, it will use by keyspider library script and override HTML form 186 $search_form = '<div class="dashboard-search-only"></div>'; 187 188 return $search_form; 189 } 190 // register shortcode 191 add_shortcode('keyspidersearchform', 'keyspider_searchform_widget'); 192 180 193 } 181 194 -
keyspider-search/trunk/public/js/keyspider-search-public.js
r2674699 r2775870 13 13 **/ 14 14 $(function() { 15 //code here 15 var script = document.createElement('script'); 16 script.type = 'text/javascript'; 17 script.src = "https://cdn.jsdelivr.net/gh/keyspidr/Enduser-CDN-JS-library/keyspider-search-js-lib.js"; 18 document.head.appendChild(script); 16 19 }); 17 20 -
keyspider-search/trunk/public/partials/keyspider-search-page-template.php
r2619714 r2775870 15 15 protected $templates; 16 16 17 /**18 * Returns an instance of this class.19 */20 /*public static function get_instance() {21 22 if ( null == self::$instance ) {23 self::$instance = new PageTemplater();24 }25 26 return self::$instance;27 28 } */29 17 30 18 /** … … 153 141 154 142 } 155 //add_action( 'plugins_loaded', array( 'PageTemplater', 'get_instance' ) );
Note: See TracChangeset
for help on using the changeset viewer.