PluginProbe
Borderless – Addons and Templates for Elementor / trunk
Borderless – Addons and Templates for Elementor vtrunk
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 / includes / library / templates / templates.php

templates.php in Borderless – Addons and Templates for Elementor trunk, at includes/library/templates/templates.php

100 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly.
4 defined( 'ABSPATH' ) || exit;
5
6 /*-----------------------------------------------------------------------------------*/
7 /* Import Files
8 /*-----------------------------------------------------------------------------------*/
9
10
11 function borderless_library_import_files() {
12 $theme = wp_get_theme(get_template());
13 $aesir = $architect = $beyond = $cafe = $church = $construction = $cryptocurrency = $dark = $edge = $education = $employment = $financial = $fitness = $food = $forum = $gym = $hotel = $ink = $it = $marvel = $mechanic = $medical = $minimalist = $music = $nectar = $nonprofit = $peak = $petshop = $photography = $politic = $rare = $realestate = $resume = $salon = $seller = $spark = $sport = $stream = $traveler = $visualmentor = $wedding = $winehouse = $zenith = $borderless_free_templates = $borderless_pro_templates = [];
14
15
16 require_once( BORDERLESS__INC . "/library/templates/classic-templates.php" );
17 require_once( BORDERLESS__INC . "/library/templates/borderless-templates.php" );
18
19 return array_merge($aesir,$architect,$beyond,$cafe,$church,$construction,$cryptocurrency,$dark,$edge,$education,$employment,$financial,$fitness,$food,$forum,$gym,$hotel,$ink,$it,$marvel,$mechanic,$medical,$minimalist,$music,$nectar,$nonprofit,$peak,$petshop,$photography,$politic,$rare,$realestate,$resume,$salon,$seller,$spark,$sport,$stream,$traveler,$visualmentor,$wedding,$winehouse,$zenith,$borderless_templates);
20 }
21 add_filter( 'pt-library/import_files', 'borderless_library_import_files' );
22
23
24 /*-----------------------------------------------------------------------------------*/
25 /* Import Files - Plugins
26 /*-----------------------------------------------------------------------------------*/
27
28
29 function library_register_plugins( $plugins ) {
30
31 $theme = wp_get_theme(get_template());
32
33 if ( $theme == 'Anzu' ) {
34
35 $theme_plugins = [
36 [
37 'name' => 'Borderless',
38 'description' => 'Widgets, Elements, Templates and Toolkit',
39 'slug' => 'borderless',
40 'required' => true,
41 'preselected' => true,
42 ],
43
44 [
45 'name' => 'Elementor',
46 'description' => 'Website Builder',
47 'slug' => 'elementor',
48 'preselected' => true,
49 ],
50
51 ];
52
53 } else {
54
55 $theme_plugins = [
56 [
57 'name' => 'Borderless',
58 'description' => 'Widgets, Elements, Templates and Toolkit',
59 'slug' => 'borderless',
60 'required' => true,
61 'preselected' => true,
62 ],
63
64 [
65 'name' => 'Elementor',
66 'description' => 'Website Builder',
67 'slug' => 'elementor',
68 'preselected' => true,
69 ],
70
71 [
72 'name' => 'WPBakery',
73 'description' => 'Website Builder',
74 'slug' => 'js_composer',
75 'source' => 'https://cdn.visualmodo.com/plugin/js_composer.zip',
76 'preselected' => true,
77 ],
78
79 ];
80
81 }
82
83 return array_merge( $plugins, $theme_plugins );
84
85 }
86 add_filter( 'library/register_plugins', 'library_register_plugins' );
87
88
89 /*-----------------------------------------------------------------------------------*/
90 /* Import Files - After Setup
91 /*-----------------------------------------------------------------------------------*/
92
93 function borderless_library_after_import( $template ) {
94 $theme = wp_get_theme(get_template());
95 require_once( BORDERLESS__INC . "/library/templates/classic-templates-after.php" );
96 require_once( BORDERLESS__INC . "/library/templates/borderless-templates-after.php" );
97
98 }
99
100 add_action( 'pt-library/after_import', 'borderless_library_after_import' );