Skip to content

Commit aec95c2

Browse files
committed
deploy: 7c1e74b
1 parent 76909b0 commit aec95c2

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

able_player_css.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line91">line 91</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line93">line 93</a>
161161
</li></ul></dd>
162162

163163

able_player_js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line80">line 80</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line82">line 82</a>
161161
</li></ul></dd>
162162

163163

ableplayer.php.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
// Register/enqueue other dependencies.
8181
$cookie_js = ( $debug ) ? '/js.cookie.js' : '/js.cookie.min.js';
8282
wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . $cookie_js, array(), $version, true );
83-
wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), $version, true );
83+
if ( 'true' === ableplayer_get_settings( 'vimeo' ) ) {
84+
wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), $version, true );
85+
}
8486
wp_enqueue_style( 'ableplayer-video', plugins_url( 'assets', __FILE__ ) . '/css/media.css', array(), $version );
8587
$media_js = ( $debug ) ? 'media.js' : 'media.min.js';
8688
wp_register_script(
@@ -138,7 +140,16 @@
138140
* @return {array}
139141
*/
140142
$dependencies = apply_filters( 'ableplayer_dependencies', $dependencies, $debug );
141-
wp_enqueue_script( 'ableplayer', $js_dir, $dependencies, $version, true );
143+
wp_enqueue_script(
144+
'ableplayer',
145+
$js_dir,
146+
$dependencies,
147+
$version,
148+
array(
149+
'in_footer' => true,
150+
'strategy' => 'defer',
151+
)
152+
);
142153
wp_enqueue_style( 'ableplayer', $css_dir, array(), $version );
143154
}
144155
add_action( 'wp_enqueue_scripts', 'ableplayer_enqueue_scripts' );
@@ -460,6 +471,13 @@
460471
$atts,
461472
'ableplayer'
462473
);
474+
// If vimeo ID is set, enqueue the vimeo player.
475+
if ( $all_atts['vimeo-id'] ) {
476+
$debug = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false;
477+
$version = ABLEPLAYER_VERSION;
478+
$version = ( $debug ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version;
479+
wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array( 'ableplayer' ), $version, true );
480+
}
463481

464482
$source = '';
465483
$datasource = '';

ableplayer_dependencies.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line104">line 104</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line106">line 106</a>
161161
</li></ul></dd>
162162

163163

ableplayer_parameters.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ <h5>Parameters:</h5>
136136

137137
<dt class="tag-source">Source:</dt>
138138
<dd class="tag-source"><ul class="dummy"><li>
139-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line359">line 359</a>
139+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line370">line 370</a>
140140
</li></ul></dd>
141141

142142

0 commit comments

Comments
 (0)