Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

Hooks & Extension Points

Extend and customize Jalpi Page Builder functionality, settings defaults, dynamic tags, WooCommerce queries, and global styles without modifying core plugin files.

Jalpi Core Developer 18 Filters Β· 2 Actions
6 min read Β· November 2026

Overview#

Jalpi Page Builder is architected around clean WordPress extension principles. The editor and the frontend renderer are completely decoupled: a React single-page application in wp-admin produces a JSON node tree, while an optimized PHP renderer turns that tree into semantic HTML on the frontend.

To let third-party plugins and theme developers customize this pipeline safely, Jalpi exposes a suite of verified WordPress actions and filters. By hooking into these extension points from a custom plugin or child theme's functions.php, you can:

  • Register custom dynamic tags to pull bespoke post, user, or CRM fields into editor widgets.
  • Override default settings (container width, breakpoints, primary colors) across new installations.
  • Add custom fonts (Google Fonts, Typekit, or self-hosted files) to the visual font picker.
  • Customize WooCommerce product query arguments and category terms.
  • React to global class additions, updates, and deletions to invalidate external caching layers (Varnish, Redis, Cloudflare).

Actions#

Actions allow developers to execute custom code at specific lifecycle moments in Jalpi Page Builder.

HookTypeWhen It RunsArgumentsPurpose
jalpi_class_savedActionAfter a global class is created or updatedarray $cleanPurge CSS caches, notify CDNs, or log class updates
jalpi_class_deletedActionAfter a global class row is deletedstring $class_keyClean up associated cached stylesheets and metadata

Filters#

Filters pass data through your custom functions, allowing you to modify defaults, sanitize inputs, or inject options before Jalpi processes them.

HookTypeInput ValueExpected ReturnPurpose
jalpi_settings_defaultsFilterarray $defaultsarrayCustomize default values for all 5 settings tabs & seeded Design System tokens.
jalpi_settings_tabsFilterarray $tabsarrayAdd, reorder, or modify tabs in the Jalpi Settings admin screen.
jalpi_selectable_post_typesFilterarray $post_typesarrayFilter which public post types are available for builder enablement.
jalpi_internal_editor_post_typesFilterarray $typesarrayAdmit internal custom post types (e.g. theme templates) to the canvas editor.
jalpi_design_system_capabilityFilterstring $capabilitystringCustomize WordPress capability required to modify site-wide Design Tokens (default manage_options).
jalpi_settings_font_optionsFilterarray $fontsarrayInject custom or self-hosted font families into typography pickers.
jalpi_valid_dynamic_tagsFilterarray $tagsarrayRegister custom dynamic tags available in widget text/URL fields.
jalpi_before_compile_class_cssFilterarray $styles, string $class_keyarrayFilter style dictionary before generating global CSS class definitions.
jalpi_global_css_varsFilterarray $varsarrayFilter CSS variables emitted in :root from plugin settings.
jalpi_design_system_css_varsFilterarray $varsarrayFilter CSS custom property output from Design System tokens.
jalpi_products_grid_query_argsFilterarray $args, array $settingsarrayFilter WP_Query arguments in WooCommerce Products Grid widget.
jalpi_product_categories_argsFilterarray $args, array $settingsarrayFilter get_terms() arguments in Product Categories widget.
jalpi_sanitize_general_settingsFilterarray $clean, array $inputarrayGeneral settings sanitization pipeline hook.
jalpi_sanitize_layout_settingsFilterarray $clean, array $inputarrayLayout settings sanitization pipeline hook.
jalpi_sanitize_design_settingsFilterarray $clean, array $inputarrayDesign settings sanitization pipeline hook.
jalpi_sanitize_performance_settingsFilterarray $clean, array $inputarrayPerformance settings sanitization pipeline hook.
jalpi_sanitize_breakpoints_settingsFilterarray $clean, array $inputarrayBreakpoints settings sanitization pipeline hook.

Hook Reference#

jalpi_valid_dynamic_tags#

Type: Filter | Source: includes/class-jalpi-dynamic-tags.php:171

Filters the array of registered dynamic tags. Used to register custom dynamic tags that appear in the editor's dynamic data picker (e.g. for text widgets, buttons, and links).

add_filter( 'jalpi_valid_dynamic_tags', function( array $tags ): array {
    $tags['user_company'] = [
        'label'    => __( 'User Company', 'my-plugin' ),
        'group'    => 'user',
        'callback' => function( $post_id ) {
            $user_id = get_current_user_id();
            return $user_id ? get_user_meta( $user_id, 'company_name', true ) : '';
        },
    ];
    return $tags;
}, 10, 1 );

jalpi_settings_defaults#

Type: Filter | Source: includes/class-jalpi-settings.php:138

Runs inside Jalpi_Settings::defaults() on reads, activation seeding, and settings registration. Allows theme authors to pre-configure defaults.

add_filter( 'jalpi_settings_defaults', function( array $defaults ): array {
    // Customize default container width and primary brand color
    $defaults['layout']['container_width'] = '1440px';
    $defaults['design']['primary_color']   = '#4f46e5';
    $defaults['performance']['enable_page_cache'] = '1';
    return $defaults;
}, 10, 1 );

jalpi_settings_font_options#

Type: Filter | Source: includes/class-jalpi-editor.php:293

Filters font families presented in the typography font selector inside both the visual editor and admin settings.

add_filter( 'jalpi_settings_font_options', function( array $fonts ): array {
    $fonts['Cabinet Grotesk'] = 'Cabinet Grotesk, sans-serif';
    $fonts['Satoshi']          = 'Satoshi, sans-serif';
    return $fonts;
}, 10, 1 );

jalpi_products_grid_query_args#

Type: Filter | Source: includes/class-jalpi-woo-query.php:221

Filters the WP_Query argument array used by the WooCommerce Products Grid widget before executing the query.

add_filter( 'jalpi_products_grid_query_args', function( array $args, array $settings ): array {
    // Only query products currently in stock
    $args['meta_query'][] = [
        'key'     => '_stock_status',
        'value'   => 'instock',
        'compare' => '=',
    ];
    return $args;
}, 10, 2 );

jalpi_class_saved#

Type: Action | Source: includes/class-jalpi-class-manager.php:220, 277

Fires immediately after a global CSS class is created or updated in the {prefix}jalpi_classes database table.

add_action( 'jalpi_class_saved', function( array $clean ) {
    $class_key = $clean['class_key'];
    // Invalidate edge cache or rebuild compiled static CSS file
    delete_transient( 'my_theme_compiled_classes' );
}, 10, 1 );

jalpi_class_deleted#

Type: Action | Source: includes/class-jalpi-class-manager.php:312

Fires immediately after a global CSS class is deleted.

add_action( 'jalpi_class_deleted', function( string $class_key ) {
    delete_transient( 'my_theme_compiled_classes' );
}, 10, 1 );

jalpi_design_system_capability#

Type: Filter | Source: includes/class-jalpi-api.php:217

Controls the capability required to modify Design System tokens and global classes. Defaults to manage_options.

add_filter( 'jalpi_design_system_capability', function( string $cap ): string {
    // Allow editors to modify design tokens
    return 'edit_theme_options';
} );

jalpi_global_css_vars#

Type: Filter | Source: includes/class-jalpi-settings.php:830

Filters the associative array of CSS custom properties injected into :root on the frontend.

add_filter( 'jalpi_global_css_vars', function( array $vars ): array {
    $vars['--jalpi-accent-glow'] = 'rgba(99, 102, 241, 0.35)';
    return $vars;
} );

Filters Added With the 1.0.5 Features#

These filters belong to the Role Manager, AI Generator, Addons screen, Element Manager and contact endpoint. They are not part of the tables above.

FilterValuePurpose
jalpi_permissions_enabledbool, default trueReturn false to switch the Role Manager permission layer off, like the JALPI_PERMISSIONS_DISABLED constant.
jalpi_ai_capabilitystring, default manage_optionsThe WordPress capability needed to use the AI Website Generator.
jalpi_ai_hourly_limitintThe per-user requests-per-hour limit for the AI Website Generator.
jalpi_addons_registryarrayThe list of addons shown on the Addons screen.
jalpi_element_manager_catalogarrayThe element catalog shown in the Element Manager.
jalpi_contact_recipientstring, default the site admin emailWho receives mail from the built-in contact endpoint used by starter-site contact forms.

Constants: JALPI_PERMISSIONS_DISABLED (see Role Manager) and JALPI_AI_API_KEY (see AI Website Generator).

Best Practices#

Development Guidelines

  • Never modify Jalpi core files: Always attach your extensions using a child theme functions.php or dedicated extension plugin.
  • Specify argument counts: When using hooks with multiple parameters (e.g. jalpi_products_grid_query_args), always pass the parameter count explicitly: add_filter( 'jalpi_products_grid_query_args', 'my_func', 10, 2 ).
  • Always return the value in filters: A filter must always return the filtered variable, even if no modifications were made.
  • Sanitize custom inputs: Always use appropriate WordPress sanitization (sanitize_text_field, absint, sanitize_hex_color) before saving or rendering custom data.