Async JavaScript - Version 2.20.02.27

Version Description

  • fix for some nasty issues, thanks for the heads-up Mikey
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 Async JavaScript
Version 2.20.02.27
Comparing to
See all releases

Code changes from version 2.19.07.14 to 2.20.02.27

async-javascript.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Async JavaScript
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Async JavaScript gives you full control of which scripts to add a 'async' or 'defer' attribute to or to exclude to help increase the performance of your WordPress website
6
- * Version: 2.19.07.14
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: async-javascript
3
  * Plugin Name: Async JavaScript
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Async JavaScript gives you full control of which scripts to add a 'async' or 'defer' attribute to or to exclude to help increase the performance of your WordPress website
6
+ * Version: 2.20.02.27
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: async-javascript
asyncjsAllAjax.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
9
  */
10
 
11
  $aj_gtmetrix_results = get_option( 'aj_gtmetrix_results', array() );
12
- if ( !isset( $_POST['sub_action'] ) ) {
13
  $return = array(
14
  'status' => false,
15
  'error' => 'No sub action defined.'
9
  */
10
 
11
  $aj_gtmetrix_results = get_option( 'aj_gtmetrix_results', array() );
12
+ if ( ! isset( $_POST['sub_action'] ) || ! current_user_can( 'manage_options' ) ) {
13
  $return = array(
14
  'status' => false,
15
  'error' => 'No sub action defined.'
asyncjsFrontendClass.php CHANGED
@@ -41,6 +41,9 @@ class AsyncJavaScriptFrontend {
41
  if ( isset( $_GET['aj_simulate'] ) ) {
42
  $aj_enabled = true;
43
  $aj_method = sanitize_text_field( $_GET['aj_simulate'] );
 
 
 
44
  if ( isset( $_GET['aj_simulate_jquery'] ) ) {
45
  $aj_jquery = sanitize_text_field( $_GET['aj_simulate_jquery'] );
46
  } else {
41
  if ( isset( $_GET['aj_simulate'] ) ) {
42
  $aj_enabled = true;
43
  $aj_method = sanitize_text_field( $_GET['aj_simulate'] );
44
+ if ( $aj_method !== 'async' && $aj_method !== 'defer' ) {
45
+ $aj_method = 'async';
46
+ }
47
  if ( isset( $_GET['aj_simulate_jquery'] ) ) {
48
  $aj_jquery = sanitize_text_field( $_GET['aj_simulate_jquery'] );
49
  } else {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: (cloughit), optimizingmatters, futtta, wormeyman
3
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
4
  Tags: async, javascript, pagespeed, performance, render blocking
5
  Requires at least: 4.6
6
- Tested up to: 5.2
7
- Stable tag: 2.19.07.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -57,6 +57,10 @@ We recommend using the awesome <a href="https://wordpress.org/plugins/autoptimiz
57
 
58
  == Changelog ==
59
 
 
 
 
 
60
  = 2.19.07.14 =
61
 
62
  * add `asyncjs_filter_noptimize` filter
3
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
4
  Tags: async, javascript, pagespeed, performance, render blocking
5
  Requires at least: 4.6
6
+ Tested up to: 5.4
7
+ Stable tag: 2.20.02.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 2.20.02.27 =
61
+
62
+ * fix for some nasty issues, thanks for the heads-up Mikey
63
+
64
  = 2.19.07.14 =
65
 
66
  * add `asyncjs_filter_noptimize` filter