|
72 | 72 | */ |
73 | 73 | function ableplayer_enqueue_scripts() { |
74 | 74 | // Register/enqueue other dependencies. |
75 | | - wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . '/js.cookie.js', array( 'jquery' ), ABLEPLAYER_VERSION ); |
76 | | - wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), ABLEPLAYER_VERSION ); |
| 75 | + wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . '/js.cookie.js', array( 'jquery' ), ABLEPLAYER_VERSION, true ); |
| 76 | + wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), ABLEPLAYER_VERSION, true ); |
77 | 77 |
|
78 | 78 | // if the environment is production, use minified files. Otherwise, inherit the value of SCRIPT_DEBUG. |
79 | 79 | $is_production = ( function_exists( 'wp_get_environment_type' ) && wp_get_environment_type() === 'production' ) ? true : SCRIPT_DEBUG; |
|
104 | 104 | $css_dir = apply_filters( 'able_player_css', plugins_url( 'build', __FILE__ ) . '/' . $css_file, $is_production ); |
105 | 105 |
|
106 | 106 | // Enqueue Able Player script and CSS. |
107 | | - wp_enqueue_script( 'ableplayer', $js_dir, array( 'jquery' ), ABLEPLAYER_VERSION ); |
| 107 | + wp_enqueue_script( 'ableplayer', $js_dir, array( 'jquery' ), ABLEPLAYER_VERSION, true ); |
108 | 108 | wp_enqueue_style( 'ableplayer', $css_dir, array(), ABLEPLAYER_VERSION ); |
109 | 109 | } |
110 | 110 | add_action( 'wp_enqueue_scripts', 'ableplayer_enqueue_scripts' ); |
|
0 commit comments