kn007的个人博客
♥ You are here: Home > 软件与网络 > Wordpress > 新音乐,新青年

新音乐,新青年

by | 28 Comments

提醒:本文最后更新于 3511 天前,文中所描述的信息可能已发生改变,请仔细核实。

其实只是使用新的音乐播放器而已。。。无所谓什么新音乐。采用了wordpress内置短代码,采用纯js+html5模式,支持多种终端。爽!虽说界面不是很好看,简单了点,但也还好。
09fa513d269759eed9501b3cb3fb43166c22dfc1
早在之前我就提到了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的个人博客的《新音乐,新青年

donate
有所帮助?

Comments

28 Comments立即评论
  1. LV3回复

    我是沖技術來的 雖然現在不折騰了

    1. MOD回复

      @沫: 没事就了解下新变化呗

icon_wink.gificon_neutral.gificon_mad.gificon_twisted.gificon_smile.gificon_eek.gificon_sad.gificon_rolleyes.gificon_razz.gificon_redface.gificon_surprised.gificon_mrgreen.gificon_lol.gificon_idea.gificon_biggrin.gificon_evil.gificon_cry.gificon_cool.gificon_arrow.gificon_confused.gificon_question.gificon_exclaim.gif