Gutenberg 24.4.1 has 37 actions and 68 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Gutenberg fires an action
add_action( 'admin_footer', function( $hook_suffix ) {
// Your code runs here.
}, 10, 1 );
// Change a value Gutenberg is about to use
add_filter( 'image_editor_output_format', function( $value, $arg2, $mime_type ) {
// Change $value here.
return $value;
}, 10, 3 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
admin_head
action/** * This action is documented in wp-admin/admin-header.php */ do_action( 'admin_head' ); -
admin_head-{$hook_suffix}
action/** * This action is documented in wp-admin/admin-header.php */ do_action( "admin_head-{$hook_suffix}" ); -
image_editor_output_format
filter/** * This filter is documented in wp-includes/class-wp-image-editor.php */ apply_filters( 'image_editor_output_format', array( $mime_type => $mime_type ), $filename ? $filename : '', $mime_type ); -
/** * Filters the default dashboard layout served to users who have not customized * theirs. */ apply_filters( 'gutenberg_dashboard_default_layout', array(), GUTENBERG_DASHBOARD_NAME ); -
image_save_progressive
filter/** * This filter is documented in wp-includes/class-wp-image-editor-imagick.php */ apply_filters( 'image_save_progressive', false, $mime_type ); -
the_content
filter/** * This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) ); -
wp_theme_json_data_user
filter/** * Filters the data provided by the user for global styles & settings. */ apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data_Gutenberg( $config, 'custom' ) ); -
__unstable_wp_sync_storage
filter/** * Filters the sync storage implementation for collaborative editing. */ apply_filters( '__unstable_wp_sync_storage', new WP_Sync_Post_Meta_Storage() ); -
big_image_size_threshold
filter/** * This filter is documented in wp-admin/includes/image.php */ apply_filters( 'big_image_size_threshold', 2560, array( 0, 0 ), '', 0 ); -
block_core_breadcrumbs_items
filter/** * Filters the breadcrumb items array before rendering. */ apply_filters( 'block_core_breadcrumbs_items', $breadcrumb_items ); -
/** * Filters breadcrumb settings (taxonomy and term selection) for a post or post * type. */ apply_filters( 'block_core_breadcrumbs_post_type_settings', array(), $post_type, $post_id ); -
/** * Filters the list of available social service. */ apply_filters( 'block_core_social_link_get_services', $services_data ); -
block_type_metadata
filter/** * This filter is documented in wp-includes/blocks.php */ apply_filters( 'block_type_metadata', $metadata ); -
comment_text
filter/** * This filter is documented in wp-includes/comment-template.php */ apply_filters( 'comment_text', $comment_text, $comment, $args ); -
dashboard_boot_dependencies
filter/** * Filters the boot script-module dependencies for the dashboard page. */ apply_filters( 'dashboard_boot_dependencies', $boot_dependencies ); -
dashboard_init
action/** * Fires when the dashboard page is initialized so extensions can register * routes and menu items. */ do_action( 'dashboard_init' ); -
/** * Filters the boot script-module dependencies for the dashboard-wp-admin page. */ apply_filters( 'dashboard-wp-admin_boot_dependencies', $boot_dependencies ); -
dashboard-wp-admin_init
action/** * Fires when the dashboard admin page is initialized so extensions can * register routes and menu items. */ do_action( 'dashboard-wp-admin_init' ); -
excerpt_length
filter/** * This filter is documented in wp-includes/formatting.php */ apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length ); -
/** * Filters the boot script-module dependencies for the experiments page. */ apply_filters( 'experiments_boot_dependencies', $boot_dependencies ); -
experiments_init
action/** * Fires when the experiments page is initialized so extensions can register * routes and menu items. */ do_action( 'experiments_init' ); -
/** * Filters the boot script-module dependencies for the experiments-wp-admin * page. */ apply_filters( 'experiments-wp-admin_boot_dependencies', $boot_dependencies ); -
experiments-wp-admin_init
action/** * Fires when the experiments admin page is initialized so extensions can * register routes and menu items. */ do_action( 'experiments-wp-admin_init' ); -
/** * This filter is documented in wp-admin/includes/image.php */ apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata ); -
/** * Filters the boot script-module dependencies for the font-library page. */ apply_filters( 'font-library_boot_dependencies', $boot_dependencies ); -
font-library_init
action/** * Fires when the font-library page is initialized so extensions can register * routes and menu items. */ do_action( 'font-library_init' ); -
/** * Filters the boot script-module dependencies for the font-library-wp-admin * page. */ apply_filters( 'font-library-wp-admin_boot_dependencies', $boot_dependencies ); -
font-library-wp-admin_init
action/** * Fires when the font-library admin page is initialized so extensions can * register routes and menu items. */ do_action( 'font-library-wp-admin_init' ); -
guidelines_boot_dependencies
filter/** * Filters the boot script-module dependencies for the guidelines page. */ apply_filters( 'guidelines_boot_dependencies', $boot_dependencies ); -
guidelines_init
action/** * Fires when the guidelines page is initialized so extensions can register * routes and menu items. */ do_action( 'guidelines_init' ); -
/** * Filters the boot script-module dependencies for the guidelines-wp-admin * page. */ apply_filters( 'guidelines-wp-admin_boot_dependencies', $boot_dependencies ); -
guidelines-wp-admin_init
action/** * Fires when the guidelines admin page is initialized so extensions can * register routes and menu items. */ do_action( 'guidelines-wp-admin_init' ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_dashboard_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_experiments_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_font_library_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_guidelines_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_media_editor_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_options_connectors_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_site_editor_v2_wp_admin_preload_paths', $preload_paths ); -
/** * Filters the REST API paths preloaded for this page. */ apply_filters( 'gutenberg_theme_preview_wp_admin_preload_paths', $preload_paths ); -
/** * Filters whether to use Document-Isolation-Policy for cross-origin isolation. */ apply_filters( 'gutenberg_use_document_isolation_policy', null !== $chromium_version && $chromium_version >= 137 ); -
image_max_bit_depth
filter/** * This filter is documented in wp-includes/class-wp-image-editor-imagick.php */ apply_filters( 'image_max_bit_depth', 16, 16 ); -
image_strip_meta
filter/** * This filter is documented in wp-includes/class-wp-image-editor-imagick.php */ apply_filters( 'image_strip_meta', true ); -
jpeg_quality
filter/** * This filter is documented in wp-includes/class-wp-image-editor.php */ apply_filters( 'jpeg_quality', $quality, 'image_resize' ); -
/** * Filters the boot script-module dependencies for the media-editor page. */ apply_filters( 'media-editor_boot_dependencies', $boot_dependencies ); -
media-editor_init
action/** * Fires when the media-editor page is initialized so extensions can register * routes and menu items. */ do_action( 'media-editor_init' ); -
/** * Filters the boot script-module dependencies for the media-editor-wp-admin * page. */ apply_filters( 'media-editor-wp-admin_boot_dependencies', $boot_dependencies ); -
media-editor-wp-admin_init
action/** * Fires when the media-editor admin page is initialized so extensions can * register routes and menu items. */ do_action( 'media-editor-wp-admin_init' ); -
/** * Filters the boot script-module dependencies for the options-connectors page. */ apply_filters( 'options-connectors_boot_dependencies', $boot_dependencies ); -
options-connectors_init
action/** * Fires when the options-connectors page is initialized so extensions can * register routes and menu items. */ do_action( 'options-connectors_init' ); -
/** * Filters the boot script-module dependencies for the * options-connectors-wp-admin page. */ apply_filters( 'options-connectors-wp-admin_boot_dependencies', $boot_dependencies ); -
/** * Fires when the options-connectors admin page is initialized so extensions * can register routes and menu items. */ do_action( 'options-connectors-wp-admin_init' ); -
post_type_archive_title
filter/** * This filter is documented in wp-includes/general-template.php */ apply_filters( 'post_type_archive_title', $post_type_object->labels->archives, $post_type ); -
/** * Fires when a block template part is loaded from a template part in the * theme. */ do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content ); -
/** * Fires when a requested block template part does not exist in the database * nor in the theme. */ do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path ); -
/** * Fires when a block template part is loaded from a template post stored in * the database. */ do_action( 'render_block_core_template_part_post', $template_part_id, $attributes, $template_part_post, $content ); -
/** * This filter is documented in * wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ apply_filters( "rest_{$post->post_type}_trashable", $supports_trash, $post ); -
rest_after_insert_attachment
action/** * This action is documented in * wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */ do_action( 'rest_after_insert_attachment', $attachment, $request, true ); -
rest_after_insert_comment
action/** * This action is documented in * wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ do_action( 'rest_after_insert_comment', $comment, $request, true ); -
/** * This filter is documented in * wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ apply_filters( 'rest_allow_anonymous_comments', false, $request ); -
rest_comment_trashable
filter/** * This filter is documented in * wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment ); -
rest_insert_comment
action/** * This action is documented in * wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ do_action( 'rest_insert_comment', $comment, $request, true ); -
rest_pre_insert_comment
filter/** * This filter is documented in * wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request ); -
/** * Filters the boot script-module dependencies for the site-editor-v2 page. */ apply_filters( 'site-editor-v2_boot_dependencies', $boot_dependencies ); -
site-editor-v2_init
action/** * Fires when the site-editor-v2 page is initialized so extensions can register * routes and menu items. */ do_action( 'site-editor-v2_init' ); -
/** * Filters the boot script-module dependencies for the site-editor-v2-wp-admin * page. */ apply_filters( 'site-editor-v2-wp-admin_boot_dependencies', $boot_dependencies ); -
site-editor-v2-wp-admin_init
action/** * Fires when the site-editor-v2 admin page is initialized so extensions can * register routes and menu items. */ do_action( 'site-editor-v2-wp-admin_init' ); -
/** * Filters the boot script-module dependencies for the theme-preview page. */ apply_filters( 'theme-preview_boot_dependencies', $boot_dependencies ); -
theme-preview_init
action/** * Fires when the theme-preview page is initialized so extensions can register * routes and menu items. */ do_action( 'theme-preview_init' ); -
/** * Filters the boot script-module dependencies for the theme-preview-wp-admin * page. */ apply_filters( 'theme-preview-wp-admin_boot_dependencies', $boot_dependencies ); -
theme-preview-wp-admin_init
action/** * Fires when the theme-preview admin page is initialized so extensions can * register routes and menu items. */ do_action( 'theme-preview-wp-admin_init' ); -
widget_archives_args
filter/** * This filter is documented in * wp-includes/widgets/class-wp-widget-archives.php */ apply_filters( 'widget_archives_args', array( 'type' => $type, 'show_post_count' => $show_post_count, ) ); -
/** * This filter is documented in * wp-includes/widgets/class-wp-widget-archives.php */ apply_filters( 'widget_archives_dropdown_args', array( 'type' => $type, 'format' => 'option', 'show_post_count' => $show_post_count, ) ); -
widget_comments_args
filter/** * This filter is documented in * wp-includes/widgets/class-wp-widget-recent-comments.php */ apply_filters( 'widget_comments_args', array( 'number' => $attributes['commentsToShow'], 'status' => 'approve', 'post_status' => 'publish', ), array() ); -
wp_admin_bar_show_site_icons
filter/** * This filter is documented in wp-includes/admin-bar.php */ apply_filters( 'wp_admin_bar_show_site_icons', true ); -
wp_check_post_lock_window
filter/** * This filter is documented in wp-admin/includes/ajax-actions.php */ apply_filters( 'wp_check_post_lock_window', 150 ); -
/** * Filters whether client-side media processing is enabled. */ apply_filters( 'wp_client_side_media_processing_enabled', true ); -
wp_editor_set_quality
filter/** * This filter is documented in wp-includes/class-wp-image-editor.php */ apply_filters( 'wp_editor_set_quality', $default_quality, $mime_type, $size ); -
wp_entity_fields_api_init
action/** * Fires the first time the registered fields are read, after `init`. */ do_action( 'wp_entity_fields_api_init' ); -
/** * Filters whether sub-sizes of animated images should keep their animation. */ apply_filters( 'wp_generate_animated_image_subsizes', true ); -
/** * This filter is documented in wp-admin/includes/image.php */ apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id, 'update' ); -
wp_guideline_max_length
filter/** * Filters the maximum length, in characters, of a guideline row's content. */ apply_filters( 'wp_guideline_max_length', 5000 ); -
wp_guideline_scopes
filter/** * Filters the guideline scopes available on this site. */ apply_filters( 'wp_guideline_scopes', array( 'site' => array( 'title' => __( 'Site', 'gutenberg' ), 'description' => __( "Describe your site's purpose, goals, and primary audience.", 'gutenberg' ), 'order' => 10, ), 'copy' => array( 'title' => __( 'Copy', 'gutenberg' ), 'description' => __( 'Set your writing standards for tone, voice, style, and formatting.', 'gutenberg' ), 'order' => 20, ), 'images' => array( 'title' => __( 'Image... ); -
/** * Filters whether real-time collaboration is disabled for a post type. */ apply_filters( 'wp_is_post_type_collaboration_disabled', false, $post_type ); -
wp_knowledge_types
filter/** * Filters the knowledge types available on this site. */ apply_filters( 'wp_knowledge_types', array( 'guideline' => array( 'title' => _x( 'Guideline', 'knowledge type', 'gutenberg' ), ), 'memory' => array( 'title' => _x( 'Memory', 'knowledge type', 'gutenberg' ), ), 'note' => array( 'title' => _x( 'Note', 'knowledge type', 'gutenberg' ), ), ) ); -
wp_theme_json_data_blocks
filter/** * Filters the data provided by the blocks for global styles & settings. */ apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data_Gutenberg( $config, 'blocks' ) ); -
wp_theme_json_data_default
filter/** * Filters the default data provided by WordPress for global styles & settings. */ apply_filters( 'wp_theme_json_data_default', new WP_Theme_JSON_Data_Gutenberg( $config, 'default' ) ); -
wp_theme_json_data_theme
filter/** * Filters the data provided by the theme for global styles and settings. */ apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data_Gutenberg( $theme_json_data, 'theme' ) ); -
/** * Filters the list of style nodes with metadata. */ apply_filters( 'wp_theme_json_get_style_nodes', $nodes ); -
admin_enqueue_scripts
actiondo_action( 'admin_enqueue_scripts', $hook_suffix ); -
admin_print_scripts
actiondo_action( 'admin_print_scripts' ); -
do_action( "admin_print_scripts-{$hook_suffix}" ); -
admin_print_styles
actiondo_action( 'admin_print_styles' ); -
do_action( "admin_print_styles-{$hook_suffix}" ); -
enqueue_block_editor_assets
actiondo_action( 'enqueue_block_editor_assets' ); -
wp_entity_actions_api_init
actiondo_action( 'wp_entity_actions_api_init' );
Generated from Gutenberg's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: