本文整理汇总了PHP中wp_underscore_audio_template函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_underscore_audio_template函数的具体用法?PHP wp_underscore_audio_template怎么用?PHP wp_underscore_audio_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_underscore_audio_template函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wp_print_media_templates
//.........这里部分代码省略.........
<div class="setting link-target">
<label><input type="checkbox" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>><?php _e( 'Open link in a new window/tab' ); ?></label>
</div>
<label class="setting link-rel">
<span><?php _e('Link Rel'); ?></span>
<input type="text" data-setting="linkRel" value="{{ data.model.linkClassName }}" />
</label>
<label class="setting link-class-name">
<span><?php _e('Link CSS Class'); ?></span>
<input type="text" data-setting="linkClassName" value="{{ data.model.linkClassName }}" />
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</script>
<script type="text/html" id="tmpl-image-editor">
<div id="media-head-{{ data.id }}"></div>
<div id="image-editor-{{ data.id }}"></div>
</script>
<script type="text/html" id="tmpl-audio-details">
<# var ext, html5types = {
mp3: wp.media.view.settings.embedMimes.mp3,
ogg: wp.media.view.settings.embedMimes.ogg
}; #>
<?php $audio_types = wp_get_audio_extensions(); ?>
<div class="media-embed media-embed-details">
<div class="embed-media-settings embed-audio-settings">
<?php wp_underscore_audio_template() ?>
<# if ( ! _.isEmpty( data.model.src ) ) {
ext = data.model.src.split('.').pop();
if ( html5types[ ext ] ) {
delete html5types[ ext ];
}
#>
<label class="setting">
<span>SRC</span>
<input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
<a class="remove-setting"><?php _e( 'Remove' ); ?></a>
</label>
<# } #>
<?php
foreach ( $audio_types as $type ):
?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) {
if ( ! _.isUndefined( html5types.<?php echo $type ?> ) ) {
delete html5types.<?php echo $type ?>;
}
#>
<label class="setting">
<span><?php echo strtoupper( $type ) ?></span>
<input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" />
<a class="remove-setting"><?php _e( 'Remove' ); ?></a>
</label>
<# } #>
<?php endforeach ?>
<# if ( ! _.isEmpty( html5types ) ) { #>
<div class="setting">
<span><?php _e( 'Add alternate sources for maximum HTML5 playback:' ) ?></span>
开发者ID:ShankarVellal,项目名称:WordPress,代码行数:67,代码来源:media-template.php
示例2: wp_print_media_templates
//.........这里部分代码省略.........
</label>
<label class="setting link-class-name">
<span><?php
_e('Link CSS Class');
?>
</span>
<input type="text" data-setting="linkClassName" value="{{ data.model.linkClassName }}" />
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</script>
<script type="text/html" id="tmpl-image-editor">
<div id="media-head-{{ data.id }}"></div>
<div id="image-editor-{{ data.id }}"></div>
</script>
<script type="text/html" id="tmpl-audio-details">
<# var ext, html5types = {
mp3: wp.media.view.settings.embedMimes.mp3,
ogg: wp.media.view.settings.embedMimes.ogg
}; #>
<?php
$audio_types = wp_get_audio_extensions();
?>
<div class="media-embed media-embed-details">
<div class="embed-media-settings embed-audio-settings">
<?php
wp_underscore_audio_template();
?>
<# if ( ! _.isEmpty( data.model.src ) ) {
ext = data.model.src.split('.').pop();
if ( html5types[ ext ] ) {
delete html5types[ ext ];
}
#>
<label class="setting">
<span>SRC</span>
<input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
<a class="remove-setting"><?php
_e('Remove');
?>
</a>
</label>
<# } #>
<?php
foreach ($audio_types as $type) {
?>
<# if ( ! _.isEmpty( data.model.<?php
echo $type;
?>
) ) {
if ( ! _.isUndefined( html5types.<?php
echo $type;
?>
) ) {
delete html5types.<?php
echo $type;
?>
;
开发者ID:valiror,项目名称:sharingdais_demo1,代码行数:67,代码来源:media-template.php
注:本文中的wp_underscore_audio_template函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论