=== DEL Embed for Bandcamp ===
Contributors: davidlilja
Tags: bandcamp, music, embed, player, shortcode
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display your Bandcamp releases on WordPress with embedded players and customizable layouts.

== Description ==

DEL Embed for Bandcamp lets you embed Bandcamp players on your WordPress site. Add your releases by URL, choose a display mode, and use the `[bcwp_bandcamp]` shortcode to show them anywhere.

**Features:**

* 8 display modes: big player, small artwork, slim bars, artwork only, cover grids
* Slider: scrolling marquee of album covers with configurable speed, direction, and visible count
* Slideshow: cycling album covers with fade, flip, slide, and blink transitions
* Drag-and-drop reorder in admin
* Theme and link color presets matching Bandcamp's options
* Per-release shortcodes for embedding individual releases
* Gutenberg block support
* Responsive grid layouts with configurable columns
* Live preview in admin for all display modes

**Shortcode usage:**

* `[bcwp_bandcamp]` — Display all configured releases
* `[bcwp_bandcamp url="https://artist.bandcamp.com/album/..."]` — Display a single release
* `[bcwp_slider]` — Display a scrolling slider of album covers
* `[bcwp_slideshow]` — Display a slideshow cycling through album covers

== Installation ==

1. Upload the `del-embed-for-bandcamp` folder to `/wp-content/plugins/`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **DEL Embed** in the admin menu to add releases and configure display settings.
4. Use the `[bcwp_bandcamp]` shortcode or the Gutenberg block to embed your releases.

== Frequently Asked Questions ==

= How do I add a release? =

Go to the DEL Embed settings page in your WordPress admin and paste a Bandcamp album or track URL.

= Can I embed a single release? =

Yes, use `[bcwp_bandcamp url="https://artist.bandcamp.com/album/your-album"]` to embed just one release.

= What display modes are available? =

Player (big artwork), Player (small artwork), Slim (with artwork), Slim (no artwork), Artwork only (embed), Cover only, Cover + title, and Cover + artist + title.

== Screenshots ==

1. Releases page — add releases by URL or import all from an artist profile. Drag to reorder, copy per-release shortcodes.
2. Display settings — choose display mode, columns, theme and link color with a live preview.
3. Help page — shortcode reference with attribute examples.

== External services ==

This plugin connects to Bandcamp (bandcamp.com) to retrieve release metadata and embedded players.

= Bandcamp oEmbed API =

* **What it does:** Fetches release metadata (title, artist, cover art, embed code) from Bandcamp.
* **When data is sent:** Each time a release is added in the admin, or when a cached release expires (cached for 24 hours). The release's Bandcamp URL is sent to the API.
* **API endpoint:** `https://bandcamp.com/api/oembed`
* **Service provider:** Bandcamp, Inc.
* [Bandcamp Terms of Use](https://bandcamp.com/terms_of_use)
* [Bandcamp Privacy Policy](https://bandcamp.com/privacy)

= Bandcamp page fetch =

* **What it does:** When the oEmbed API does not return sufficient data, the plugin fetches the public Bandcamp release page directly to extract cover art, embed URLs, and metadata from HTML meta tags.
* **When data is sent:** Only as a fallback when oEmbed data is incomplete. The release's Bandcamp URL is requested via a standard HTTP GET.
* **Data sent:** The Bandcamp release URL and a generic user-agent string.
* [Bandcamp Terms of Use](https://bandcamp.com/terms_of_use)
* [Bandcamp Privacy Policy](https://bandcamp.com/privacy)

= Bandcamp embedded player =

* **What it does:** Displays an embedded Bandcamp player (iframe) on the front end of your site. When a visitor loads the page, their browser connects directly to Bandcamp to load the player.
* **When data is sent:** Each time a visitor views a page containing a Bandcamp embed. The visitor's browser sends a request to Bandcamp's servers.
* [Bandcamp Terms of Use](https://bandcamp.com/terms_of_use)
* [Bandcamp Privacy Policy](https://bandcamp.com/privacy)

== Screenshots ==

1. Releases management with drag-and-drop reordering.
2. Display settings with live preview.
3. Slider and slideshow configuration.

== Changelog ==

= 1.7.1 =
* Fix: Removed the experimental share-trap overlay introduced in 1.7.0 — it caused leftover styling issues. Bandcamp's built-in share dialog is left as-is.

= 1.7.0 =
* Fix: Import all releases now works for Bandcamp label pages (previously only worked for artist pages). The importer tries the root URL first, then falls back to /music, and detects releases linked to other bandcamp.com subdomains.

= 1.6.5 =
* New: Slider — scrolling marquee of album covers with configurable speed, direction, visible count, and cover size. Shortcode: `[bcwp_slider]`.
* New: Slideshow — cycling album covers with fade, flip, slide, and blink transitions. Shortcode: `[bcwp_slideshow]`.
* New: Live preview in admin for slider and slideshow — updates instantly when changing settings.
* New: Select releases for slider/slideshow from a visual pool with click-to-add and drag-to-reorder.

= 1.5.4 =
* Fixed admin CSS not loading on Display and Help pages after menu rename.
* Restored `[bandcamp]` shortcode alias for backward compatibility.
* Renamed admin menu from "DEL Embed" to "DEL Bandcamp".
* Added screenshots and plugin directory assets.

= 1.5.3 =
* All shortcode and block output is now escaped via wp_kses with a strict allowlist.
* Added esc_attr escaping on all inline style attributes.

= 1.5.2 =
* Renamed main plugin file to match plugin slug (del-embed-for-bandcamp.php).
* Prefixed shortcode to `[bcwp_bandcamp]`.
* Added external services documentation for Bandcamp API usage.

= 1.5.1 =
* Renamed plugin to "DEL Embed for Bandcamp".
* Replaced inline scripts with properly enqueued JS files.
* Replaced inline SVG styles with direct attributes.
* Fixed contributor username.

= 1.5.0 =
* New: Split admin into three pages — Releases, Display, and Help.
* New: Import all releases from a Bandcamp artist/label profile page.
* New: Inline duplicate detection with per-release add/skip choices.
* New: Shared header with PayPal donate button and about text.
* New: Help page with full shortcode reference and display mode documentation.
* Fix: Shortcode display under release cards now shows correctly when added dynamically.
* Improved: Duplicate warnings shown as styled red notice boxes instead of browser dialogs.

= 1.0.1 =
* Fix player embeds after Bandcamp oEmbed API change.
* Construct embed URLs from page data when oEmbed is unavailable.
* Fix admin preview not showing player embeds.

= 1.0.0 =
* Initial release.
* 8 display modes for Bandcamp embeds.
* Drag-and-drop release management.
* Per-release shortcodes.
* Theme and link color presets.
* Gutenberg block support.

== Upgrade Notice ==

= 1.5.0 =
New multi-page admin, bulk profile import, and improved duplicate handling.

= 1.0.1 =
Fixes player embeds and admin preview after Bandcamp API changes.

= 1.0.0 =
Initial release.
