Hooks & Filters Reference
AlonePro and its parent theme Nextora provide a rich set of action and filter hooks allowing developers to customize header markup, intercept cloud template imports, register custom color/font schemes, and extend theme functionality.
Nextora Cloud Templates Filter
nextora_cloud_templates_can_import
Gates or permits template imports via the REST API endpoint (POST /wp-json/nextora/v1/cloud/import).
apply_filters( 'nextora_cloud_templates_can_import', bool|WP_Error $allowed, WP_REST_Request $request ): bool|WP_ErrorParameters
| Parameter | Type | Description |
|---|---|---|
$allowed | bool|WP_Error | Current authorization state (default true). |
$request | WP_REST_Request | The active REST API request containing template_id and parameters. |
Custom Access Authorization Example
Developers can restrict cloud template imports based on custom user roles or capabilities:
add_filter( 'nextora_cloud_templates_can_import', function( $allowed, $request ) {
// Example: restrict template imports to administrators only
if ( ! current_user_can( 'manage_options' ) ) {
return new \WP_Error(
'forbidden',
__( 'You do not have permission to import cloud templates.', 'alonepro' ),
[ 'status' => 403 ]
);
}
return $allowed;
}, 10, 2 );Nextora Header Action Hooks
All header hooks fire from blocks/header/render.php within the parent theme:
| Hook Name | Description |
|---|---|
nextora_header_block_before | Fires before the outer header markup opens. |
nextora_header_block_after | Fires after the outer header markup closes. |
nextora_header_block_before_logo | Fires immediately before the site logo/branding markup. |
nextora_header_block_after_logo | Fires immediately after the site logo/branding markup. |
nextora_header_block_before_nav | Fires immediately before the main navigation <nav> element. |
nextora_header_block_after_nav | Fires immediately after the main navigation <nav> element. |
nextora_header_block_utilities_start | Fires at the beginning of the header utilities/actions column. |
nextora_header_block_utilities_end | Fires at the end of the header utilities/actions column. |
nextora_header_block_before_cart | Fires before the WooCommerce mini-cart trigger button. |
nextora_header_block_after_cart | Fires after the mini-cart drawer markup. |
Nextora Header Filters
| Filter Name | Signature | Description |
|---|---|---|
nextora_header_block_logo_link | (string $url, array $atts): string | Override the destination URL for the header logo. |
nextora_header_block_nav_menu_args | (array $args): array | Modify arguments passed to wp_nav_menu(). |
nextora_header_block_nav_aria_label | (string $label): string | Customize the accessibility aria-label on navigation. |
nextora_header_block_nav_wrapper_classes | (array $classes): array | Filter CSS class array applied to <nav>. |
nextora_header_block_menu_item_classes | (array $classes): array | Filter CSS class array applied to menu <li> items. |
nextora_header_block_menu_link_attributes | (array $attrs): array | Filter HTML attributes on menu <a> anchor tags. |
nextora_show_header_search_modal | (bool $show): bool | Return false to completely disable the header search modal. |
nextora_header_simple_search_placeholder | (string $text): string | Customize the search input placeholder text. |
nextora_header_block_mini_cart_title | (string $title): string | Override the slide-out mini-cart drawer heading. |
nextora_header_block_sticky_hide_after | (int $px): int | Scroll threshold in pixels before hiding sticky header on scroll-down (default 72). |
nextora_header_block_wrapper_classes | (array $classes): array | Append or modify wrapper classes on the header block. |
Color & Font Scheme Filters
Extend Nextora's scheme switcher with custom child theme color schemes and font pairings:
// Register custom color schemes into the frontend switcher
add_filter( 'nextora_color_schemes', function( array $schemes ): array {
$schemes[] = [
'slug' => 'charity-emerald',
'label' => __( 'Charity Emerald', 'alonepro' ),
'primary' => '#10B981',
];
return $schemes;
} );
// Register custom font combinations
add_filter( 'nextora_font_schemes', function( array $schemes ): array {
$schemes[] = [
'slug' => 'editorial-serif',
'label' => __( 'Editorial Serif', 'alonepro' ),
'family' => 'Merriweather, Georgia, serif',
];
return $schemes;
} );Additional Nextora Filters
nextora_cloud_api_url: Override the remote Nextora Cloud API endpoint URL.nextora_cloud_templates_allowed_tags: Filter the KSES allowed tags array applied when importing raw block HTML.nextora_post_grid_query_args: Filter theWP_Queryarguments fornextora/post-grid.nextora_post_grid_output: Filter the final rendered HTML string for the post grid block.nextora_comment_form_args: Filter parameters passed to WordPress corecomment_form().nextora_comment_tiptap_js_config: Modify the JavaScript configuration object for the Tiptap rich comment editor.