PluginProbe
Disable Comments & Delete All Comments / trunk
Disable Comments & Delete All Comments vtrunk
1.3.3 1.3.2 trunk 1.0.0 1.0.4 1.0.5 1.0.8 1.0.9 1.1.1 1.1.3 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.3.0 1.3.1
comments-plus / libs / factory / templates / boot.php

boot.php in Disable Comments & Delete All Comments trunk, at libs/factory/templates/boot.php

92 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Factory Templates
4 *
5 * @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
6 * @since 1.0.2
7 * @package clearfy
8 * @copyright (c) 2018, Webcraftic Ltd
9 *
10 */
11
12 // Exit if accessed directly
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 if ( defined( 'FACTORY_TEMPLATES_134_LOADED' ) ) {
18 return;
19 }
20
21 define( 'FACTORY_TEMPLATES_134_LOADED', true );
22 define( 'FACTORY_TEMPLATES_134', '1.3.4' );
23
24 define( 'FACTORY_TEMPLATES_134_DIR', dirname( __FILE__ ) );
25 define( 'FACTORY_TEMPLATES_134_URL', plugins_url( '', __FILE__ ) );
26
27 add_action( 'init', function () {
28 load_plugin_textdomain( 'wbcr_factory_templates_134', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' );
29 } );
30
31 require( FACTORY_TEMPLATES_134_DIR . '/includes/ajax-handlers.php' );
32 require( FACTORY_TEMPLATES_134_DIR . '/includes/class-helpers.php' );
33 require( FACTORY_TEMPLATES_134_DIR . '/includes/class-configurate.php' );
34
35 // module provides function only for the admin area
36 if ( is_admin() ) {
37 /**
38 * Подключаем скрипты для установки компонентов Clearfy
39 * на все страницы админпанели.
40 */
41 add_action( 'admin_enqueue_scripts', function ( $hook ) {
42 wp_enqueue_script( 'wbcr-factory-templates-134-global', FACTORY_TEMPLATES_134_URL . '/assets/js/clearfy-globals.js', [
43 'jquery',
44 'wfactory-480-core-general'
45 ], FACTORY_TEMPLATES_134 );
46
47 require_once FACTORY_TEMPLATES_134_DIR . '/includes/class-search-options.php';
48 $all_options = \WBCR\Factory_Templates_134\Search_Options::get_all_options();
49
50 if ( empty( $all_options ) ) {
51 return;
52 }
53
54 $allow_print_data = false;
55 $formated_options = [];
56
57 foreach ( $all_options as $option ) {
58 //if( !$allow_print_data && isset($_GET['page']) && $option['page_id'] === $_GET['page'] ) {
59 //$allow_print_data = true;
60 //}
61
62 $formated_options[] = [
63 'value' => $option['title'],
64 'data' => [
65 //'hint' => isset($option['hint']) ? $option['hint'] : '',
66 'page_url' => $option['page_url'],
67 'page_id' => $option['page_id']
68 ]
69 ];
70 }
71
72 //if( !$allow_print_data ) {
73 //return;
74 //}
75
76 wp_localize_script( 'wbcr-factory-templates-134-global', 'wfactory_clearfy_search_options', $formated_options );
77 } );
78
79 if ( defined( 'FACTORY_PAGES_480_LOADED' ) ) {
80 require( FACTORY_TEMPLATES_134_DIR . '/pages/templates/impressive/class-page-template-impressive.php' );
81 require( FACTORY_TEMPLATES_134_DIR . '/pages/templates/impressive/class-pages.php' );
82 require( FACTORY_TEMPLATES_134_DIR . '/pages/templates/impressive-lite/class-page-template-impressive-lite.php' );
83
84 require( FACTORY_TEMPLATES_134_DIR . '/pages/class-page-license.php' );
85 require( FACTORY_TEMPLATES_134_DIR . '/pages/class-pages-components.php' );
86
87 require( FACTORY_TEMPLATES_134_DIR . '/pages/setup-parts/class-step.php' );
88 require( FACTORY_TEMPLATES_134_DIR . '/pages/setup-parts/class-step-form.php' );
89 require( FACTORY_TEMPLATES_134_DIR . '/pages/setup-parts/class-step-custom.php' );
90 require( FACTORY_TEMPLATES_134_DIR . '/pages/class-page-setup.php' );
91 }
92 }