-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpgenius-events-calendar.php
64 lines (53 loc) · 2.23 KB
/
wpgenius-events-calendar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
Plugin Name: WPGenius Events Calendar
Plugin URI: https://wpgenius.in
Description: A WPGenius Events Calendar is a another simple plugin to plan events & collect registrations from attendees.
Version: 1.0
Author: Team WPGenius (Makarand Mane)
Author URI: https://makarandmane.com
Text Domain: wpgenius-events-calendar
*/
/*
Copyright 2022 Team WPGenius (email : makarand@wpgenius.in)
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'WGEC_DIR_URL', plugin_dir_url( __FILE__ ) );
define( 'WGEC_DIR_PATH', plugin_dir_path( __FILE__ ) );
include_once 'includes/class.wgec-init.php';
include_once 'includes/class.wgec-database.php';
include_once 'includes/class.wgec-ajax.php';
include_once 'includes/class.wgec-admin.php';
include_once 'includes/class.wgec-settings.php';
include_once 'includes/class.wgec-actions.php';
include_once 'includes/shortcodes/shortcodes.php';
include_once 'includes/widgets/widgets.php';
// Add text domain
add_action('plugins_loaded','wpgenius_events_translations');
function wpgenius_events_translations(){
$locale = apply_filters("plugin_locale", get_locale(), 'wpgenius-events-calendar');
$lang_dir = dirname( __FILE__ ) . '/languages/';
$mofile = sprintf( '%1$s-%2$s.mo', 'wpgenius-events-calendar', $locale );
$mofile_local = $lang_dir . $mofile;
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
if ( file_exists( $mofile_global ) ) {
load_textdomain( 'wpgenius-events-calendar', $mofile_global );
} else {
load_textdomain( 'wpgenius-events-calendar', $mofile_local );
}
}
if(class_exists('WPGenius_Events_Actions'))
WPGenius_Events_Actions::init();
if(class_exists('WPGenius_Shortcodes'))
WPGenius_Shortcodes::init();
if(class_exists('WPGenius_Events_Ajax'))
WPGenius_Events_Ajax::init();
if(class_exists('WPGenius_Events_Admin') && is_admin())
WPGenius_Events_Admin::init();
if(class_exists('WPGenius_Events_Settings'))
WPGenius_Events_Settings::init();
register_activation_hook( __FILE__, array( $wbcdb, 'activate_events' ) );
register_deactivation_hook( __FILE__, array( $wbcdb, 'deactivate_events' ) );
register_activation_hook( __FILE__, function(){ register_uninstall_hook( __FILE__, array( 'WPGenius_Events_DB', 'uninstall_events' ) ); });