Passed
Push — master ( 6d8428...88e482 )
by Doğa
02:54
created

functions.php (1 issue)

Labels
Severity
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
The function add_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
    /** @scrutinizer ignore-call */ 
25
    add_action('after_setup_theme', ['Flynt\Init', 'initTheme']);
Loading history...
25
    add_action('after_setup_theme', ['Flynt\Init', 'loadComponents'], 101);
26
}
27