Go Back to Parent Doc

Developer Reference

Bloqra is built on the standard WordPress block APIs — block.json metadata registration, native block supports, block styles, and transforms — so everything you already know about extending core blocks applies to Bloqra blocks too. This page covers the plugin-specific extension points.

Filters

bloqra_faq_schema

Adjust or disable the FAQPage JSON-LD generated by the FAQ block. Receives the schema array and the block; return a modified array, or an empty array to suppress output.

add_filter( 'bloqra_faq_schema', function ( $schema, $block ) {
    // Example: brand the schema with your organization.
    $schema['publisher'] = array(
        '@type' => 'Organization',
        'name'  => 'My Company',
    );
    return $schema;
}, 10, 2 );

bloqra_steps_howto_schema

Adjust the HowTo JSON-LD generated by the Steps block — for example to add totalTimesupply, or tool properties, which can’t be derived from the page content.

add_filter( 'bloqra_steps_howto_schema', function ( $schema, $block ) {
    $schema['totalTime'] = 'PT30M';
    $schema['supply']    = array(
        array( '@type' => 'HowToSupply', 'name' => 'Flour' ),
    );
    return $schema;
}, 10, 2 );

bloqra_toc_headings

Filter the headings collected by the Table of Contents block before the list is rendered — remove specific headings, rewrite titles, or add entries.

add_filter( 'bloqra_toc_headings', function ( $headings ) {
    // Example: drop headings marked with a class.
    return array_filter( $headings, function ( $h ) {
        return false === strpos( $h['content'], 'no-toc' );
    } );
} );

Registering custom block styles

Bloqra block styles are ordinary WordPress block styles, so you can add your own to any Bloqra block:

register_block_style( 'bloqra/pricing-table', array(
    'name'  => 'brand',
    'label' => __( 'Brand', 'my-theme' ),
) );

The style class (is-style-brand) lands on the block wrapper; style it from your theme’s stylesheet.

Transforms

Bloqra registers two-way transforms with core blocks (core/gallery ↔ Masonry/Filterable Gallery, core/table ↔ Comparison Table, core/group ↔ Advanced Container) and convert-style transforms (multi-selection → Slider, Testimonials → Testimonial Carousel). These use the standard Block Transforms API, so your own blocks.registerBlockType filters and transforms interoperate normally.

Structured data architecture

FAQ and Steps schema is generated server-side at render time (via render_block filters), not saved into post content. That means:

  • Schema always reflects the current content — editing a question updates the JSON-LD automatically.
  • Translations are applied at render, never frozen into saved markup.
  • The filters above run on every render, so conditional logic (per post type, per page) works naturally.

Performance architecture

  • Every block is registered from block.json with its own style and script handles; WordPress loads a block’s assets only on pages where the block appears.
  • View scripts are dependency-light and jQuery-free. Many blocks (Timeline, Steps, Comparison Table, Image Hotspots, Star Rating, QR Code, and more) ship no front-end JavaScript at all.
  • Front-end controls that require JavaScript (carousel arrows, copy buttons, dismiss buttons, sort buttons) are created by the view script at runtime — no-JS visitors get working native fallbacks instead of dead buttons.
  • Media-heavy blocks defer work: Lottie initializes near the viewport, Video Popup loads the video only on play, gallery pagination defers image bytes via native lazy-loading.

If you build on these patterns — or need an extension point that doesn’t exist yet — open a support ticket; we’re happy to add filters where they make sense.

Shopping Cart
  • Your cart is empty.