1 | <?php |
||
2 | |||
3 | namespace Flynt; |
||
4 | |||
5 | use Flynt\Utils\FileLoader; |
||
6 | |||
7 | require_once __DIR__ . '/vendor/autoload.php'; |
||
8 | |||
9 | if (!defined('WP_ENV')) { |
||
10 | define('WP_ENV', 'production'); |
||
11 | } |
||
12 | |||
13 | // This needs to happen first. |
||
14 | // Reason: In case the theme was just activated and the plugin is not active, |
||
15 | // we still need to run the after_switch_theme action, which is |
||
16 | // defined here. |
||
17 | Init::setTemplateDirectory(); |
||
18 | |||
19 | // Check if the required plugins are installed and activated. |
||
20 | // If they aren't, this function redirects the template rendering to use |
||
21 | // plugin-inactive.php instead and shows a warning in the admin backend. |
||
22 | if (Init::checkRequiredPlugins()) { |
||
23 | FileLoader::loadPhpFiles('inc'); |
||
24 | add_action('after_setup_theme', ['Flynt\Init', 'initTheme']); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
25 | add_action('after_setup_theme', ['Flynt\Init', 'loadComponents'], 101); |
||
26 | } |
||
27 |