Changeset 12041
- Timestamp:
- 09/02/2022 05:00:44 AM (2 years ago)
- Location:
- sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-upload-subtitles/wordpresstv-upload-subtitles.php
r8230 r12041 149 149 if ( ! $parent || ! in_array( $parent->post_status, array( 'publish', 'private' ), true ) ) { 150 150 wp_die( 'You can not subtitle this video.' ); 151 }152 153 $tracks = class_exists( 'VideoPress_Subtitles' ) ? VideoPress_Subtitles::get_tracks( $video_data->guid ) : array();154 if ( ! empty( $tracks[ $language['key'] ] ) ) {155 $this->error( 8 );156 151 } 157 152 -
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/upload-subtitles-template.php
r8365 r12041 277 277 <?php $tracks = VideoPress_Subtitles::get_tracks( $video->guid ); ?> 278 278 <?php foreach ( VideoPress_Subtitles::get_languages() as $value => $language ) : ?> 279 <option value="<?php echo esc_attr( $value ); ?>" <?php disabled( ! empty( $tracks[ $value ] ) ); ?>><?php echo esc_html( $language['localized_label'] ); ?></option>279 <option value="<?php echo esc_attr( $value ); ?>" ><?php echo esc_html( $language['localized_label'] ); ?></option> 280 280 <?php endforeach; ?> 281 281 </select>
Note: See TracChangeset
for help on using the changeset viewer.