Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -228,17 +228,35 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
|
||||
?>
|
||||
<script type="text/html" id="tmpl-wp-media-widget-video-preview">
|
||||
<# if ( data.error && 'missing_attachment' === data.error ) { #>
|
||||
<div class="notice notice-error notice-alt notice-missing-attachment">
|
||||
<p><?php echo $this->l10n['missing_attachment']; ?></p>
|
||||
</div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
$this->l10n['missing_attachment'],
|
||||
array(
|
||||
'type' => 'error',
|
||||
'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } else if ( data.error && 'unsupported_file_type' === data.error ) { #>
|
||||
<div class="notice notice-error notice-alt notice-missing-attachment">
|
||||
<p><?php echo $this->l10n['unsupported_file_type']; ?></p>
|
||||
</div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
$this->l10n['unsupported_file_type'],
|
||||
array(
|
||||
'type' => 'error',
|
||||
'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } else if ( data.error ) { #>
|
||||
<div class="notice notice-error notice-alt">
|
||||
<p><?php _e( 'Unable to preview media due to an unknown error.' ); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
__( 'Unable to preview media due to an unknown error.' ),
|
||||
array(
|
||||
'type' => 'error',
|
||||
'additional_classes' => array( 'notice-alt' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } else if ( data.is_oembed && data.model.poster ) { #>
|
||||
<a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link">
|
||||
<img src="{{ data.model.poster }}" />
|
||||
|
||||
Reference in New Issue
Block a user