Theme Application Hooks
bifrost/noise/register
Fires after the theme application has registered its default bindings and service providers, allowing third-party developers to register their own service providers. Location: src/Core/Application.php:60$application(Application) - The theme application instance
bifrost/noise/booted
Fires after all service providers have been booted, providing a hook for third-party code to execute after theme initialization is complete. Location: src/Core/Application.php:123$application(Application) - The theme application instance
WordPress Core Hooks
The theme hooks into various WordPress core actions and filters. These are documented here for reference.after_setup_theme
Used to initialize the theme and boot registered services. Location: functions.php:26-29Frontend Hooks
wp_enqueue_scripts
Enqueues frontend scripts and styles. Location: src/Frontend/FrontendAssets.php:35- Enqueues the cursor JavaScript (
public/js/cursor.js) - Enqueues the primary stylesheet (
public/css/screen.css) - Adds path data for potential stylesheet inlining
styles_inline_size_limit
Filters the inline CSS size limit to allow larger stylesheets to be inlined. Location: src/Frontend/FrontendAssets.php:36$total_inline_limit(int) - Current inline size limit
Editor Hooks
enqueue_block_editor_assets
Enqueues editor-specific assets. Location: src/Editor/EditorAssets.php:28- Enqueues the editor JavaScript (
public/js/editor.js) - Sets script translations for the editor
block_editor_settings_all
Customizes block editor settings. Location: src/Editor/EditorSettings.php:28- Sets
disableContentOnlyForUnsyncedPatternstotrue - Sets
fontLibraryEnabledtofalse
$settings(array) - Block editor settings
Block Hooks
init (Block Stylesheets)
Registers and enqueues block-specific stylesheets. Location: src/Block/Stylesheet/StylesheetLoader.php:43- Automatically discovers block stylesheets in
public/css/blocks/ - Conditionally loads styles only when blocks are used
init (Block Bindings)
Registers custom block binding sources. Location: src/Block/Binding/BindingSourceRegistrar.php:34- Registers the following binding sources:
bifrost-music/album- Album metadata bindingsbifrost-music/post-type- Post type metadata bindingsbifrost-music/query- Query context bindingsbifrost-music/term- Taxonomy term bindingsbifrost-music/user- User metadata bindings
block_bindings_supported_attributes_
Adds supported bindable attributes to specific blocks. Location: src/Block/Binding/BindingAttributeSupport.php:40-44core/cover- Addsurlattribute supportoutermost/icon-block- Addsiconattribute support
$attrs(array) - Current supported attributes
render_block_core/cover
Filters the rendered output of the Cover block to apply block bindings. Location: src/Block/Render/RenderCover.php:30$block_content(string) - The block’s HTML content$block(array) - The block’s attributes and data$block_instance(WP_Block) - The block instance
- Processes
bifrost-music/termbinding source for theurlattribute - Replaces background image URLs in the block’s inline styles
render_block_outermost/icon-block
Filters the rendered output of the Icon Block to apply block bindings. Location: src/Block/Render/RenderIcon.php:29$block_content(string) - The block’s HTML content$block(array) - The block’s attributes and data$block_instance(WP_Block) - The block instance
- Processes
bifrost-music/post-typebinding source for theiconattribute - Replaces SVG content in the rendered output
pre_render_block
Filters blocks before rendering, used to modify query parameters. Location: src/Block/Render/RenderQuery.php:29$pre_render(string|null) - Pre-rendered content (null by default)$parsed_block(array) - The parsed block data
- Detects the
bifrost-noise/query-artist-albumsvariation - Adds a filter to modify query variables for artist album queries
query_loop_block_query_vars
Modifies query variables for the Query Loop block (added dynamically). Location: src/Block/Render/RenderQuery.php:40-52$query(array) - Query variables$block(object) - The block instance
- Sets
post_parentto current artist ID when on an artist page - Used for the artist albums query variation
Post Type Hooks
register_post_type_args
Filters post type registration arguments to apply custom modifications. Location: src/PostType/PostTypeModifierManager.php:40$args(array) - Post type registration arguments$post_type(string) - The post type name
- Applies custom modifications for registered post types:
music_album- Modified byModifiers\Albummusic_artist- Modified byModifiers\Artistpost- Modified byModifiers\Post
Gutenberg Hooks
option_gutenberg-experiments
Enables experimental Gutenberg features. Location: src/Gutenberg/GutenbergExperiments.php:35$experiments(mixed) - Current experimental options
- Enables
gutenberg-block-experimentsfeature
Removed Hooks
The theme removes certain default WordPress hooks for optimization:wp_head (emoji script)
Location: src/Frontend/FrontendAssets.php:39- Disables the emoji detection script on the frontend for performance
See Also
Theme Functions
Helper functions and theme API
Theme Overview
Learn about the theme’s architecture
