equal
deleted
inserted
replaced
187 public function render_control_template_scripts() { |
187 public function render_control_template_scripts() { |
188 parent::render_control_template_scripts() |
188 parent::render_control_template_scripts() |
189 ?> |
189 ?> |
190 <script type="text/html" id="tmpl-wp-media-widget-audio-preview"> |
190 <script type="text/html" id="tmpl-wp-media-widget-audio-preview"> |
191 <# if ( data.error && 'missing_attachment' === data.error ) { #> |
191 <# if ( data.error && 'missing_attachment' === data.error ) { #> |
192 <div class="notice notice-error notice-alt notice-missing-attachment"> |
192 <?php |
193 <p><?php echo $this->l10n['missing_attachment']; ?></p> |
193 wp_admin_notice( |
194 </div> |
194 $this->l10n['missing_attachment'], |
|
195 array( |
|
196 'type' => 'error', |
|
197 'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ), |
|
198 ) |
|
199 ); |
|
200 ?> |
195 <# } else if ( data.error ) { #> |
201 <# } else if ( data.error ) { #> |
196 <div class="notice notice-error notice-alt"> |
202 <?php |
197 <p><?php _e( 'Unable to preview media due to an unknown error.' ); ?></p> |
203 wp_admin_notice( |
198 </div> |
204 __( 'Unable to preview media due to an unknown error.' ), |
|
205 array( |
|
206 'type' => 'error', |
|
207 'additional_classes' => array( 'notice-alt' ), |
|
208 ) |
|
209 ); |
|
210 ?> |
199 <# } else if ( data.model && data.model.src ) { #> |
211 <# } else if ( data.model && data.model.src ) { #> |
200 <?php wp_underscore_audio_template(); ?> |
212 <?php wp_underscore_audio_template(); ?> |
201 <# } #> |
213 <# } #> |
202 </script> |
214 </script> |
203 <?php |
215 <?php |