|
74 | 74 | * Load styles and scripts to head. |
75 | 75 | */ |
76 | 76 | function ableplayer_enqueue_scripts() { |
77 | | - $debug = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false; |
78 | | - $version = ABLEPLAYER_VERSION; |
79 | | - $version = ( $debug ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version; |
| 77 | + $debug = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false; |
| 78 | + $version = ABLEPLAYER_VERSION; |
| 79 | + $version = ( $debug ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version; |
| 80 | + $dependencies = array( 'jquery', 'ableplayer-video' ); |
| 81 | + |
80 | 82 | // Register/enqueue other dependencies. |
81 | 83 | if ( 'true' === ableplayer_get_settings( 'cookies' ) ) { |
82 | 84 | $cookie_js = ( $debug ) ? '/js.cookie.js' : '/js.cookie.min.js'; |
83 | 85 | wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . $cookie_js, array(), $version, true ); |
| 86 | + $dependencies = array( 'js-cookie', 'jquery', 'ableplayer-video' ); |
84 | 87 | } |
85 | 88 | if ( 'true' === ableplayer_get_settings( 'vimeo' ) ) { |
86 | 89 | wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), $version, true ); |
|
132 | 135 | */ |
133 | 136 | $css_dir = apply_filters( 'able_player_css', plugins_url( '', __FILE__ ) . '/' . $css_file, $debug ); |
134 | 137 |
|
135 | | - $dependencies = array( 'js-cookie', 'jquery', 'ableplayer-video' ); |
136 | 138 | /** |
137 | 139 | * Filter the Able Player script dependencies. |
138 | 140 | * |
|
0 commit comments