WP_Widget_Media_Audio::render_control_template_scripts()
Render form template scripts.
Метод класса: WP_Widget_Media_Audio{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$WP_Widget_Media_Audio = new WP_Widget_Media_Audio(); $WP_Widget_Media_Audio->render_control_template_scripts();
Список изменений
С версии 4.8.0 | Введена. |
Код WP_Widget_Media_Audio::render_control_template_scripts() WP Widget Media Audio::render control template scripts WP 6.1.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 ) { #> <div class="notice notice-error notice-alt notice-missing-attachment"> <p><?php echo $this->l10n['missing_attachment']; ?></p> </div> <# } 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> <# } else if ( data.model && data.model.src ) { #> <?php wp_underscore_audio_template(); ?> <# } #> </script> <?php }