Hooks & Filters
Overview
RAVENCIBuilder provides extensive PHP hooks and filters for developers to extend and customise the builder's behaviour.
Actions
zionbuilder/init
Fires when the builder is fully initialised. Use this to register custom elements or modify settings.
add_action('zionbuilder/init', function() {
// Your custom initialisation code
});
zionbuilder/before_render
Fires before an element is rendered on the front end.
zionbuilder/after_render
Fires after an element has been rendered.
zionbuilder/editor/before_scripts
Fires before editor scripts are enqueued. Use this to add your own editor scripts.
Filters
zionbuilder/elements/categories
Filter the element categories shown in the editor panel.
add_filter('zionbuilder/elements/categories', function($categories) {
$categories[] = [
'id' => 'my-custom-category',
'name' => 'My Elements',
];
return $categories;
});
zionbuilder/permissions/allowed_post_types
Filter which post types the builder can be used on.
zionbuilder/css/variables
Filter the CSS variables output by the builder.
The text domain and hook prefix remain
zionbuilderfor backwards compatibility with existing custom code and third-party extensions.