PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.2.9
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.2.9
4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / src / library / controllers / class-library-controller.php
superb-blocks / src / library / controllers Last commit date
class-library-controller.php 2 years ago class-request-controller.php 2 years ago
class-library-controller.php
38 lines
1 <?php
2
3 namespace SuperbAddons\Library\Controllers;
4
5 defined('ABSPATH') || exit();
6
7
8 class LibraryController
9 {
10 public static function InsertTemplates()
11 {
12 self::OutputTemplates(false);
13 }
14
15 public static function InsertTemplatesWithWrapper()
16 {
17 self::OutputTemplates();
18 }
19
20 private static function OutputTemplates($with_wrapper = true)
21 {
22 ob_start();
23 if ($with_wrapper) {
24 echo '<div class="superb-addons-template-library-page-wrapper" style="display:none;">';
25 }
26 include(SUPERBADDONS_PLUGIN_DIR . 'src/library/templates/library-page.php');
27 if ($with_wrapper) {
28 echo '</div>';
29 }
30 $template = ob_get_clean();
31 echo '<script type="text/template" id="tmpl-superbaddons-superb-library-page">' . $template . '</script>';
32 ob_start();
33 include(SUPERBADDONS_PLUGIN_DIR . 'src/library/templates/library-item.php');
34 $template = ob_get_clean();
35 echo '<script type="text/template" id="tmpl-superbaddons-superb-library-item">' . $template . '</script>';
36 }
37 }
38