=== List MixCloud ===
Contributors: Shmuel83
Tags: mixcloud, music, list, widget, podcast
Requires at least: 5.6.0
Tested up to: 7.0
Requires PHP: 5.6
Stable tag: 2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

List MixCloud to show last or all podcast from MixCloud.

== Description ==

This plugin allowed to add MixCloud player.
MixCloud is a online music streaming service that allows for the listening and distribution of radio shows, DJ mixes and podcasts, which are crowdsourced by its registered users.

If you want to view podcasts from your user account or another, this plugin is for you.
This plugin needs no data except the name of the user for whom you want to view the podcasts : https://www.mixcloud.com/useraccount/
No need for login, password or API code
If you want show your account, you must create an account on [https://www.mixcloud.com](https://www.mixcloud.com), that's free.

= ShortCode =
`[listmixcloud channel='EgliseEvangéliqueDeTOURS' widget='mini' playlist='1' mode='1' autoplay='1' style='Light' width='100%' hide_artwork='0'][/listmixcloud]`

None of attributes are required.

* Channel => Name of Channel that you want show : https://www.mixcloud.com/Channel/ | EgliseEvangéliqueDeTOURS
* widget => Type of MixCloud widget mini\classic\picture  | mini
* playlist => Show title list of audio instead of list of players. Show only one player
* mode => Number of podcast to show. 0 to infinite, 1,2,... | 0=infinite
* autoplay => Play automaticaly : 1 to auto, nothing or other to | 0=no play
* Style => Style of MixCloud Widget : Light\Black | Light
* width => Width in Pixel or % of widget. For Type "Picture" widget, that's height&width  | 100%
* hide_artwork => Configure show of Artwork :0=show, 1=hide | 0=show

Modify height of "mini" & "classic" is not implemented in this plugin, but if you have need that, ask me.

= Widget =
In your Widget Tab, add List Mixcloud Widget and modify and save form under this widget.

That's not official MixCloud plugin

= Cache =
Since 1.5, API responses are cached for 1 hour using WordPress transients (no external dependency).
You can change the duration with the `list_mixcloud_cache_ttl` filter:

`add_filter( 'list_mixcloud_cache_ttl', function() { return 1800; } ); // 30 minutes`

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/list-mixcloud` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress
1. Use the shortcode or add the widget from Appearance > Widgets or with Gutenberg Editor block add this widget.

Compatible with DIVI

== Screenshots ==

1. Add last podcast with ShortCode
2. Add all list of podcasts with Widget
3. Example to show plugin
4. Playlist option
5. Add List Mixcloud with Gutenberg block

== Changelog ==

= 2.0 =
* Code: plugin restructured into separate files (includes/) per WordPress coding standards.
* Code: passes WordPress Plugin Check and PHPStan with zero errors.
* Tested up to WordPress 7.0.


= 1.5 =
* New: Native Gutenberg block — the MixCloud Player now appears in the block inserter when editing pages and posts. Configure everything (channel, widget type, number of episodes, playlist mode, theme…) from the block sidebar. Live server-side preview in the editor.
* Full backward compatibility: shortcode [listmixcloud] and legacy WP_Widget are unchanged.
* Security fix: resolved CVE-2025-28930 — all shortcode attributes and API data are now properly escaped before output (esc_attr, esc_html, esc_url).
* Performance: Mixcloud API responses are now cached using WordPress transients (1 hour by default, filterable via `list_mixcloud_cache_ttl`).
* Bugfix: comparison operator was mistakenly an assignment (`= 200` → `=== 200`) causing the episode count to never load correctly in mode 0.
* Code quality: functions, hooks and handles renamed with `list_mixcloud_` prefix; original names kept as aliases for full backward compatibility.
* Improved script/style versioning (uses plugin version constant instead of no version).
* Updated "Tested up to" to WordPress 6.7.

= 1.4 =
* Debug Widget

= 1.3 =
* Debug player with DIVI

= 1.2 =
* Show error if mixcloud server or internet connection is down.
* Debug when user not choice option : "Show only one widget and playlist". Just 1 widget was show.
* If you want help to translate in your language, that's now possible. Thank you for your help.
* For wordpress widget, help with autocompletion to add your channel and show number of playlist found.
* Improvement Playlist when user select an other audio (In 1.1 version, a popup was show when user choice an other audio)

= 1.1.0 =
* Debug javascript

= 1.1 =
* Added an playlist attribut "playlist" in shortcode and widget. If is used, this plugin show list of audio instead of list of mixcloud widget. Show only one widget.
* Debug an error with old PHP version.
