Changeset 1895519
- Timestamp:
- 06/20/2018 04:50:34 AM (8 years ago)
- Location:
- olasearch/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (2 diffs)
-
admin/class-olasearch-admin.php (modified) (3 diffs)
-
admin/partials/olasearch-admin-display-olasearch.php (modified) (1 diff)
-
includes/class-olasearch-indexer.php (modified) (1 diff)
-
includes/class-olasearch.php (modified) (1 diff)
-
olasearch.php (modified) (1 diff)
-
public/class-olasearch-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
olasearch/trunk/README.txt
r1894890 r1895519 6 6 Tested up to: 4.9.4 7 7 Requires PHP: 5.2.4 8 Stable tag: 2.0. 38 Stable tag: 2.0.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 88 88 == Changelog == 89 89 90 = [2.0.3] 2018-06-14 = 90 = [2.0.4] 2018-06-20 = 91 92 * Feature - bug fixes 93 94 = [2.0.3] 2018-06-19 = 91 95 92 96 * Compatibility - Now supports The Events Calendar Version 4.1 and above -
olasearch/trunk/admin/class-olasearch-admin.php
r1892543 r1895519 52 52 */ 53 53 const OLA_HOST = 'https://admin.olasearch.com'; 54 const OLA_HOST_INTERNAL = 'https://admin-staging.olasearch.com'; 55 const OLA_HOST_LOCAL = 'http://localhost:3333'; 56 57 const OLA_ASSET_HOST = 'https://cdn.olasearch.com'; 58 const OLA_ASSET_HOST_INTERNAL = 'https://s3-ap-southeast-1.amazonaws.com/configs.internal.olasearch.com'; 59 const OLA_ASSET_HOST_LOCAL = 'https://s3-ap-southeast-1.amazonaws.com/configs.local.olasearch.com'; 60 61 const OLA_SERVER = 'production'; 62 const OLA_SERVER_INTERNAL = 'internal'; 63 const OLA_SERVER_LOCAL = 'local'; 64 54 65 const OLA_ENVIRONMENT = 'production'; 66 55 67 const API_KEY_LABEL = 'API Key'; 56 68 const SETTINGS_TAB = 'olasearch'; … … 320 332 } 321 333 334 if ( ! empty( $input['api_server'] ) ) { 335 $valid['api_server'] = sanitize_text_field( $input['api_server'] ); 336 } 337 322 338 if ( empty( $valid['api_key'] ) && ( empty( $_GET['page'] || $_GET['page'] == self::SETTINGS_TAB ) ) ) { 323 339 $error = 'Please provide a valid ' . self::API_KEY_LABEL; … … 822 838 } 823 839 $options['enable_search'] = $input['enable_search']; 840 if ( isset( $input['api_server'] ) ) { 841 $options['api_server'] = $input['api_server']; 842 } 824 843 break; 825 844 -
olasearch/trunk/admin/partials/olasearch-admin-display-olasearch.php
r1846062 r1895519 44 44 <br> 45 45 </li> 46 <?php if ( isset($_GET['server']) ) { ?> 47 <li> 48 <fieldset> 49 <label><strong>Server:</strong></label><?php echo $this->options['api_server']; ?> 50 <legend class="screen-reader-text"><span>Production</span></legend> 51 <label for="api_server_production"> 52 <input type="radio" id="api_server_production" name="api_server" value="<?php echo OlaSearch_Admin::OLA_SERVER ?>" <?php echo !isset( $this->options['api_server'] ) || $this->options['api_server'] == OlaSearch_Admin::OLA_SERVER ? 'checked' : '' ?>> 53 <span>Production</span> 54 </label> 55 56 <legend class="screen-reader-text"><span>Internal</span></legend> 57 <label for="api_server_internal"> 58 <input type="radio" id="api_server_internal" name="api_server" value="<?php echo OlaSearch_Admin::OLA_SERVER_INTERNAL ?>" <?php echo isset( $this->options['api_server'] ) && $this->options['api_server'] == OlaSearch_Admin::OLA_SERVER_INTERNAL ? 'checked' : '' ?>> 59 <span>Internal</span> 60 </label> 61 62 <legend class="screen-reader-text"><span>Local</span></legend> 63 <label for="api_server_local"> 64 <input type="radio" id="api_server_local" name="api_server" value="<?php echo OlaSearch_Admin::OLA_SERVER_LOCAL ?>" <?php echo isset( $this->options['api_server'] ) && $this->options['api_server'] == OlaSearch_Admin::OLA_SERVER_LOCAL ? 'checked' : '' ?>> 65 <span>Local</span> 66 </label> 67 </fieldset> 68 </li> 69 <?php } ?> 46 70 <li> 47 71 <label> </label> -
olasearch/trunk/includes/class-olasearch-indexer.php
r1894890 r1895519 59 59 60 60 public static function ola_host() { 61 return OlaSearch_Admin::OLA_HOST; 61 $options = static::options(); 62 if ( isset( $options['api_server'] ) && $options['api_server'] == OlaSearch_Admin::OLA_SERVER_INTERNAL ) { 63 return OlaSearch_Admin::OLA_HOST_INTERNAL; 64 } else if ( isset( $options['api_server'] ) && $options['api_server'] == OlaSearch_Admin::OLA_SERVER_LOCAL ) { 65 return OlaSearch_Admin::OLA_HOST_LOCAL; 66 } else { 67 return OlaSearch_Admin::OLA_HOST; 68 } 62 69 } 63 70 64 71 public static function ola_env() { 65 72 return OlaSearch_Admin::OLA_ENVIRONMENT; 73 } 74 75 public static function ola_asset_host() { 76 $options = static::options(); 77 if ( isset( $options['api_server'] ) && $options['api_server'] == OlaSearch_Admin::OLA_SERVER_INTERNAL ) { 78 return OlaSearch_Admin::OLA_ASSET_HOST_INTERNAL; 79 } else if ( isset( $options['api_server'] ) && $options['api_server'] == OlaSearch_Admin::OLA_SERVER_LOCAL ) { 80 return OlaSearch_Admin::OLA_ASSET_HOST_LOCAL; 81 } else { 82 return OlaSearch_Admin::OLA_ASSET_HOST; 83 } 66 84 } 67 85 -
olasearch/trunk/includes/class-olasearch.php
r1894890 r1895519 70 70 71 71 $this->plugin_name = 'olasearch'; 72 $this->version = '2.0. 3';72 $this->version = '2.0.4'; 73 73 74 74 $this->load_dependencies(); -
olasearch/trunk/olasearch.php
r1894890 r1895519 17 17 * Plugin URI: https://olasearch.com/products/searchbot-wordpress 18 18 * Description: Use our conversational searchbot to increase engagement by allowing your visitors to find and explore more of your website. 19 * Version: 2.0. 319 * Version: 2.0.4 20 20 * Author: Ola Search 21 21 * Author URI: https://olasearch.com -
olasearch/trunk/public/class-olasearch-public.php
r1892543 r1895519 231 231 wp_enqueue_script( 232 232 $this->plugin_name, 233 esc_url_raw( 'https://cdn.olasearch.com/' . OlaSearch_Indexer::ola_env() . '/' . OlaSearch_Indexer::api_key() . '/olasearch.min.js' )233 esc_url_raw( OlaSearch_Indexer::ola_asset_host() . '/' . OlaSearch_Indexer::ola_env() . '/' . OlaSearch_Indexer::api_key() . '/olasearch.min.js' ) 234 234 ); 235 235 }
Note: See TracChangeset
for help on using the changeset viewer.