=== Plectrum ===
Contributors: creativecortexuk
Donate link: https://digitalarena.co.uk/
Tags: chords, ukulele, lyrics, music, transpose
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Render chord-marked lyrics with ukulele-friendly annotations, browser-generated chord diagrams, transpose controls, and print-focused output.

== Description ==

Plectrum parses square-bracket chord notation inside song lyrics and renders the chord directly above the following lyric segment.

Features include:

* Shortcode rendering for chord-marked content
* Optional automatic processing for selected public post types
* Browser-generated SVG ukulele chord diagrams for `gCEA`
* Per-song transpose, size, diagram visibility, and print controls
* Focused print output with optional footer notice
* Multiple song instances per page without shared control state
* Extensible hooks for rendering, aliases, settings, and lifecycle events

Example authoring format:

`There [Am]once was a ship that put to sea`

Shortcode usage:

`[ukulele_chords]There [Am]once was a ship that put to sea[/ukulele_chords]`

Supported shortcode attributes:

* `controls="true|false"`
* `diagrams="true|false"`
* `transpose="0"`
* `print_button="true|false"`
* `print_diagrams="true|false"`
* `tuning="gCEA"`
* `enharmonic_preference="auto|preserve-source|sharps|flats"`

Literal square brackets can be escaped using doubled brackets such as `[[Am]]`.

== Installation ==

1. Upload the plugin zip through `Plugins > Add New > Upload Plugin`, or copy the plugin folder into `/wp-content/plugins/`.
2. Activate `Plectrum` through the WordPress plugins screen.
3. Visit `Settings > Plectrum` to configure automatic processing, diagram defaults, print settings, and uninstall behavior.
4. Add `[ukulele_chords]...[/ukulele_chords]` to song content, or enable automatic processing for your chosen post types.

== Frequently Asked Questions ==

= Does Plectrum change the stored post content? =

No. Rendering and transposition happen at display time only.

= What happens if a chord is unknown? =

The chord name still renders above the lyric segment, but no diagram is shown.

= Can I use Plectrum without automatic processing? =

Yes. The shortcode is fully supported on its own.

= Does it support multiple songs on the same page? =

Yes. Each rendered song instance manages its own controls, transpose state, diagram visibility, and print targeting.

== Screenshots ==

1. Annotated chord-and-lyric output with controls
2. Settings screen for defaults and automatic processing
3. Print-focused song output

== Changelog ==

= 1.1 =

* Sanitize filtered controls, chord names, and SVG diagrams immediately before output
* Refresh diagrams and voicing metadata together with transposed chord labels
* Use movable voicings when the transposed chord has no exact library entry
* Use WordPress.org automatic translation loading

= 1.0 =

* Add the Eb chord diagram with separate fingers and a D# alias
* Add a settings-page guide to chord markup with a copyable Greensleeves example
* Include the software disclaimer and DigitalArena plugin links

= 0.1.11 =

* Update plugin and author links to the author plugins page
* Display the software warranty and liability disclaimer on the settings page

= 0.1.10 =

* Use the canonical plectrum plugin folder to match the translation domain
* Add plugin license and bundled language directory headers; remove the hidden language placeholder
* Register bundled translations on init and prefix the uninstall settings variable
* Record successful site-owner testing on WordPress 7.1.3

= 0.1.9 =

* Standardize JavaScript and documentation formatting and tidy variable declarations
* Modernize screen-reader clipping and print break properties while preserving focused song printing

= 0.1.8 =

* Prime front-end assets earlier in the request so plugin CSS and JavaScript load before rendered song markup appears

= 0.1.3 =

* Fix initial front-end diagram rendering so browser-generated SVG diagrams receive their configuration before first paint

= 0.1.2 =

* Ensure browser-rendered chord diagrams replace the server placeholder output after page load

= 0.1.1 =

* Tightened the default chord diagram size for inline readability
* Added visible string and fret labels to rendered chord diagrams

= 0.1.0 =

* Initial testing release
* Chord parsing with escaped bracket support
* Ukulele chord diagrams rendered in the browser
* Per-instance transpose, size, diagram visibility, and print controls
* Automatic processing settings for selected post types
* Enharmonic preference support and print footer placeholders
* Developer hooks, regression tests, and shared QA validation

== Upgrade Notice ==

= 1.1 =

Improves output safety and keeps chord diagrams synchronized with key changes. Upload as a replacement for the existing plectrum installation.

= 1.0 =

Adds chord-markup instructions and a Greensleeves example above the settings-page disclaimer. Installations still using the old structure must follow the one-time folder migration in Installation.

= 0.1.11 =

Adds the settings-page disclaimer and updates plugin and author links. If upgrading follow the one-time folder migration in Installation.

= 0.1.10 =

Requires a one-time folder migration to plectrum. Deactivate, rename the folder without uninstalling, upload this ZIP as a replacement, then reactivate. See Installation for details.

= 0.1.9 =

Quality-control cleanup, modernized accessibility and print styles, and refreshed asset versions.

= 0.1.8 =

Loads the plugin’s front-end CSS and JavaScript early enough for the intended interactive chord layout and browser-rendered diagrams to appear correctly.

= 0.1.3 =

Fixes the front-end configuration timing so the intended SVG chord diagrams render on initial page load.

= 0.1.2 =

Fixes the front-end diagram handoff so the latest compact SVG diagrams reliably render on loaded pages.

= 0.1.1 =

Refines the default chord diagram presentation for more practical inline song-sheet rendering.

= 0.1.0 =

Initial testing release of Plectrum.
