wp/wp-includes/widgets/class-wp-widget-media-video.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
   226 	public function render_control_template_scripts() {
   226 	public function render_control_template_scripts() {
   227 		parent::render_control_template_scripts()
   227 		parent::render_control_template_scripts()
   228 		?>
   228 		?>
   229 		<script type="text/html" id="tmpl-wp-media-widget-video-preview">
   229 		<script type="text/html" id="tmpl-wp-media-widget-video-preview">
   230 			<# if ( data.error && 'missing_attachment' === data.error ) { #>
   230 			<# if ( data.error && 'missing_attachment' === data.error ) { #>
   231 				<div class="notice notice-error notice-alt notice-missing-attachment">
   231 				<?php
   232 					<p><?php echo $this->l10n['missing_attachment']; ?></p>
   232 				wp_admin_notice(
   233 				</div>
   233 					$this->l10n['missing_attachment'],
       
   234 					array(
       
   235 						'type'               => 'error',
       
   236 						'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ),
       
   237 					)
       
   238 				);
       
   239 				?>
   234 			<# } else if ( data.error && 'unsupported_file_type' === data.error ) { #>
   240 			<# } else if ( data.error && 'unsupported_file_type' === data.error ) { #>
   235 				<div class="notice notice-error notice-alt notice-missing-attachment">
   241 				<?php
   236 					<p><?php echo $this->l10n['unsupported_file_type']; ?></p>
   242 				wp_admin_notice(
   237 				</div>
   243 					$this->l10n['unsupported_file_type'],
       
   244 					array(
       
   245 						'type'               => 'error',
       
   246 						'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ),
       
   247 					)
       
   248 				);
       
   249 				?>
   238 			<# } else if ( data.error ) { #>
   250 			<# } else if ( data.error ) { #>
   239 				<div class="notice notice-error notice-alt">
   251 				<?php
   240 					<p><?php _e( 'Unable to preview media due to an unknown error.' ); ?></p>
   252 				wp_admin_notice(
   241 				</div>
   253 					__( 'Unable to preview media due to an unknown error.' ),
       
   254 					array(
       
   255 						'type'               => 'error',
       
   256 						'additional_classes' => array( 'notice-alt' ),
       
   257 					)
       
   258 				);
       
   259 				?>
   242 			<# } else if ( data.is_oembed && data.model.poster ) { #>
   260 			<# } else if ( data.is_oembed && data.model.poster ) { #>
   243 				<a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link">
   261 				<a href="{{ data.model.src }}" target="_blank" class="media-widget-video-link">
   244 					<img src="{{ data.model.poster }}" />
   262 					<img src="{{ data.model.poster }}" />
   245 				</a>
   263 				</a>
   246 			<# } else if ( data.is_oembed ) { #>
   264 			<# } else if ( data.is_oembed ) { #>