WP_Widget_Media_Audio::render_control_template_scripts()
Render form template scripts.
Method of the class: WP_Widget_Media_Audio{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Widget_Media_Audio = new WP_Widget_Media_Audio(); $WP_Widget_Media_Audio->render_control_template_scripts();
Changelog
Since 4.8.0 | Introduced. |
WP_Widget_Media_Audio::render_control_template_scripts() WP Widget Media Audio::render control template scripts code WP 6.7.1
<?php public function render_control_template_scripts() { parent::render_control_template_scripts() ?> <script type="text/html" id="tmpl-wp-media-widget-audio-preview"> <# if ( data.error && 'missing_attachment' === data.error ) { #> <?php wp_admin_notice( $this->l10n['missing_attachment'], array( 'type' => 'error', 'additional_classes' => array( 'notice-alt', 'notice-missing-attachment' ), ) ); ?> <# } else if ( data.error ) { #> <?php wp_admin_notice( __( 'Unable to preview media due to an unknown error.' ), array( 'type' => 'error', 'additional_classes' => array( 'notice-alt' ), ) ); ?> <# } else if ( data.model && data.model.src ) { #> <?php wp_underscore_audio_template(); ?> <# } #> </script> <?php }