=== SwiftBlock Elements ===
Contributors: johirrihan
Tags: block, gutenberg, testimonial, faq, pricing
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.2.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Professional Gutenberg blocks for testimonials, pricing tables, and FAQ sections. Responsive, accessible, and translation-ready.

== Description ==

SwiftBlock Elements adds polished, production-ready blocks to the WordPress block editor. Each block is server-rendered with sanitized attributes and escaped output, following WordPress Coding Standards and Block API version 3.

Perfect for agency sites, landing pages, and business websites that need testimonial showcases, pricing tables, and FAQ sections without bloated page builders.

= Included Blocks =

* **Testimonial Block** — Single quote card with author image, name, role, and customizable colors.
* **Testimonials Section** — Badge, heading, and auto-scrolling testimonial slider inside a contained card.
* **Testimonials Bento** — Bento-grid layout with metrics, client logos, and mixed card sizes.
* **Testimonials Slider** — Split layout with manual slider controls and pagination.
* **Pricing Section** — Three-column pricing cards with a featured plan highlight.
* **FAQ Section** — Two-column glass-style accordion with gradient background.
* **FAQ Studio** — Luxury FAQ layout with image sidebar, navigation links, and plus/minus accordion.

= Key Features =

* Dynamic blocks with server-side render.php templates (no saved HTML in the database).
* Shared design tokens for consistent colors, spacing, and typography across blocks.
* Per-block responsive controls for Desktop, Tablet, and Phone in the editor sidebar.
* Full-width section backgrounds with contained content areas.
* Block anchor IDs and top/bottom margin spacing via native block supports.
* Translation-ready with the swiftblock-elements text domain.
* Front-end JavaScript loads only when needed (sliders and FAQ accordions).

= Development =

Human-readable source files are included in the src/ directory. Compiled assets in build/ are generated with @wordpress/scripts.

* **Source repository:** [GitHub](https://github.com/rihansoftvance-crypto/SwiftBlock-Elements)
* **Build:** Run `npm install` then `npm run build` (requires Node.js 18+).

== Installation ==

1. Install the plugin through **Plugins → Add New** in WordPress admin, or upload the `swiftblock-elements` folder to `/wp-content/plugins/`.
2. Activate the plugin on the **Plugins** screen.
3. Open the block editor on any page or post.
4. Click the block inserter (+) and search for **SwiftBlock**, **Testimonial**, **FAQ**, or **Pricing**.
5. Customize colors, typography, and spacing from the block sidebar.

== Frequently Asked Questions ==

= Does this plugin require the block editor? =

Yes. SwiftBlock Elements requires WordPress 6.8 or later with the Gutenberg block editor.

= Are block attributes sanitized? =

Yes. All user-provided content is sanitized on the server before output. Plain text uses `sanitize_text_field`, rich text uses `wp_kses_post`, URLs use `esc_url_raw`, and colors use `sanitize_hex_color`.

= Is the plugin translation-ready? =

Yes. User-facing strings use the `swiftblock-elements` text domain. WordPress.org loads translations automatically.

= Do all blocks load JavaScript on the front end? =

No. Static blocks such as Testimonial and Pricing render entirely in PHP. Interactive blocks (FAQ accordions and testimonial sliders) enqueue minimal view scripts only when the block is present on the page.

= Can I use full-width backgrounds? =

Yes. Section blocks support **Full Width Background** in the Layout panel and **Align → Full width** in the block toolbar.

= Does this plugin use external services? =

Yes. Optional Google Fonts are loaded when you choose a Google Font in block settings. See the External Services section below for details.

== External Services ==

This plugin connects to **Google Fonts** (provided by Google LLC) for optional typography in blocks.

= What it is used for =

* In the block editor, the font family control loads a list of Google Font family names so authors can choose a font for a block.
* On the front end, when a block uses a Google Font (not a system font), the plugin loads the font stylesheet so visitors see the selected typography.

= What data is sent and when =

* **Editor:** When an author opens a block sidebar font control, the editor requests `https://fonts.google.com/metadata/fonts` to load the public Google Fonts catalog. No personal user data is sent.
* **Front end:** When a page containing a block with a Google Font is viewed, the visitor's browser requests `https://fonts.googleapis.com/css2` for the selected font family. Google may receive the visitor's IP address and browser information as with any third-party stylesheet request. This only happens when a block is configured to use a Google Font.

= Terms and privacy =

* Google Fonts terms of service: https://developers.google.com/fonts/terms
* Google privacy policy: https://policies.google.com/privacy

== Screenshots ==

1. Testimonial block with author image, quote, and customizable colors in the block editor.
2. Testimonials Section with badge, heading, and auto-scrolling slider layout.
3. Pricing Section with three-column cards and featured plan highlight.
4. FAQ Section with two-column glass-style accordion layout.
5. Per-block responsive controls for Desktop, Tablet, and Phone in the editor sidebar.

== Changelog ==

= 0.2.9 =
* Replaced minified edit bundles with human-readable edit.js source for all blocks.
* Added missing shared editor-styles.js and testimonial-block edit.js.
* Updated build pipeline so npm run build compiles from readable source in src/.

= 0.2.8 =
* Fixed block registration path so blocks load correctly after plugin bootstrap split.
* Replaced remaining demo text with generic placeholders.
* Aligned block.json versions with plugin version 0.2.8.

= 0.2.2 =
* Replaced third-party brand names in block demo defaults with generic placeholder text.
* Aligned all block.json versions with the plugin version.
* Clarified source and build documentation.

= 0.2.1 =
* Fixed output escaping across all block render templates.
* Added testimonial and bento card attribute sanitization.
* Removed manual text domain loading for WordPress.org compatibility.

= 0.2.0 =
* Added Pricing Section, FAQ Section, FAQ Studio, Testimonials Section, Bento, and Slider blocks.
* Introduced shared design tokens and responsive editor controls.
* Hardened sanitization and escaping across all render.php templates.
* Extended block supports: align wide/full, anchor, and section margin spacing.

= 0.1.0 =
* Initial release with the Testimonial block.

== Upgrade Notice ==

= 0.2.9 =
Adds human-readable JavaScript source for WordPress.org review compliance.

= 0.2.8 =
Critical fix: blocks now register from the correct build directory.

= 0.2.0 =
Major update with seven new blocks. Re-save pages after updating if styles do not appear immediately.
