=== LMDM-Picker for Blocksy Advanced Posts Block ===
Contributors: nicmare
Tags: Gutenberg, Blocks, Blocksy, Advanced Posts, LMDM
Requires at least: 6.9
Tested up to: 7.0
Stable tag: 1.4.10
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html 

Modifies the Advanced Posts block from Blocksy theme to allow selecting specific posts to be shown in the block.

== Description ==

By default the Advanced Posts Block from Blocksy theme returns couple of posts in a given order provided by the query loop logic (i.e. "date"). This plugin allows you to select and arrange specific posts manually.

It also adds a `LMDM Teaser` inserter entry. When selected, it inserts the original Blocksy `Advanced Posts` block with `Inherit From Customizer` already chosen.

=== Attention ===

You need to install the [Blocksy Theme](https://wordpress.org/themes/blocksy/) first. Without it, you can not use this plugin.

=== Plugin Features ===

✔  adds a new block panel "Block Settings" in `Advanced Posts` Block of Blocksy Theme
✔  the panel contains a range field for custom column count of the block (maximum are 6 columns)
✔  the column field inherits the default column count setting from customizer of the given post type
✔  the panel can filter out posts without a featured image
✔  the panel can hide individual Blocksy card layers like title, excerpt, featured image, post meta or read more
✔  the panel can override the visible text of the Blocksy "read more" layer per block
✔  the panel can override the initial and hover background/text colors of the Blocksy "read more" button when the read more layer uses the background button type
✔  the panel automatically maps the selected initial read more button colors to their matching hover colors until the hover colors are customized
✔  the panel opens automatically when custom block settings are active
✔  the panel contains a reset button for custom column count, image filtering, hidden card layers, read more text and read more button colors
✔  the panel contains a repeater field where each text field has the ability to search for desired posts
✔  the search field offers a results lists with highlighted search terms
✔  the search result items have a tooltip info containing the post-id and excerpt 
✔  the repeater field supports manual order of the posts by drag and drop mechanism
✔  sets a limit of the repeater field by using the `LIMIT` value of the block. Want to search for more posts? Increase the `LIMIT` value
✔  adds a `LMDM Teaser` inserter entry that creates an `Advanced Posts` block with `Inherit From Customizer` selected automatically

== Installation ==
1. Upload the plugin files to the `/wp-content/plugins/lmdm-picker-for-blocksy-advanced-posts-block` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress
3. Use the **Settings → LMDM Picker** screen to configure the plugin defaults
4. Use the plugin functions through the block `Advanced Posts` provided by Blocksy Theme
5. Insert `LMDM Teaser` when you want `Advanced Posts` to start with `Inherit From Customizer` selected automatically

== Frequently Asked Questions ==

= Does it create a new block? =

It registers a new inserter entry called `LMDM Teaser`, but it does not create a separate frontend block. Inserting `LMDM Teaser` creates the original Blocksy `Advanced Posts` block with the `Inherit From Customizer` layout already selected.

= What does the LMDM Teaser block do? =

It is a shortcut for the first setup option of the Blocksy `Advanced Posts` block. Instead of inserting `Advanced Posts` and then clicking `Inherit From Customizer`, you can insert `LMDM Teaser` and the plugin sets the block attribute `design` to `default` automatically.

= Can i still edit LMDM Teaser like a normal Advanced Posts block? =

Yes. After insertion it is the regular Blocksy `Advanced Posts` block, so all Blocksy settings and all picker settings from this plugin stay available.

= When are the read more button colors available? =

The Gutenberg color pickers appear only when the active Blocksy card layout contains a visible `read_more` layer and that layer's `button_type` is `background`. Theme palette colors are stored as Blocksy CSS variables like `var(--theme-palette-color-1)`, while custom colors are stored as the selected color value. When selecting `Button Background` or `Button Text Color`, the matching hover color is filled automatically as long as the hover value is empty or still matches the previous base value. The hover controls can still be changed independently afterwards. On render, the plugin writes the values to `--theme-button-background-initial-color`, `--theme-button-background-hover-color`, `--theme-button-text-initial-color` and `--theme-button-text-hover-color` on the `Advanced Posts` block wrapper.

= What are use cases for this plugin? =

Sometimes you simply need more control of the posts returned by the Advanced Posts block. This plugin gives you full control of it.

= Does it load any additional assets in the frontend? =

No, it just adds some CSS-classes for changing the column count of the posts grid

= What happens when i disable the plugin? =

You can easily disable and delete the plugin without any harmful effects. The Advanced Posts Block will return the posts in the former way.

= How to look for posts of custom post types? =

You need to change the `POST TYPE` value in the block settings first place.

= How to increase the default limit? =

You need to increase the value in the default `LIMIT` field of the block second place.

= Why can i not find a specific post? =

Be sure the post is published and the desired `POST TYPE` is selected in first place. Also keep in mind you can not add a post which is already picked and you can not pick a post inside of it's current post.

= Where to change the default column count? =

It's inherited from customizer settings. Change it there and it will reflect in plugin panel field. 

= The column count does not change =

The column count is just changing beyond 782px and above. Below that value it will inherit the values from customizer still.

= Who is the author of the plugin? =

The Wordpress-User "nicmare" vibe coded it. Means he had the idea of the plugin and uses AI to craft the code. 

== Screenshots ==

1. new block settings 
2. look for specific posts
3. change column count
4. plugin demonstration

== Changelog ==

= 1.4.10 =
* syncs `Button Background Hover` from `Button Background` while the hover value has not been customized
* syncs `Button Text Color Hover` from `Button Text Color` while the hover value has not been customized

= 1.4.9 =
* added `Button Background Hover` for `--theme-button-background-hover-color`
* added `Button Text Color Hover` for `--theme-button-text-hover-color`
* renders all read more button initial and hover colors on the Advanced Posts block

= 1.4.8 =
* renamed the read more button background control to `Button Background`
* added a `Button Text Color` control for the `read_more` background button
* renders the selected text color as `--theme-button-text-initial-color` on the Advanced Posts block

= 1.4.7 =
* added a Gutenberg color picker for the `read_more` background button color
* stores selected Blocksy theme palette colors as `var(--theme-palette-color-N)`
* renders the selected value as `--theme-button-background-initial-color` on the Advanced Posts block

= 1.4.6 =
* added a `LMDM Teaser` inserter entry for the Blocksy `Advanced Posts` block
* `LMDM Teaser` inserts `Advanced Posts` with `Inherit From Customizer` selected automatically
* documented the `LMDM Teaser` behavior in the description, feature list and FAQ

= 1.4.3 =
* added two new block options: exclude posts without images and make whole cards clickable
* added "hide card layer" toggles
* added read more text overwrite input

= 1.4.1 =
* added a "hide posts without image" setting for the Blocksy Advanced Posts block
* added per-block toggles to hide active Blocksy card layers
* added a per-block read more text override for the `read_more` layer
* added an automatic panel-open state when custom block settings are active
* added a reset button for custom column count, image filtering, hidden card layers and read more text

= 1.2 =
* updated plugin assets

= 1.1 =
* added plugin assets

= 1.0 =
* first release of the plugin
