Skip to content

Commit 41075dc

Browse files
committed
Bad script enqueue for tracking resolved.
1 parent 2cd69e0 commit 41075dc

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ReduxCore/inc/tracking.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ function __construct($parent){
3131
$options = get_option( 'Redux_Framework' );
3232

3333
if ( ! isset( $options['allow_tracking'] ) && isset( $_GET['page'] ) && $_GET['page'] == $parent->args['page_slug'] ) {
34-
wp_enqueue_style( 'wp-pointer' );
35-
wp_enqueue_script( 'jquery' );
36-
wp_enqueue_script( 'jquery-ui' );
37-
wp_enqueue_script( 'wp-pointer' );
38-
wp_enqueue_script( 'utils' );
39-
add_action( 'admin_print_footer_scripts', array( $this, 'tracking_request' ) );
34+
add_action( 'admin_enqueue_scripts', array( $this, 'tracking' ) );
4035
}
4136

4237
if ($options['allow_tracking'] == true) {
@@ -49,6 +44,15 @@ function __construct($parent){
4944
}
5045

5146

47+
function _enqueue() {
48+
wp_enqueue_style( 'wp-pointer' );
49+
wp_enqueue_script( 'jquery' );
50+
wp_enqueue_script( 'jquery-ui' );
51+
wp_enqueue_script( 'wp-pointer' );
52+
wp_enqueue_script( 'utils' );
53+
add_action( 'admin_print_footer_scripts', array( $this, 'tracking_request' ) );
54+
}
55+
5256
/**
5357
* Shows a popup that asks for permission to allow tracking.
5458
*/

0 commit comments

Comments
 (0)