Skip to content

Commit 5838390

Browse files
committed
Document filters & add support for core shortcode filtering
1 parent 49021a9 commit 5838390

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

src/ableplayer.php

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,25 @@ function ableplayer_enqueue_scripts() {
5353
wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . '/js.cookie.js', array( 'jquery' ) );
5454
wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js' );
5555

56-
// Register/enqueue Able Player JavaScript (if debugging, unminified).
56+
/**
57+
* Filter the Able Player build directory JS.
58+
*
59+
* @hook able_player_js
60+
*
61+
* @param string $url URL to Able Player root directory.
62+
*
63+
* @return string
64+
*/
5765
$js_dir = apply_filters( 'able_player_js', plugins_url( 'build', __FILE__ ) );
58-
// Register/enqueue Able Player CSS (if debugging, unminified)).
66+
/**
67+
* Filter the Able Player build directory CSS.
68+
*
69+
* @hook able_player_css
70+
*
71+
* @param string $url URL to Able Player root directory.
72+
*
73+
* @return string
74+
*/
5975
$css_dir = apply_filters( 'able_player_css', plugins_url( 'build', __FILE__ ) );
6076

6177
$is_production_environment = ( function_exists( 'wp_get_environment_type' ) && wp_get_environment_type() === 'production' ) ? true : SCRIPT_DEBUG;
@@ -116,7 +132,8 @@ function ableplayer_shortcode( $atts, $content = null ) {
116132
'nowplaying' => 'false',
117133
'skin' => '2020',
118134
),
119-
$atts
135+
$atts,
136+
'ableplayer'
120137
);
121138

122139
// output.

0 commit comments

Comments
 (0)