-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwp-timeliner.php
66 lines (56 loc) · 1.88 KB
/
wp-timeliner.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
<?php
/**
* Plugin Name: WP Timeliner
* Plugin URI: https://wp-timeliner.com
* Description: Create highly-customizable timelines in WordPress and display achievements in a chronological way.
* Author: Pierre Saïkali
* Author URI: https://mosaika.fr
* Text Domain: wp-timeliner
* Domain Path: /languages/
* Version: 1.0.0
*/
namespace WP_Timeliner;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Define plugin constants
*/
define( 'TIMELINER_VERSION', '1.0.0' );
define( 'TIMELINER_MIN_PHP_VERSION', '5.6' );
define( 'TIMELINER_URL', plugin_dir_url( __FILE__ ) );
define( 'TIMELINER_DIR', plugin_dir_path( __FILE__ ) );
define( 'TIMELINER_PLUGIN_DIRNAME', basename( rtrim( dirname( __FILE__ ), '/' ) ) );
define( 'TIMELINER_BASENAME', plugin_basename( __FILE__ ) );
define( 'TIMELINER_ASSETS_URL', TIMELINER_URL . 'assets' );
define( 'TIMELINER_THEMES_DIR', TIMELINER_DIR . 'classes/themes' );
define( 'TIMELINER_THEMES_URL', TIMELINER_URL . 'classes/themes' );
/**
* Load Composer dependencies.
*/
$composer_autoloader = __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
if ( file_exists( $composer_autoloader ) ) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
}
/**
* Register our autoloader logic.
*/
require_once TIMELINER_DIR . DIRECTORY_SEPARATOR . 'autoloader.php';
Autoloader::register();
/**
* Include our globally usable functions.
*/
require_once __DIR__ . DIRECTORY_SEPARATOR . 'functions.php';
/**
* Load translation
*/
load_plugin_textdomain( 'wp-timeliner', false, TIMELINER_PLUGIN_DIRNAME . '/languages/' );
/**
* Activation and de-activation hooks
*/
register_activation_hook( __FILE__, array( wp_timeliner(), 'activate' ) );
register_deactivation_hook( __FILE__, array( wp_timeliner(), 'deactivate' ) );
/**
* Fire the fun stuff!
*/
add_action( 'plugins_loaded', array( wp_timeliner(), 'fire' ) );