MrTux Music Collection

外掛說明

MrTux Music Collection is a complete WordPress plugin that lets administrators manage a collection of audio tracks through a dedicated control panel and expose them on the public site via a shortcode with a modern, responsive audio player. It is free and fully functional on its own — no purchase required.

Features:

  • Custom Post Type music_track with title, description, artist, album, cover image, and audio file upload via the native WordPress media uploader.
  • Custom admin list table with bulk actions (publish, draft, delete), single row actions, search and pagination.
  • Shortcode [music_tracks] with parameters: limit, orderby, order, artist, show_cover, show_share, layout.
  • Modern HTML5 audio player powered by Plyr with one-at-a-time playback (playing a new track automatically pauses the others).
  • Automatic duration detection: as soon as the audio file is selected in the editor, the browser computes the duration and persists it via AJAX.
  • Share buttons for WhatsApp and Instagram on every track (Web Share API + configurable Instagram profile fallback).
  • Track categories with hierarchy support and grouped display.
  • Clean, conditional asset loading: CSS/JS are enqueued only on pages where the shortcode is present.
  • Fully internationalized, .pot file included.
  • WPCS-compliant code, with nonces, capability checks and proper sanitization/escaping everywhere.

The Pro edition

For creators who need more, MrTux Music Collection Pro adds:

  • Continuous playlist player: a single global player with a visible queue that keeps playing the next track automatically.
  • Canvas waveform progress bar for every track, with click-to-seek.
  • One-click download buttons for every track.
  • Dedicated Pro settings page (autoplay, download defaults).

MrTux Music Collection Pro is a separate add-on, installed alongside this free plugin, available at https://wpforge.site/music-tracks-pro. This free version is complete on its own and does not require any purchase.

How to upgrade

  1. Visit https://wpforge.site/music-tracks-pro and download the Pro add-on.
  2. Upload it via Plugins > Add New > Upload Plugin.
  3. Keep both plugins active: the Pro features appear automatically (e.g. use [music_tracks layout="playlist"]).

Credits

Built on the audio player library Plyr by Sam Potts, MIT License, bundled locally in assets/vendor/plyr/.

螢幕擷圖

安裝方式

  1. Upload the music-tracks folder to /wp-content/plugins/, or upload the zip via Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to MrTux Music Collection > Add New to add your first track.
  4. Insert the shortcode [music_tracks] in any page or post.
  5. (Optional) Configure the Instagram profile fallback under MrTux Music Collection > Settings.

常見問題集

Which audio formats are supported?

The plugin accepts any format supported by the WordPress media library. Recommended for browser playback: MP3, WAV, OGG, M4A. FLAC works on modern browsers but may not play on iOS Safari.

Why doesn’t the Instagram button share the track directly?

Instagram does not allow sharing arbitrary URLs from the web. The button uses the native Web Share API when available (mostly mobile) and falls back to opening the Instagram profile configured under MrTux Music Collection > Settings.

How is the duration detected?

When you select an audio file in the editor, the browser loads its metadata and calculates the duration, then saves it to the database via AJAX.

Can I show only specific artists?

Yes. Use the artist parameter of the shortcode:
[music_tracks artist=”John Doe”]

Will this plugin slow down my site?

No. CSS and JS are loaded only on pages where the shortcode is present.

Do I need the Pro version?

No. This free version is complete and fully functional. MrTux Music Collection Pro is an optional separate add-on (playlist layout with continuous playback, waveforms and download buttons) available at https://wpforge.site/music-tracks-pro.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈MrTux Music Collection〉的開發相關工作。

參與者

將〈MrTux Music Collection〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.0.0

  • Initial release.