Skip to main content

What Are Extensions?

Beaver Builder extensions are modular components that add specialized functionality to the core plugin. They are loaded automatically when Beaver Builder is active and provide features like theme building, cloud templates, white labeling, and more.
Extensions are located in the extensions/ directory and are initialized during plugin load.

Extension Architecture

Extensions follow a consistent structure:
  1. Main File: Each extension has an entry file (e.g., fl-theme-builder-core.php)
  2. Classes Directory: Contains the core logic classes
  3. Includes Directory: Additional files like templates and settings
  4. Assets: CSS and JavaScript files for frontend and admin interfaces

Extension Loading

Extensions are loaded conditionally based on:
  • Available features
  • License level
  • Theme support
  • Multisite settings
// Example: Theme Builder Core loading
define( 'FL_THEME_BUILDER_CORE_DIR', FL_BUILDER_DIR . 'extensions/fl-theme-builder-core/' );
define( 'FL_THEME_BUILDER_CORE_URL', FL_BUILDER_URL . 'extensions/fl-theme-builder-core/' );

add_action( 'plugins_loaded', function () {
    if ( defined( 'FL_THEME_BUILDER_VERSION' ) && class_exists( 'FLThemeBuilderFieldConnections' ) ) {
        return;
    }
    
    require_once FL_THEME_BUILDER_CORE_DIR . 'classes/class-fl-theme-builder-field-connections.php';
    require_once FL_THEME_BUILDER_CORE_DIR . 'classes/class-fl-theme-builder-layout-data.php';
    // ... load other classes
}, 11 );

Available Extensions

Theme Builder

Create custom headers, footers, and post layouts with dynamic field connections

Cloud Templates

Access and manage templates from Beaver Builder’s cloud library

White Label

Customize branding for client sites and agency workflows

User Templates

Manage user-created templates and enable template export/import

Global Styles

Define and apply consistent styling across all modules and layouts

Cache Helper

Integration with popular caching plugins for automatic cache clearing

Version Control

Track and manage layout revisions with rollback capabilities

Multisite Support

Network-level settings and configuration for WordPress multisite

Extension Constants

Each extension defines constants for directory and URL paths:
ExtensionDirectory ConstantURL Constant
Theme BuilderFL_THEME_BUILDER_CORE_DIRFL_THEME_BUILDER_CORE_URL
CloudFL_BUILDER_CLOUD_DIRFL_BUILDER_CLOUD_URL
White LabelFL_BUILDER_WHITE_LABEL_DIRFL_BUILDER_WHITE_LABEL_URL
define( 'FL_THEME_BUILDER_CORE_DIR', FL_BUILDER_DIR . 'extensions/fl-theme-builder-core/' );
define( 'FL_THEME_BUILDER_CORE_URL', FL_BUILDER_URL . 'extensions/fl-theme-builder-core/' );

Creating Custom Extensions

While most users won’t need to create custom extensions, developers can extend Beaver Builder by:
  1. Creating a custom plugin that hooks into Beaver Builder
  2. Using the extensive filter and action hooks provided
  3. Registering custom modules, templates, or field types
Modifying core extension files is not recommended as changes will be overwritten during updates. Always use hooks and filters or create separate plugins.

Extension Dependencies

Some extensions depend on others:
  • Theme Builder requires core classes like FLPageData and FLThemeBuilderFieldConnections
  • Cloud Templates integrates with the Assistant interface when available
  • White Label works with both the plugin and theme
// Example: Checking for dependencies
if ( defined( 'FL_THEME_BUILDER_VERSION' ) && class_exists( 'FLThemeBuilderFieldConnections' ) ) {
    // Extension already loaded by full version
    return;
}

Performance Considerations

Extensions are optimized to load only when needed:
  • Scripts and styles are enqueued conditionally
  • Database queries are cached
  • Heavy operations are deferred until necessary

Query Caching

Extensions implement caching to prevent expensive database queries:
// From FLThemeBuilderRulesLocation
static private $query_cache = array();
static private $current_page_posts = null;
static private $current_page_location = null;

Next Steps

Theme Builder

Learn about creating custom theme layouts

Field Connections

Connect dynamic data to module fields

Build docs developers (and LLMs) love