Skip to content

Commit

Permalink
build mode script reset, template loader action defer, beta3 onepager
Browse files Browse the repository at this point in the history
  • Loading branch information
nadimtuhin committed Oct 25, 2015
1 parent 6df32ff commit 8a42a84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Assets/BuildModeScripts.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class BuildModeScripts {
use FormEngineScripts; use FormEngineScripts;


public function __construct() { public function __construct() {
add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScripts' ], 999999); add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScripts' ], 999999999);
add_action( 'wp_enqueue_scripts', function(){ add_action( 'wp_enqueue_scripts', function(){
if(!$this->isBuildMode()){ if(!$this->isBuildMode()){
return; return;
Expand Down
3 changes: 2 additions & 1 deletion app/Loaders/TemplateLoader.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ public function __construct( PageTemplater $pageTemplateManager ) {
$this->pageTemplateManager = $pageTemplateManager; $this->pageTemplateManager = $pageTemplateManager;


add_action( 'wp_loaded', [ $this, 'loadOnepagerPageTemplates' ] ); add_action( 'wp_loaded', [ $this, 'loadOnepagerPageTemplates' ] );
add_filter( 'template_include', [ $this, 'loadBuildModeTemplate' ], 9999999); //9999999999 is a very big number to make sure that builder.php loads whatever happens
add_filter( 'template_include', [ $this, 'loadBuildModeTemplate' ], 9999999999);
} }


public function loadBuildModeTemplate( $template ) { public function loadBuildModeTemplate( $template ) {
Expand Down
3 changes: 2 additions & 1 deletion src/WordPress/PageTemplater.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public function __construct() {


// Add a filter to the template include to determine if the page has our // Add a filter to the template include to determine if the page has our
// template assigned and return it's path // template assigned and return it's path
add_filter( 'template_include', array( $this, 'view_project_template' ), 999999 ); // check 999999 - its important
add_filter( 'template_include', array( $this, 'view_project_template' ), 99999999 );
} }


/** /**
Expand Down
4 changes: 2 additions & 2 deletions tx-onepager.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Onepager - One Page Builder * Plugin Name: Onepager - One Page Builder
* Plugin URI: http://getonepager.com * Plugin URI: http://getonepager.com
* Description: Modern, Powerful & Crazy Fast one page builder. Built with modern tools such ReactJS for next generation theming. * Description: Modern, Powerful & Crazy Fast one page builder. Built with modern tools such ReactJS for next generation theming.
* Version: 1.2.4-beta2 * Version: 1.2.4-beta3
* Author: ThemeXpert * Author: ThemeXpert
* Author URI: http://www.themexpert.com * Author URI: http://www.themexpert.com
* License: GPL-2.0+ * License: GPL-2.0+
Expand All @@ -18,7 +18,7 @@
} }


if(!defined('ONEPAGER_VERSION')){ if(!defined('ONEPAGER_VERSION')){
define( 'ONEPAGER_VERSION', '1.2.4-beta2' ); define( 'ONEPAGER_VERSION', '1.2.4-beta3' );
} }


if(!defined('ONEPAGER_PHP_VERSION')) { if(!defined('ONEPAGER_PHP_VERSION')) {
Expand Down

0 comments on commit 8a42a84

Please sign in to comment.