-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ac05db
commit 5ac6581
Showing
1 changed file
with
1 addition
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,7 @@ | ||
<?php | ||
// If this file is called directly, abort. | ||
if ( ! defined( 'WPINC' ) ) { | ||
die; | ||
} | ||
|
||
if ( ! defined( 'ONEPAGER_VERSION' ) ) { | ||
define( 'ONEPAGER_VERSION', '1.2.3.3' ); | ||
} | ||
|
||
if ( ! defined( 'ONEPAGER_PHP_VERSION' ) ) { | ||
define( 'ONEPAGER_PHP_VERSION', '5.4' ); | ||
} | ||
|
||
if ( ! defined( 'ONEPAGER_URL' ) ) { | ||
define( 'ONEPAGER_URL', get_stylesheet_directory_uri()."/tx-onepager" ); | ||
} | ||
|
||
require( __DIR__ . "/constants.php" ); | ||
|
||
function onepager_php_version_check() { | ||
if ( ! version_compare( PHP_VERSION, ONEPAGER_PHP_VERSION, '<' ) ) { | ||
return; | ||
} | ||
|
||
$notice = | ||
'You are running ancient version of PHP-<strong>%s</strong>. | ||
Onepager requires at least PHP <strong>%s</strong> to run smoothly. | ||
<br/>Please update your PHP version to run this plugin and keep you website secure.'; | ||
|
||
wp_die( sprintf( $notice, PHP_VERSION, ONEPAGER_PHP_VERSION ) ); | ||
} | ||
|
||
onepager_php_version_check(); | ||
|
||
|
||
require( ONEPAGER_PATH . '/app/inc/support.php' ); | ||
require( ONEPAGER_PATH . '/src/functions.php' ); | ||
require( ONEPAGER_PATH . '/src/theme_helpers.php' ); | ||
require( ONEPAGER_PATH . '/vendor/autoload.php' ); | ||
|
||
require( ONEPAGER_PATH . '/app/Onepager.php' ); | ||
require( ONEPAGER_PATH . '/app/bootstrap.php' ); | ||
|
||
require( ONEPAGER_PATH . '/app/Api/routes.php' ); | ||
require( ONEPAGER_PATH . '/app/OptionsPanel/settings.php' ); | ||
require( ONEPAGER_PATH . '/app/Metabox/metabox.php' ); | ||
|
||
|
||
add_action( 'wp_head', 'print_onepager_meta' ); | ||
function print_onepager_meta() { | ||
echo "<meta type='page-builder' content='tx-onepager'>"; | ||
} | ||
|
||
do_action( 'onepager_loaded' ); | ||
require( __DIR__ . "/tx-onepager.php" ); |