| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WP MapIt |
| 4 |
* Plugin URI: http://wp-mapit.chandnipatel.in |
| 5 |
* Description: WP MapIt is a WordPress plugin to display Open street maps using leaflet on your WordPress site |
| 6 |
* Version: 3.0.0 |
| 7 |
* Author: Chandni Patel |
| 8 |
* Author URI: http://chandnipatel.in/ |
| 9 |
* Developer: Chandni Patel |
| 10 |
* Developer URI: http://chandnipatel.in/ |
| 11 |
* Text Domain: wp-mapit |
| 12 |
* Domain Path: wp_mapit/languages |
| 13 |
* License: GNU General Public License v3.0 |
| 14 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
| 15 |
* |
| 16 |
* @package wp-mapit |
| 17 |
*/ |
| 18 |
|
| 19 |
/** |
| 20 |
* Exit if accessed directly |
| 21 |
*/ |
| 22 |
if ( ! defined( 'ABSPATH' ) ) { |
| 23 |
die( 'Access Denied' ); |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Define constants used in the plugin |
| 28 |
*/ |
| 29 |
define( 'WP_MAPIT_DIR', plugin_dir_path( __FILE__ ) . 'wp_mapit/' ); |
| 30 |
define( 'WP_MAPIT_URL', plugin_dir_url( __FILE__ ) . 'wp_mapit/' ); |
| 31 |
|
| 32 |
/** |
| 33 |
* Include the core file of the plugin |
| 34 |
*/ |
| 35 |
require_once WP_MAPIT_DIR . 'classes/class-wp-mapit.php'; |
| 36 |
|
| 37 |
if ( ! function_exists( 'wp_mapit_init' ) ) { |
| 38 |
|
| 39 |
/** |
| 40 |
* Function to initialize the plugin. |
| 41 |
* |
| 42 |
* @since 1.0 |
| 43 |
* @return class object |
| 44 |
*/ |
| 45 |
function wp_mapit_init() { |
| 46 |
|
| 47 |
/* Loading the textdomain */ |
| 48 |
load_plugin_textdomain( 'wp-mapit', false, basename( dirname( __DIR__ ) ) . '/wp_mapit/languages' ); |
| 49 |
|
| 50 |
/* Initialize the base class of the plugin */ |
| 51 |
return Wp_Mapit::instance(); |
| 52 |
} |
| 53 |
} |
| 54 |
|
| 55 |
/** |
| 56 |
* Create the main object of the plugin when the plugins are loaded |
| 57 |
*/ |
| 58 |
add_action( 'plugins_loaded', 'wp_mapit_init' ); |
| 59 |
|