-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathfull-site-builder-for-elementor.php
107 lines (85 loc) · 3.01 KB
/
full-site-builder-for-elementor.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/**
* Plugin Name: StylePress for Elementor
* Description: Allows you to apply full site layout templates to pages on your website using Elementor.
* Plugin URI: https://stylepress.org/
* Author: dtbaker
* Version: 1.2.0
* Author URI: https://dtbaker.net/
* GitHub Plugin URI: https://github.com/dtbaker/stylepress
* Requires at least: 4.9
* Tested up to: 4.9.8
*
* Text Domain: dtbaker-elementor
*
* Full Site Editor for Elementor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Elementor 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.
*
* @package dtbaker-elementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/*
Constants:
*/
// dev stuff by dtbaker:
//set_time_limit(2);
/* Set plugin version constant. */
define( 'DTBAKER_ELEMENTOR_VERSION', '1.2.0' );
/* Debug output control. */
define( 'DTBAKER_ELEMENTOR_DEBUG_OUTPUT', 0 );
/* Set constant path to the plugin directory. */
define( 'DTBAKER_ELEMENTOR_SLUG', basename( plugin_dir_path( __FILE__ ) ) );
/* Set constant path to the plugin directory. */
define( 'DTBAKER_ELEMENTOR_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
/* Set the constant path to the plugin directory URI. */
define( 'DTBAKER_ELEMENTOR_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
add_action( 'plugins_loaded', 'dtbaker_elementor_load_plugin_textdomain' );
if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
add_action( 'admin_notices', 'dtbaker_elementor_fail_php_version' );
} else {
define( 'STYLEPRESS_OUTER_USE_THEME', - 1 );
define( 'STYLEPRESS_INNER_USE_PLAIN', - 1 );
define( 'STYLEPRESS_INNER_USE_THEME', - 2 );
/* DtbakerElementorManager Class */
require_once( DTBAKER_ELEMENTOR_PATH . 'inc/class.plugin.php' );
/* Template Functions */
require_once( DTBAKER_ELEMENTOR_PATH . 'inc/template-functions.php' );
/* Start up our magic */
DtbakerElementorManager::get_instance()->init();
}
/**
* Load gettext translate for our text domain.
*
* @since 1.0.0
*
* @return void
*/
function dtbaker_elementor_load_plugin_textdomain() {
load_plugin_textdomain( 'dtbaker-elementor' );
}
/**
* Show in WP Dashboard notice about the plugin is not activated.
*
* @since 1.0.0
*
* @return void
*/
if ( ! function_exists( 'dtbaker_elementor_fail_php_version' ) ) {
function dtbaker_elementor_fail_php_version() {
$message = esc_html__( 'The StylePress for Elementor plugin requires PHP version 5.4+, plugin is currently NOT ACTIVE.', 'stylepress' );
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
echo wp_kses_post( $html_message );
}
}
if ( ! defined( 'ELEMENTOR_PARTNER_ID' ) ) {
define( 'ELEMENTOR_PARTNER_ID', 2114 );
}