PluginProbe
Borderless – Addons and Templates for Elementor / 1.3.8
Borderless – Addons and Templates for Elementor v1.3.8
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 78 releases
borderless / borderless.php

borderless.php in Borderless – Addons and Templates for Elementor 1.3.8, at borderless.php

242 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: Borderless
5 Plugin URI: https://visualmodo.com
6 Description: One service packed with powerful tools to help you reach your purposes.
7 Version: 1.3.8
8 Author: Visualmodo
9 Author URI: https://visualmodo.com
10 License: GPLv3 or later
11 Text Domain: borderless
12 Domain Path: /languages
13 */
14
15 // don't load directly
16 defined( 'ABSPATH' ) || exit;
17
18
19 /*-----------------------------------------------------------------------------------*/
20 /* *. Borderless Constants
21 /*-----------------------------------------------------------------------------------*/
22
23 define( 'BORDERLESS__VERSION', '1.3.8' );
24 define( 'BORDERLESS__DIR', plugin_dir_path( __FILE__ ) );
25 define( 'BORDERLESS__URL', plugins_url( '/', __FILE__ ) );
26 define( 'BORDERLESS__INC', BORDERLESS__DIR . '/includes' );
27 define( 'BORDERLESS__ASSETS', BORDERLESS__URL . 'assets/' );
28 define( 'BORDERLESS__STYLES', BORDERLESS__ASSETS . 'styles/' );
29 define( 'BORDERLESS__SCRIPTS', BORDERLESS__ASSETS . 'scripts/' );
30 define( 'BORDERLESS__LIB', BORDERLESS__ASSETS . 'lib/' );
31 define( 'BORDERLESS__BLOCK_EDITOR', BORDERLESS__DIR . '/modules/block-editor' );
32 define( 'BORDERLESS__ELEMENTOR', BORDERLESS__DIR . '/modules/elementor' );
33 define( 'BORDERLESS__WPBAKERY', BORDERLESS__DIR . '/modules/wpbakery' );
34 define( 'BORDERLESS__LIBS', BORDERLESS__DIR . '/modules/libraries' );
35 define( 'BORDERLESS__RELATED_POSTS', BORDERLESS__DIR . '/modules/related-posts' );
36
37 /*-----------------------------------------------------------------------------------*/
38 /* *. Borderless Core
39 /*-----------------------------------------------------------------------------------*/
40
41 class Borderless {
42
43 /**
44 * The loader that's responsible for maintaining and registering all hooks that power
45 * the plugin.
46 *
47 * @since 1.0.0
48 * @access protected
49 * @var Borderless_Loader $loader Maintains and registers all hooks for the plugin.
50 */
51 protected $loader;
52
53 /**
54 * The unique identifier of this plugin.
55 *
56 * @since 1.0.0
57 * @access protected
58 * @var string $plugin_name The string used to uniquely identify this plugin.
59 */
60 protected $plugin_name;
61
62 /**
63 * The current version of the plugin.
64 *
65 * @since 1.0.0
66 * @access protected
67 * @var string $version The current version of the plugin.
68 */
69 protected $version;
70
71 /**
72 * Define the core functionality of the plugin.
73 *
74 * Set the plugin name and the plugin version that can be used throughout the plugin.
75 * Load the dependencies, define the locale, and set the hooks for the admin area and
76 * the public-facing side of the site.
77 *
78 * @since 1.0.0
79 */
80 public function __construct() {
81
82 if ( defined( 'BORDERLESS__VERSION' ) ) {
83 $this->version = BORDERLESS__VERSION;
84 } else {
85 $this->version = '1.0.0';
86 }
87 $this->plugin_name = 'borderless';
88
89 $this->borderless_load_dependencies();
90 $this->borderless_define_public_hooks();
91
92 }
93
94 /**
95 * Define the core functionality of the plugin.
96 *
97 * Set the plugin name and the plugin version that can be used throughout the plugin.
98 * Load the dependencies, define the locale, and set the hooks for the admin area and
99 * the public-facing side of the site.
100 *
101 * @since 1.0.0
102 */
103
104 public function borderless_load_dependencies() {
105
106 $options = get_option( 'borderless' );
107
108 /**
109 * Dashbaord Page.
110 */
111
112 require_once( BORDERLESS__INC . "/templates/dashboard.php" );
113
114 /**
115 * License Manager.
116 */
117
118 if ( ! class_exists( 'BORDERLESS__LICENSE' ) ) {
119 require_once( BORDERLESS__INC . '/license/client.php' );
120 }
121
122 if ( class_exists( 'BORDERLESS__LICENSE' ) ) {
123 $borderless_license = new BORDERLESS__LICENSE( __FILE__, 168804, BORDERLESS__VERSION, 'plugin', 'https://visualmodo.com', 'Borderless' );
124 }
125
126 if ( !( is_object( $borderless_license ) && $borderless_license->get_api_key_status() ) ) {
127
128 function borderless_pro_notice(){
129 echo '<div class="notice notice-warning is-dismissible">
130 <p>Upgrade to <strong><a href="https://visualmodo.com/borderless">Borderless Pro</a></strong> plugin and get a collection of hundreds of Elementor Templates, Elements and toolkit.</p>
131 </div>';
132 }
133 add_action('admin_notices', 'borderless_pro_notice');
134
135 }
136
137 /**
138 * The class responsible for orchestrating the actions and filters of the
139 * core plugin.
140 */
141 require_once( BORDERLESS__INC . "/class-borderless-loader.php" );
142
143 /**
144 * The class responsible for defining all actions that occur in the public-facing
145 * side of the site.
146 */
147 require_once( BORDERLESS__INC . "/class-borderless-public.php" );
148
149 require_once( BORDERLESS__INC . "/templates/system-info.php" );
150 require_once( BORDERLESS__INC . "/icon-manager/icon-manager.php" );
151 require_once( BORDERLESS__INC . "/custom-post-types/custom-post-types.php" );
152 require_once( BORDERLESS__INC . "/svg/svg.php" );
153 //require_once( BORDERLESS__BLOCK_EDITOR . "/block-editor.php" );
154 require_once( BORDERLESS__ELEMENTOR . "/elementor.php" );
155 require_once( BORDERLESS__WPBAKERY . "/wpbakery.php" );
156 require_once( BORDERLESS__INC . "/widgets/button.php" );
157 require_once( BORDERLESS__INC . "/widgets/contact-info.php" );
158 require_once( BORDERLESS__INC . "/widgets/divider.php" );
159 require_once( BORDERLESS__INC . "/widgets/search.php" );
160 require_once( BORDERLESS__INC . "/widgets/social-media.php" );
161 require_once( BORDERLESS__INC . "/widgets/spacer.php" );
162 require_once( BORDERLESS__INC . "/helper.php" );
163
164 require_once( BORDERLESS__INC . "/library/templates/templates.php" );
165
166 if ( isset( $options['related_posts'] ) ) {
167 require_once( BORDERLESS__RELATED_POSTS . "/related-posts.php" );
168 }
169
170 $this->loader = new Borderless_Loader();
171
172 }
173
174 /**
175 * Register all of the hooks related to the public-facing functionality
176 * of the plugin.
177 *
178 * @since 1.0.0
179 * @access private
180 */
181 private function borderless_define_public_hooks() {
182
183 $plugin_public = new Borderless_Public( $this->get_plugin_name(), $this->get_version() );
184
185 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
186 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
187
188 }
189
190 /**
191 * Run the loader to execute all of the hooks with WordPress.
192 *
193 * @since 1.0.0
194 */
195 public function run() {
196 $this->loader->run();
197 }
198
199 /**
200 * The name of the plugin used to uniquely identify it within the context of
201 * WordPress and to define internationalization functionality.
202 *
203 * @since 1.0.0
204 * @return string The name of the plugin.
205 */
206 public function get_plugin_name() {
207 return $this->plugin_name;
208 }
209
210 /**
211 * The reference to the class that orchestrates the hooks with the plugin.
212 *
213 * @since 1.0.0
214 * @return Borderless_Loader Orchestrates the hooks of the plugin.
215 */
216 public function get_loader() {
217 return $this->loader;
218 }
219
220 /**
221 * Retrieve the version number of the plugin.
222 *
223 * @since 1.0.0
224 * @return string The version number of the plugin.
225 */
226 public function get_version() {
227 return $this->version;
228 }
229
230 }
231
232 /*-----------------------------------------------------------------------------------*/
233 /* *. Borderless Init
234 /*-----------------------------------------------------------------------------------*/
235
236 function run_borderless() {
237
238 $plugin = new Borderless();
239 $plugin->run();
240
241 }
242 run_borderless();