@@ -257,6 +257,7 @@ function ableplayer_update_settings( $post ) {
257257 $ replace_audio = ( ! empty ( $ post ['replace_audio ' ] ) && 'on ' === $ post ['replace_audio ' ] ) ? 'true ' : 'false ' ;
258258 $ replace_playlists = ( ! empty ( $ post ['replace_playlists ' ] ) && 'on ' === $ post ['replace_playlists ' ] ) ? 'true ' : 'false ' ;
259259 $ youtube_nocookie = ( ! empty ( $ post ['youtube_nocookie ' ] ) && 'on ' === $ post ['youtube_nocookie ' ] ) ? 'true ' : 'false ' ;
260+ $ render_transcript = ( ! empty ( $ post ['render_transcript ' ] ) && 'on ' === $ post ['render_transcript ' ] ) ? 'true ' : 'false ' ;
260261 $ hide_controls = ( ! empty ( $ post ['hide_controls ' ] ) && 'on ' === $ post ['hide_controls ' ] ) ? 'true ' : 'false ' ;
261262 $ default_speed = ( isset ( $ post ['default_speed ' ] ) ) ? $ post ['default_speed ' ] : 'animals ' ;
262263 $ default_heading = ( isset ( $ post ['default_heading ' ] ) ) ? $ post ['default_heading ' ] : 'auto ' ;
@@ -266,6 +267,7 @@ function ableplayer_update_settings( $post ) {
266267 $ settings ['replace_audio ' ] = $ replace_audio ;
267268 $ settings ['replace_playlists ' ] = $ replace_playlists ;
268269 $ settings ['youtube_nocookie ' ] = $ youtube_nocookie ;
270+ $ settings ['render_transcript ' ] = $ render_transcript ;
269271 $ settings ['hide_controls ' ] = $ hide_controls ;
270272 $ settings ['default_speed ' ] = $ default_speed ;
271273 $ settings ['default_heading ' ] = $ default_heading ;
@@ -356,6 +358,17 @@ function ableplayer_settings_form() {
356358 ?>
357359 </p>
358360 <p>
361+ <?php
362+ ableplayer_settings_field (
363+ array (
364+ 'name ' => 'render_transcript ' ,
365+ 'label ' => __ ( 'Insert interactive transcript container. ' , 'ableplayer ' ),
366+ 'type ' => 'checkbox-single ' ,
367+ )
368+ );
369+ ?>
370+ </p>
371+ <p>
359372 <?php
360373 ableplayer_settings_field (
361374 array (
@@ -534,6 +547,7 @@ function ableplayer_default_settings() {
534547 'replace_audio ' => 'false ' ,
535548 'replace_playlists ' => 'false ' ,
536549 'youtube_nocookie ' => 'false ' ,
550+ 'render_transcript ' => 'true ' ,
537551 'default_poster ' => '' ,
538552 'default_speed ' => 'animals ' ,
539553 'hide_controls ' => 'false ' ,
0 commit comments