Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
33.33% covered (danger)
33.33%
1 / 3
CRAP
71.43% covered (warning)
71.43%
5 / 7
WordPressFeatures
0.00% covered (danger)
0.00%
0 / 1
33.33% covered (danger)
33.33%
1 / 3
8.14
71.43% covered (warning)
71.43%
5 / 7
 isTermsMetaSupported
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 isDebug
0.00% covered (danger)
0.00%
0 / 1
3.33
66.67% covered (warning)
66.67%
2 / 3
 isScriptDebug
0.00% covered (danger)
0.00%
0 / 1
3.33
66.67% covered (warning)
66.67%
2 / 3
<?php
declare(strict_types=1);
namespace Korobochkin\WPKit\Utils;
class WordPressFeatures
{
    /**
     * @return bool True if WordPress supported terms meta.
     */
    public static function isTermsMetaSupported()
    {
        return Compatibility::checkWordPress('4.4');
    }
    /**
     * WordPress Debug mode.
     *
     * @return bool True if debug mode enabled.
     */
    public static function isDebug()
    {
        if (defined('WP_DEBUG') && WP_DEBUG == true) {
            return true;
        }
        return false;
    }
    /**
     * Script Debug mode.
     *
     * @return bool True if Script Debug mode enabled.
     */
    public static function isScriptDebug()
    {
        if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true) {
            return true;
        }
        return false;
    }
}