-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
WordpressMagicBoilerplate.php
executable file
·63 lines (49 loc) · 1.54 KB
/
WordpressMagicBoilerplate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/*
Plugin Name: WordpressMagicBoilerplate plugin
Plugin URI: http://alkoweb.ru
Author: Petrozavodsky
Author URI: http://alkoweb.ru
Text Domain: WordpressMagicBoilerplate
Domain Path: /languages
Requires PHP: 7.0
Version: 1.0.3
License: GPLv3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once( plugin_dir_path( __FILE__ )."includes/Autoloader.php" );
if(file_exists(plugin_dir_path(__FILE__)."vendor/autoload.php")) {
require_once(plugin_dir_path(__FILE__) . "vendor/autoload.php");
}
use WordpressMagicBoilerplate\Autoloader;
new Autoloader( __FILE__, 'WordpressMagicBoilerplate' );
use WordpressMagicBoilerplate\Base\Wrap;
class WordpressMagicBoilerplate extends Wrap {
public $version = '1.0.3';
public static $textdomine;
public function __construct() {
self::$textdomine = $this->setTextdomain();
new \WordpressMagicBoilerplate\Classes\AjaxOut( 'boilerplate-ajax' );
new \WordpressMagicBoilerplate\Classes\AjaxOut2();
new \WordpressMagicBoilerplate\Classes\AjaxOut3('boilerplate-ajax-3');
new \WordpressMagicBoilerplate\Classes\MyClass( $this );
new \WordpressMagicBoilerplate\Utils\ActivateWidgets(
__FILE__,
'Widgets',
'WordpressMagicBoilerplate'
);
new \WordpressMagicBoilerplate\Classes\Shortcode(
'boilerplate_shortcode',
[
'title' => 'Boilerplate title',
'description' => 'Boilerplate description'
]
);
}
}
function WordpressMagicBoilerplate__init() {
new WordpressMagicBoilerplate();
}
add_action( 'plugins_loaded', 'WordpressMagicBoilerplate__init', 30 );