PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.3.1
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.3.1
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
insert-php / libs / factory / adverts / boot.php

boot.php in Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts 2.3.1, at libs/factory/adverts/boot.php

51 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use WBCR\Factory_Adverts_104\Base;
4
5 /**
6 * Factory Adverts
7 *
8 * @author Alexander Vitkalov <nechin.va@gmail.com>
9 * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
10 * @since 1.0.0
11 *
12 * @package factory-ad-inserter
13 * @copyright (c) 2019, Webcraftic Ltd
14 *
15 * @version 1.2.3
16 */
17
18 // Exit if accessed directly
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22
23 if ( defined( 'FACTORY_ADVERTS_104_LOADED' ) || ( defined( 'FACTORY_ADVERTS_BLOCK' ) && FACTORY_ADVERTS_BLOCK ) ) {
24 return;
25 }
26
27 # Устанавливаем константу, что модуль уже загружен
28 define( 'FACTORY_ADVERTS_104_LOADED', true );
29
30 # Устанавливаем версию модуля
31 define( 'FACTORY_ADVERTS_104_VERSION', '1.0.4' );
32
33 # Регистрируем тектовый домен, для интернализации интерфейса модуля
34 load_plugin_textdomain( 'wbcr_factory_adverts_104', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' );
35
36 # Устанавливаем директорию модуля
37 define( 'FACTORY_ADVERTS_104_DIR', dirname( __FILE__ ) );
38
39 # Устанавливаем url модуля
40 define( 'FACTORY_ADVERTS_104_URL', plugins_url( null, __FILE__ ) );
41
42 require_once( FACTORY_ADVERTS_104_DIR . '/includes/class-rest-request.php' );
43 require_once( FACTORY_ADVERTS_104_DIR . '/includes/class-base.php' );
44
45 /**
46 * @param Wbcr_Factory422_Plugin $plugin
47 */
48 add_action( 'wbcr_factory_adverts_104_plugin_created', function ( $plugin ) {
49 $plugin->set_adverts_manager( "WBCR\Factory_Adverts_104\Base" );
50 } );
51