Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/instructions/php.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ esc_attr__( 'String', 'ls-plugin' )
## File structure

- PHP includes go in `inc/`.
- Class files: `inc/class-ls-plugin-name.php`.
- Class files: `inc/class-name.php`, declaring `namespace LS_Plugin;` and a class named without an `LS_Plugin_` prefix (e.g. `inc/class-permalinks.php` declares `LS_Plugin\Permalinks`).
- Load includes from the main plugin file via `plugins_loaded`.
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Responsibilities:
- Load includes from `ls_plugin_init()` via `plugins_loaded`.
- Use WordPress coding standards (tabs for indentation in PHP).
- Do not add a PHP autoloader unless genuinely needed.
- Class files go in `inc/` — name them `class-ls-plugin-name.php`.
- Class files go in `inc/` — name them `class-name.php`, declare `namespace LS_Plugin;`, and name the class without an `LS_Plugin_` prefix (e.g. `inc/class-permalinks.php` declares `LS_Plugin\Permalinks`).

### Escaping output (required)

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added Carousel Slide block (`ls-plugin/carousel-slide`) as a child block with InnerBlocks support for core content blocks, vertical alignment controls, and full block supports (border, color, spacing).
- Added Swiper library (v12.0.3) bundled locally in the plugin assets folder for offline carousel functionality.
- Added server-side carousel asset management using render_block filter for reliable conditional loading of Swiper CSS, JS, and initialization scripts.
- Added a `lightspeed` SVG icon collection (`LS_Plugin\Icons`) using the WordPress 7.1 icon registration API (`wp_register_icon_collection()` / `wp_register_icon()`), auto-registering every SVG dropped into `assets/icons/lightspeed/` for use in the block editor and via `wp_get_icon()`.
- Added 93 icons to the `lightspeed` collection, sourced from [Phosphor Icons](https://phosphoricons.com/) (MIT licensed), covering navigation, search, contact, social, content/meta, media, tour/commerce, and site-chrome use cases.

### Changed
- Changed Back to Top implementation from a standalone custom block to a `core/button` variation.
Expand All @@ -38,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed the plugin bootstrap to load SCF JSON configuration, validation, and permalink management classes.
- Changed Search Filter block interactivity handling to use a dedicated view script module with debounced query updates and Query Loop integration hooks.
- Changed Taxonomy Filter block interactivity handling to use dedicated view script module with client-side navigation and per-instance state management for expand/collapse controls.
- Changed all `inc/` classes to be namespaced under `LS_Plugin\`, dropping the `LS_Plugin_` prefix from class names (e.g. `LS_Plugin_Carousel` → `LS_Plugin\Carousel`), and renamed the corresponding files to match (e.g. `class-ls-plugin-icons.php` → `class-icons.php`).

### Deprecated

Expand Down
29 changes: 29 additions & 0 deletions assets/icons/lightspeed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# LightSpeed Icon Collection

SVG source files for the `lightspeed` WordPress 7.1 icon collection, registered by
[`inc/class-icons.php`](../../../inc/class-icons.php) (`LS_Plugin\Icons`). Every `.svg`
file in this directory is auto-registered on `init` as `lightspeed/{filename}`, so
adding, renaming, or removing a file here changes what's available in the block
editor's icon picker and to `wp_get_icon( 'lightspeed/{name}' )` — no PHP changes needed.

## Source

Icons are drawn from [Phosphor Icons](https://phosphoricons.com/)
([github.com/phosphor-icons/core](https://github.com/phosphor-icons/core)), MIT licensed,
copyright (c) Phosphor Icons.

Each file has been reduced to a single `<svg viewBox="0 0 256 256"><path fill="currentColor" d="..."/></svg>`
— the `regular` (or `fill`, for `star-fill.svg`) weight, with `fill="currentColor"` moved
from the `<svg>` root onto the `<path>`. This matches the WordPress 7.1 icon sanitizer,
which only allows `fill` on `<path>`/`<polygon>` elements, not on `<svg>` — putting it on
the outer element would otherwise be stripped, leaving the icon defaulting to solid black
instead of following the surrounding text color.

## Adding more icons

1. Pick an icon from [phosphoricons.com](https://phosphoricons.com/), preferably the
`regular` weight — Phosphor's fill-based paths pass the WordPress sanitizer cleanly,
unlike stroke-based icon sets.
2. Save it here as `{icon-name}.svg`, with `fill="currentColor"` on the `<path>`
(not the `<svg>` root).
3. That's it — `LS_Plugin\Icons` picks it up automatically on the next request.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/accommodation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/audio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/booking-validity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/bookmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/cart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/category.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/check-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/check-in.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/check-out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/chevron-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/chevron-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/chevron-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/chevron-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/comments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/lightspeed/cookie.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/copy.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/credit-card.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/departs-from.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/destination.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/download.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/duration.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/email.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/ends-in.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/external-link.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/eye.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/facebook.svg
1 change: 1 addition & 0 deletions assets/icons/lightspeed/filter.svg
Loading