File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -106,17 +106,18 @@ public static function set_hash( $data ) {
106
106
// For example if dustpress()->render() will be called multiple times 'dustpress/data' will run multiple times.
107
107
// The hash cannot change so we need to check if the value has been set already.
108
108
if ( empty ( self ::$ hash ) ) {
109
+
109
110
self ::$ hash = md5 ( $ _SERVER ['REQUEST_URI ' ] . microtime () );
110
- }
111
111
112
- $ data_array = array (
113
- 'ajaxurl ' => admin_url ('admin-ajax.php ' ),
114
- 'hash ' => self ::$ hash
115
- );
112
+ $ data_array = array (
113
+ 'ajaxurl ' => admin_url ('admin-ajax.php ' ),
114
+ 'hash ' => self ::$ hash
115
+ );
116
116
117
- wp_localize_script ( 'dustpress_debugger ' , 'dustpress_debugger ' , $ data_array );
117
+ wp_localize_script ( 'dustpress_debugger ' , 'dustpress_debugger ' , $ data_array );
118
118
119
- wp_enqueue_script ( 'dustpress_debugger ' );
119
+ wp_enqueue_script ( 'dustpress_debugger ' );
120
+ }
120
121
121
122
return $ data ;
122
123
}
You can’t perform that action at this time.
0 commit comments