redux-templates.php (1509B)
1 <?php // phpcs:ignore WordPress.Files.FileName 2 /** 3 * Redux Framework is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * any later version. 7 * Redux Framework is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * You should have received a copy of the GNU General Public License 12 * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>. 13 * 14 * @package Redux_Templates 15 * @subpackage Core 16 * @subpackage Core 17 * @author Redux.io + Dovy Paukstys 18 */ 19 20 if ( ! defined( 'ABSPATH' ) ) { 21 exit; // Exit if accessed directly. 22 } 23 24 // Define Version. 25 define( 'REDUXTEMPLATES_VERSION', Redux_Core::$version ); 26 27 // Define File DIR. 28 define( 'REDUXTEMPLATES_FILE', __FILE__ ); 29 30 // Define Dir URL. 31 define( 'REDUXTEMPLATES_DIR_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); 32 33 // Define Physical Path. 34 define( 'REDUXTEMPLATES_DIR_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); 35 36 // Version Check & Include Core. 37 if ( version_compare( PHP_VERSION, '7.1', '>=' ) && version_compare( get_bloginfo( 'version' ), '5.4', '>=' ) ) { 38 Redux_Functions_Ex::register_class_path( 'ReduxTemplates', REDUXTEMPLATES_DIR_PATH . 'classes/' ); 39 new ReduxTemplates\Init(); 40 }