Permalink
Browse files

refactored theme.php

  • Loading branch information...
1 parent 9ac05db commit 5ac65810e78a01fedf844c97fa7df69f1ae0d08f @nadimtuhin nadimtuhin committed Oct 20, 2015
Showing with 1 addition and 49 deletions.
  1. +1 −49 theme.php
View
@@ -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" );

0 comments on commit 5ac6581

Please sign in to comment.