| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: Post Timeline |
| 5 |
* Plugin URI: https://posttimeline.com/ |
| 6 |
* Description: Create, enhance & display unlimited beautiful Post Timeline variations such as Vertical, One Side, Gutenberg & Elementor Timelines on your website. |
| 7 |
* Version: 2.4.3 |
| 8 |
* Author: AgileLogix |
| 9 |
* Author URI: https://posttimeline.com/ |
| 10 |
* License: GPL-2.0+ |
| 11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 12 |
* Text Domain: post-timeline |
| 13 |
* Domain Path: /languages |
| 14 |
*/ |
| 15 |
|
| 16 |
// If this file is called directly, abort. |
| 17 |
if ( ! defined( 'WPINC' ) ) { |
| 18 |
die; |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
if ( !class_exists( 'Post_Timeline' ) ) { |
| 25 |
|
| 26 |
class Post_Timeline { |
| 27 |
|
| 28 |
/** |
| 29 |
* Class constructor |
| 30 |
*/ |
| 31 |
function __construct() { |
| 32 |
|
| 33 |
$this->define_constants(); |
| 34 |
$this->includes(); |
| 35 |
|
| 36 |
register_activation_hook( __FILE__, array( $this, 'activate') ); |
| 37 |
register_deactivation_hook( __FILE__, array( $this, 'deactivate') ); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Setup plugin constants. |
| 42 |
* |
| 43 |
* @since 1.0.0 |
| 44 |
* @return void |
| 45 |
*/ |
| 46 |
public function define_constants() { |
| 47 |
|
| 48 |
global $wpdb; |
| 49 |
|
| 50 |
$upload_dir = wp_upload_dir(); |
| 51 |
|
| 52 |
define( 'POST_TIMELINE_URL_PATH', plugin_dir_url( __FILE__ ) ); |
| 53 |
define( 'POST_TIMELINE_PLUGIN_PATH', plugin_dir_path(__FILE__) ); |
| 54 |
define( 'POST_TIMELINE_VERSION', "2.4.3" ); |
| 55 |
define( 'POST_TIMELINE_BASE_PATH', dirname( plugin_basename( __FILE__ ) ) ); |
| 56 |
define( 'POST_TIMELINE_SLUG', 'post-timeline'); |
| 57 |
define( 'POST_TIMELINE_EMAIL', 'support@agilelogix.com'); |
| 58 |
define( 'POST_TIMELINE_SITE', 'https://posttimeline.com/'); |
| 59 |
define( 'POST_TIMELINE_PRO_LNK', 'https://agilelogix.com/product/post-timeline/?utm_source=WordPress&utm_medium=Banner&utm_campaign=WP.org'); |
| 60 |
} |
| 61 |
|
| 62 |
/** |
| 63 |
* Include the required files. |
| 64 |
* |
| 65 |
* @since 1.0.0 |
| 66 |
* @return void |
| 67 |
*/ |
| 68 |
public function includes() { |
| 69 |
|
| 70 |
|
| 71 |
require_once POST_TIMELINE_PLUGIN_PATH . 'includes/plugin.php'; |
| 72 |
|
| 73 |
$asl_core = new \PostTimeline\Plugin(); |
| 74 |
$asl_core->run(); |
| 75 |
} |
| 76 |
/** |
| 77 |
* The code that runs during plugin activation. |
| 78 |
* This action is documented in includes/class-agile-store-locator-activator.php |
| 79 |
*/ |
| 80 |
public function activate() { |
| 81 |
|
| 82 |
\PostTimeline\Activator::activate(); |
| 83 |
} |
| 84 |
|
| 85 |
/** |
| 86 |
* The code that runs during plugin deactivation. |
| 87 |
* This action is documented in includes/class-agile-store-locator-deactivator.php |
| 88 |
*/ |
| 89 |
public function deactivate() { |
| 90 |
|
| 91 |
\PostTimeline\Deactivator::deactivate(); |
| 92 |
} |
| 93 |
} |
| 94 |
|
| 95 |
|
| 96 |
$asl_ptl = new Post_Timeline(); |
| 97 |
} |