1 | <?php |
||
5 | class Bootstrap |
||
6 | { |
||
7 | public static function setTemplateDirectory() |
||
8 | { |
||
9 | add_action('after_switch_theme', function () { |
||
10 | $stylesheet = get_option('stylesheet'); |
||
11 | |||
12 | if (basename($stylesheet) !== 'templates') { |
||
13 | update_option('stylesheet', $stylesheet . '/templates'); |
||
14 | } |
||
15 | }); |
||
16 | |||
17 | add_filter('stylesheet', function ($stylesheet) { |
||
18 | return dirname($stylesheet); |
||
19 | }); |
||
20 | } |
||
21 | |||
22 | public static function checkRequiredPlugins() |
||
53 | |||
54 | protected static function notifyRequiredPluginIsMissing($pluginName) |
||
61 | } |
||
62 |