forked from EvanHerman/timeline-express
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimeline-express.php
75 lines (61 loc) · 3.32 KB
/
timeline-express.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
65
66
67
68
69
70
71
72
73
74
75
<?php
/*
#_________________________________________________ PLUGIN
Plugin Name: Timeline Express
Plugin URI: http://www.evan-herman.com
Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.
Version: 1.1.7.3
Author: Evan Herman
Author URI: http://www.evan-herman.com
License: GPL2
#_________________________________________________ LICENSE
Copyright 2012-14 Evan Herman (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#_________________________________________________ CONSTANTS
/** Configuration **/
if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.7.3');
if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ ));
if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/'));
if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));
if(!defined('TIMELINE_EXPRESS_URL_WP_ADM')) define('TIMELINE_EXPRESS_URL_WP_ADM', TIMELINE_EXPRESS_URL_WP.'/wp-admin/');
/* Define Support Constants */
if(!defined('EH_DEV_SHOP_URL')) define( 'EH_DEV_SHOP_URL', 'https://www.evan-herman.com' );
if(!defined('EH_DEV_SHOP_SUPPORT_PRODUCT_NAME')) define( 'EH_DEV_SHOP_SUPPORT_PRODUCT_NAME', 'timeline-express' );
/** Database Tables **/
if(!defined('TIMELINE_EXPRESS_OPTION')) define('TIMELINE_EXPRESS_OPTION', 'timeline_express_storage');
// Conditional check for SSL enabled site
if(!defined('TIMELINE_EXPRESS_URL_WP_AJAX')) {
if ( is_ssl() ) {
define('TIMELINE_EXPRESS_URL_WP_AJAX', admin_url('admin-ajax.php', 'https'));
} else {
define('TIMELINE_EXPRESS_URL_WP_AJAX', admin_url('admin-ajax.php', 'http'));
}
}
/** Localization **/
// include translated files
function timeline_express_text_domain_init() {
load_plugin_textdomain('timeline-express', false, dirname(plugin_basename(__FILE__)) . '/languages');
}
add_action('init', 'timeline_express_text_domain_init');
/** Include Required Plugin Files **/
// main timeline express class file
require_once TIMELINE_EXPRESS_PATH.'classes/class.timeline-express.php';
// ajax functions
require_once TIMELINE_EXPRESS_PATH.'lib/lib.ajax.php';
/** Initialize the plugin's base class **/
$timelineExpressBase = new timelineExpressBase();
/** Activation Hooks **/
register_activation_hook( __FILE__ , array( &$timelineExpressBase, 'activate') );
register_deactivation_hook( __FILE__ , array( &$timelineExpressBase, 'deactivate') );
// register_uninstall_hook( __FILE__ , array( &$timelineExpressBase, 'uninstall') );
/* Daily Cron Job to check license */
register_activation_hook( __FILE__ , array( &$timelineExpressBase , 'schedule_timeline_express_support_cron' ) );