提醒:本文最后更新于 3845 天前,文中所描述的信息可能已发生改变,请仔细核实。
其实只是使用新的音乐播放器而已。。。无所谓什么新音乐。采用了wordpress内置短代码,采用纯js+html5模式,支持多种终端。爽!虽说界面不是很好看,简单了点,但也还好。
早在之前我就提到了Wordpress的playlist短代码。效果见下方。
此函数的致命伤就是不能使用外部文件地址,必须是上传到媒体库的附件。
其实这样也是方便管理。只是可能会少许不爽。
目前是有解决方法了。不过仍需测试,而且是非官方性质。
使用方式很简单,举个例子,如果文章有音乐【playlist】。没有音乐,但是你已经有播放列表了:【playlist id=123】。123就是那个playlist的id,或者直接定义选择那几首音乐:【playlist ids=987,456】。
Wordpress Playlist Shortcode参数详解,可能翻译得不大好(纯本人手打翻译),但我相信还是可以理解的。不要丢鸡蛋,欢迎指正。
$attr(数组,强制请求):函数默认参数。(原文:(Required) Array of default playlist attributes.)
$type(文本):显示类型,可选audio和video(即音频、视频),默认audio。(原文:Type of playlist to display. Accepts 'audio' or 'video'. Default 'audio'.)
$order(文本):升降序排序方式,可选ASC、DESC和RAND(即升序、降序、随机)。默认ASC。(原文:Designates ascending or descending order of items in the playlist. Accepts 'ASC', 'DESC', or 'RAND'. Default 'ASC'.)
$orderby(文本):排序方式依据,如果$ids存在,则默认排序依据$ids取post的post__in(即文章附件顺序)为根据排序。不存在则以menu_order ID为默认排序依据。(原文:Any column, or columns, to sort the playlist. If $ids are passed, this defaults to the order of the $ids array ('post__in'). Otherwise default is 'menu_order ID'.)
$id(数字):如果$ids没有被定义。这个参数将会决定哪些附件(ID归属的附件)将会被使用。默认为当前文章ID。(原文:If an explicit $ids array is not present, this parameter will determine which attachments are used for the playlist. Default is the current post ID. Default empty.)
$ids(数组):创建一个新的playlist列表(新的ID,不与其他附件ID冲突),如果为空,将列出指定$id的所有附件,通常为附属于该文章所有附件。默认为空。(原文:Create a playlist out of these explicit attachment IDs. If empty, a playlist will be created from all $type attachments of $id. Default empty.)
$exclude(数组):不显示的附件ID。默认为空。(原文:List of specific attachment IDs to exclude from the playlist. Default empty.)
$style(文本):皮肤选择。可选light和dark(即白色、黑色)。默认light。(原文:Playlist style to use. Accepts 'light' or 'dark'. Default 'light'.)
$tracklist(布尔值):是否显示列表。默认为true。(原文:Whether to show or hide the playlist. Default true.)
$tracknumbers(布尔值):是否显示音轨。默认为true。(原文:Whether to show or hide the numbers next to entries in the playlist. Default true.)
$images(布尔值):是否显示缩略图(未来支持文章缩略图)。默认为true。(原文:Show or hide the video or audio thumbnail (Featured Image/post thumbnail). Default true.)
$artists(布尔值):是否显示艺术家名字。默认为true。(原文:Whether to show or hide artist name in the playlist. Default true.)
最后,中秋快乐!
转载请注明转自:kn007的个人博客的《新音乐,新青年》
这个没错误了,看起来就爽了。
@小可: 全部都没错误了,wordpress4.0改了template_redirect,我有空还要想办法解决一下
@kn007: 看看有没有问题
@小可: ok
好高端的样子,一直不知道wordpress 内置播放器的使用方法~~~涨姿势了~
@夜枫: 嘿嘿。wordpress有audio和playlist
@kn007: 音乐封面呢,上哪去获取
@CrazyM: 封面可以在后台定义,我没有定义。
看上去不错的样子,呵呵。。内置啊?
@郑永: 是的,内置的。
基本没用过音乐格式
@小怪物: 我算是用得多了,准备一个个改。但是又闲麻烦,等有空闲再说。
还有准备完善函数成支持外联的
正是我所想要的,哈哈
@尽欢:
嘿嘿
音乐青年,有这个爱好,确实可以陶冶生活。
@赵强:
闲着无事听听而已
好喜欢这个内置的播放器;-)
@Loulin: 嗯嗯,css还是蛮简约的
关注博主很久了,欢迎回访下我的小小博客。谢谢!【期待你的回访】
@顾建伟: 已回
放在自己的空间那流量刷刷的~
@千寻: 我放又拍云呢。。。
@kn007: 土豪快包养我去你的服务器~~
@千寻:
等我完成修改,wp内置函数就可以支持外链了
来支持咯!
@惜乐wordpress: 欢迎