| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Locatoraid |
| 4 |
Plugin URI: https://www.locatoraid.com/ |
| 5 |
Description: Store locator plugin |
| 6 |
Version: 3.9.73 |
| 7 |
Author: plainware.com |
| 8 |
Author URI: https://www.locatoraid.com/ |
| 9 |
Text Domain: locatoraid |
| 10 |
Domain Path: /languages/ |
| 11 |
*/ |
| 12 |
|
| 13 |
if( ! defined('LC3_VERSION') ){ |
| 14 |
define( 'LC3_VERSION', 3973 ); |
| 15 |
} |
| 16 |
|
| 17 |
if (! defined('ABSPATH')) exit; // Exit if accessed directly |
| 18 |
|
| 19 |
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) { |
| 20 |
add_action( 'admin_notices', create_function( '', "echo '<div class=\"error\"><p>".__('Locatoraid requires PHP 5.3 to function properly. Please upgrade PHP or deactivate Locatoraid.', 'locatoraid') ."</p></div>';" ) ); |
| 21 |
return; |
| 22 |
} |
| 23 |
|
| 24 |
if( file_exists(dirname(__FILE__) . '/db.php') ){ |
| 25 |
$nts_no_db = TRUE; |
| 26 |
include_once( dirname(__FILE__) . '/db.php' ); |
| 27 |
$happ_path = NTS_DEVELOPMENT2; |
| 28 |
} |
| 29 |
else { |
| 30 |
$happ_path = dirname(__FILE__) . '/happ2'; |
| 31 |
} |
| 32 |
|
| 33 |
include_once( $happ_path . '/lib-wp/hcWpBase6.php' ); |
| 34 |
|
| 35 |
class Locatoraid extends hcWpBase6 |
| 36 |
{ |
| 37 |
public function __construct() |
| 38 |
{ |
| 39 |
parent::__construct( |
| 40 |
array('locatoraid', 'lc'), // app |
| 41 |
__FILE__, // path, |
| 42 |
'', // hc product, |
| 43 |
'locatoraid', // slug |
| 44 |
'lctr2' // db prefix |
| 45 |
); |
| 46 |
|
| 47 |
add_action( 'init', array($this, '_this_init') ); |
| 48 |
} |
| 49 |
|
| 50 |
public function _this_init() |
| 51 |
{ |
| 52 |
// wp_register_script( 'hc2-script-hc-js', plugins_url( 'happ2/assets/js/hc2.js?hcver=' . LC3_VERSION, __FILE__ ), array('jquery') ); |
| 53 |
// wp_register_script( 'hc2-script-gmaps-js', plugins_url( 'happ2/modules/maps_google/assets/js/gmaps.js?hcver=' . LC3_VERSION, __FILE__ ), array('jquery') ); |
| 54 |
// wp_register_script( 'hc2-script-lc_front-js', plugins_url( 'modules/front/assets/js/front.js?hcver=' . LC3_VERSION, __FILE__ ), array('jquery') ); |
| 55 |
// wp_register_script( 'hc2-script-lc-directions-front-js', plugins_url( 'modules/directions.front/assets/js/directions.js?hcver=' . LC3_VERSION, __FILE__ ), array('jquery') ); |
| 56 |
|
| 57 |
$this->hcapp_start(); |
| 58 |
|
| 59 |
$apiUri = apply_filters( 'locatoraid_api_uri', '' ); |
| 60 |
if( $apiUri ){ |
| 61 |
$uri = $this->hcapp->make( '/http/uri' ); |
| 62 |
$uri->set_mode_url( 'api', $apiUri ); |
| 63 |
} |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
$hcsl = new Locatoraid(); |
| 68 |
|
| 69 |
$widget_file = dirname(__FILE__) . '/modules/widget.wordpress/widget_searchform.php'; |
| 70 |
if( file_exists($widget_file) ){ |
| 71 |
include_once( $widget_file ); |
| 72 |
add_action( 'widgets_init', function(){ register_widget("Locatoraid_Searchform_Widget30"); } ); |
| 73 |
} |
| 74 |
|
| 75 |
$blockFile = dirname(__FILE__) . '/modules/widget.wordpress/blocks.php'; |
| 76 |
if( file_exists($blockFile) ){ |
| 77 |
include_once( $blockFile ); |
| 78 |
$blocks = new Locatoraid_Blocks( $hcsl ); |
| 79 |
} |