-
Notifications
You must be signed in to change notification settings - Fork 25
/
wp-tiles-loader.php
62 lines (50 loc) · 1.16 KB
/
wp-tiles-loader.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
<?php
// Exit if accessed directly
if ( !defined ( 'ABSPATH' ) )
exit;
/**
* Version number
*
* @since 0.1
*/
define( 'WP_TILES_VERSION', '1.1.2' );
/**
* PATHs and URLs
*
* @since 0.1
*/
define( 'WP_TILES_DIR', plugin_dir_path( __FILE__ ) );
define( 'WP_TILES_URL', plugin_dir_url( __FILE__ ) );
define( 'WP_TILES_ASSETS_URL', WP_TILES_URL . 'assets/' );
/**
* Requires and includes
*
* @since 1.0
*/
if ( !defined( 'VP_VERSION' ) )
require plugin_dir_path( __FILE__ ) .'vafpress-framework/bootstrap.php';
require WP_TILES_DIR . 'vendor/autoload.php';
/**
* Backward compat
*/
if ( get_option( 'wp-tiles-options' ) !== 'legacy' ) {
add_action( 'init', array( 'WPTiles\Legacy', 'convert_options' ), 1 );
}
/**
* Get the one and only true instance of WP Tiles
*
* @return WPTiles\WPTiles
* @since 0.4.2
*/
function wp_tiles() {
return \WPTiles\WPTiles::get_instance();
}
// Initialize
wp_tiles();
add_action( 'plugins_loaded', 'wptiles_load_pluggables' );
function wptiles_load_pluggables() {
require_once( WP_TILES_DIR . '/wp-tiles-pluggables.php' );
}
function wp_tiles_preview_tile() {
return WPTiles\Admin\Admin::preview_tile();
}