Skip to content

Commit

Permalink
Use wp_rand
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Nov 22, 2023
1 parent fea21d4 commit 638b241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mt-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ function mt_array_code( $k ) {
*/
function mt_wp_enqueue_scripts() {
global $current_screen;
$version = ( true === SCRIPT_DEBUG ) ? mt_rand( 10000, 100000 ) : mt_get_current_version();
$version = ( true === SCRIPT_DEBUG ) ? wp_rand( 10000, 100000 ) : mt_get_current_version();
$options = array_merge( mt_default_settings(), get_option( 'mt_settings', array() ) );
if ( isset( $_GET['page'] ) && 'my-tickets' === $_GET['page'] ) {
wp_enqueue_script( 'mt.tabs', plugins_url( 'js/tabs.js', __FILE__ ), array( 'jquery' ), $version );
Expand Down Expand Up @@ -607,7 +607,7 @@ function mt_ajax_move_ticket() {
* Enqueue footer scripts in report view.
*/
function mt_report_scripts() {
$version = ( true === SCRIPT_DEBUG ) ? mt_rand( 10000, 100000 ) : mt_get_current_version();
$version = ( true === SCRIPT_DEBUG ) ? wp_rand( 10000, 100000 ) : mt_get_current_version();
if ( isset( $_GET['mt-event-report'] ) && isset( $_GET['mt_print'] ) ) {
wp_enqueue_script( 'mt.printable', plugins_url( 'js/report.js', __FILE__ ), array( 'jquery' ), $version );
wp_localize_script(
Expand Down

0 comments on commit 638b241

Please sign in to comment.