Skip to content

Commit ce78f37

Browse files
committed
Inconsistent key name; incorrect variable.
1 parent b4eca1e commit ce78f37

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/ableplayer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ function ableplayer_shortcode( $atts, $content = null ) {
442442

443443
$tracks = array();
444444
$kinds = array(
445-
'captions' => __( 'Captions', 'ableplayer' ),
446-
'subtitles' => __( 'Subtitles', 'ableplayer' ),
447-
'description' => __( 'Audio Description', 'ableplayer' ),
448-
'chapters' => __( 'Chapters', 'ableplayer' ),
445+
'captions' => __( 'Captions', 'ableplayer' ),
446+
'subtitles' => __( 'Subtitles', 'ableplayer' ),
447+
'descriptions' => __( 'Audio Description', 'ableplayer' ),
448+
'chapters' => __( 'Chapters', 'ableplayer' ),
449449
);
450450
// Switch locale to BCP47 syntax.
451451
$default_lang = str_replace( '_', '-', get_locale() );

src/inc/generator.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ function ableplayer_shortcode_track( $kind, $post ) {
8383
// Handle track srclang and label.
8484
$default_lang = str_replace( '_', '-', get_locale() );
8585
$kinds = array(
86-
'captions' => __( 'Captions', 'ableplayer' ),
87-
'subtitles' => __( 'Subtitles', 'ableplayer' ),
88-
'description' => __( 'Audio Description', 'ableplayer' ),
89-
'chapters' => __( 'Chapters', 'ableplayer' ),
86+
'captions' => __( 'Captions', 'ableplayer' ),
87+
'subtitles' => __( 'Subtitles', 'ableplayer' ),
88+
'descriptions' => __( 'Audio Description', 'ableplayer' ),
89+
'chapters' => __( 'Chapters', 'ableplayer' ),
9090
);
9191

9292
$v = '';
@@ -95,7 +95,7 @@ function ableplayer_shortcode_track( $kind, $post ) {
9595
if ( $srclang && $srclang !== $default_lang ) {
9696
$v .= '|' . $srclang;
9797
}
98-
if ( $label && $srclang !== $kinds['captions'] ) {
98+
if ( $label && $label !== $kinds['captions'] ) {
9999
$v .= '|' . $label;
100100
}
101101

@@ -135,10 +135,10 @@ function ableplayer_generator_fields( $data ) {
135135
$shortcode = ( ! isset( $params['shortcode'] ) && $last_shortcode ) ? "[$last_shortcode]" : $shortcode;
136136
$default_lang = str_replace( '_', '-', get_locale() );
137137
$kinds = array(
138-
'captions' => __( 'Captions', 'ableplayer' ),
139-
'subtitles' => __( 'Subtitles', 'ableplayer' ),
140-
'description' => __( 'Audio Description', 'ableplayer' ),
141-
'chapters' => __( 'Chapters', 'ableplayer' ),
138+
'captions' => __( 'Captions', 'ableplayer' ),
139+
'subtitles' => __( 'Subtitles', 'ableplayer' ),
140+
'descriptions' => __( 'Audio Description', 'ableplayer' ),
141+
'chapters' => __( 'Chapters', 'ableplayer' ),
142142
);
143143
?>
144144
<div id="ableplayer-generator" class="generator">

0 commit comments

Comments
 (0)