From 2021d533c014e832b8c7368856688110fe289a8e Mon Sep 17 00:00:00 2001 From: Graziano Vincini Date: Fri, 6 Mar 2015 12:36:40 +0100 Subject: [PATCH] Fix Aeria Ajax Signed-off-by: Graziano Vincini --- aeria.php | 4 ++-- classes/AeriaAJAX.php | 6 ++++-- metadata.json | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/aeria.php b/aeria.php index 9480ada..9fa6bb8 100755 --- a/aeria.php +++ b/aeria.php @@ -5,14 +5,14 @@ * Author: Caffeina Srl * Author URI: http://caffeina.co * Plugin URI: https://github.com/CaffeinaLab/aeria - * Version: 1.3.6 + * Version: 1.3.7 */ // Exit if accessed directly if( false === defined('ABSPATH') ) exit; // The Framework version -define('AERIA','1.3.6'); +define('AERIA','1.3.7'); // Store whether or not we're in the admin if( false === defined('IS_ADMIN') ) define( 'IS_ADMIN', is_admin() ); diff --git a/classes/AeriaAJAX.php b/classes/AeriaAJAX.php index 6b58cdb..d8bbd65 100644 --- a/classes/AeriaAJAX.php +++ b/classes/AeriaAJAX.php @@ -2,8 +2,10 @@ // Exit if accessed directly. if( false === defined('AERIA') ) exit; -wp_enqueue_script('aeria.ajax', AERIA_URL.'resources/js/aeria.ajax.js'); -wp_localize_script('aeria.ajax', 'AERIA_AJAX', [ 'URL' => AERIA_HOME_URL.'index.php' ]); +add_action('init', function(){ + wp_enqueue_script('aeria.ajax', AERIA_URL.'resources/js/aeria.ajax.js'); + wp_localize_script('aeria.ajax', 'AERIA_AJAX', [ 'URL' => AERIA_HOME_URL.'index.php' ]); +}); // Install Ajax Handler add_filter('query_vars',function($vars) { diff --git a/metadata.json b/metadata.json index 28a1a09..b035afd 100644 --- a/metadata.json +++ b/metadata.json @@ -4,11 +4,11 @@ "homepage": "http://labs.caffeina.co/tech/aeria", "download_url": "https://github.com/CaffeinaLab/aeria/archive/master.zip", - "version": "1.3.6", + "version": "1.3.7", "requires": "3.5", "tested": "4.0", - "last_updated": "2015-02-25 16:45:00", - "upgrade_notice": "[New Feature] Aeria Post Raw", + "last_updated": "2015-03-06 12:30:00", + "upgrade_notice": "[FIX] Aeria Ajax fix", "author": "Caffeina", "author_homepage": "http://caffeina.co/",