Magazine Blocks 1.8.10 has 4 actions and 28 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 Magazine Blocks fires an action
add_action( 'magazine_blocks_before_init', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Magazine Blocks is about to use
add_filter( 'magazine_blocks_abilities', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
/** * Filters the ability classes registered by Magazine Blocks. */ apply_filters( 'magazine_blocks_abilities', $this->get_abilities() ); -
/** * Filters the WP_Query args for the Banner Posts block. */ apply_filters( 'magazine_blocks_banner_posts_query_args', $args, $attrs ); -
/** * Magazine Blocks before init. */ do_action( 'magazine_blocks_before_init' ); -
/** * Filters the WP_Query args for the Featured Categories block. */ apply_filters( 'magazine_blocks_featured_categories_query_args', $args, $attrs, $cat ); -
/** * Filters the WP_Query args for the Featured Posts block. */ apply_filters( 'magazine_blocks_featured_posts_query_args', $args, $attrs ); -
/** * Filters the WP_Query args for the Grid Module block. */ apply_filters( 'magazine_blocks_grid_module_query_args', $args, $attrs ); -
/** * Magazine Blocks init. */ do_action( 'magazine_blocks_init' ); -
/** * Filters the WP_Query args for the News Ticker block. */ apply_filters( 'magazine_blocks_news_ticker_query_args', $args, $attrs ); -
/** * Filters the WP_Query args for the Post List block. */ apply_filters( 'magazine_blocks_post_list_query_args', $args, $attrs ); -
/** * Filters the WP_Query args for the Post Video block. */ apply_filters( 'magazine_blocks_post_video_query_args', $args, $attrs ); -
/** * Filters the WP_Query args for the Slider block. */ apply_filters( 'magazine_blocks_slider_query_args', $args, $attrs ); -
apply_filters( "magazine_blocks_{$this->block_name}_content", $this->build_html( $this->content ), $this ); -
apply_filters( 'magazine_blocks_default_settings', self::$data ); -
apply_filters( 'magazine_blocks_get_metadata_base_dir', MAGAZINE_BLOCKS_PLUGIN_DIR . '/dist', $this->block_name ); -
apply_filters( 'magazine_blocks_scripts', $this->scripts ); -
apply_filters( "magazine_blocks_{$this->get_post_type()}_post_type_args", $this->get_post_type_args() ); -
apply_filters( "magazine_blocks_{$this->post_type}_labels", array( 'name' => __( 'Template', 'magazine-blocks' ), 'singular_name' => __( 'Template', 'magazine-blocks' ), 'add_new' => __( 'Add new Template', 'magazine-blocks' ), 'add_new_item' => __( 'Add new Template', 'magazine-blocks' ), 'edit_item' => __( 'Edit Template', 'magazine-blocks' ), 'new_item' => __( 'New Template', 'magazine-blocks' ), 'view_item' => __( 'View Template', 'magazine-blocks' ... ); -
apply_filters( 'magazine_blocks_activation_redirect', true ); -
apply_filters( 'magazine_blocks_block_styles_id', $this->id, $blocks ); -
apply_filters( 'magazine_blocks_block_types', array( Advertisement::class, Heading::class, Archive::class, PostContent::class, PostMeta::class, BannerPosts::class, Breadcrumbs::class, GridModule::class, FeaturedPosts::class, FeaturedCategories::class, TabPost::class, PostList::class, CategoryList::class, NewsTicker::class, Column::class, PostVideo::class, Section::class, DateWeather::class, Slider::class, SocialIcons::class, SocialIcon::cl... ); -
apply_filters( 'magazine_blocks_content_for_css_generation', get_the_content() ); -
apply_filters( 'magazine_blocks_get_rest_api_controllers', array( 'MagazineBlocks\RestApi\Controllers\LibraryDataController', 'MagazineBlocks\RestApi\Controllers\ImageImportController', 'MagazineBlocks\RestApi\Controllers\RegenCSSController', 'MagazineBlocks\RestApi\Controllers\SettingsController', 'MagazineBlocks\RestApi\Controllers\ChangelogController', 'MagazineBlocks\RestApi\Controllers\VersionControlController', 'MagazineBlocks\RestApi\Controllers... ); -
apply_filters( 'magazine_blocks_icon', $icon, $name, $args ); -
apply_filters( 'magazine_blocks_ignore_hide_admin_notices', array() ); -
apply_filters( 'magazine_blocks_localize_admin_scripts', array( 'name' => '_MAGAZINE_BLOCKS_DASHBOARD_', 'data' => array( 'version' => MAGAZINE_BLOCKS_VERSION, 'plugins' => array_reduce( $allowed_plugin_slugs, function ( $acc, $curr ) use ( $installed_plugin_slugs ) { if ( in_array( $curr, $installed_plugin_slugs, true ) ) { if ( is_plugin_active( $curr ) ) { $acc[ $curr ] = 'active'; } else { $acc[ $curr ] = 'inactive'; } } else { $acc[ $curr ] = 'n... ); -
apply_filters( 'magazine_blocks_localize_block_scripts', array( 'name' => '_MAGAZINE_BLOCKS_', 'data' => array( 'isNotPostEditor' => 'widgets.php' === $pagenow || 'customize.php' === $pagenow, 'isWP59OrAbove' => is_wp_version_compatible( '5.9' ), 'apiStatus' => $open_weather->is_api_connected(), 'temperature' => $open_weather->show_temp(), 'weather' => $open_weather->show_weather(), 'location' => $open_weather->show_location(), 'apiKey' => get_option... ); -
apply_filters( 'magazine_blocks_prepare_changelog', $response, $item, $request ); -
do_action( 'magazine_blocks_responsive_breakpoints_changed', $new_breakpoints, $old_breakpoints ); -
apply_filters( 'magazine_blocks_setting_sanitize_callbacks', self::$sanitize_callbacks ); -
apply_filters( 'themegrill_sdk_registered_notifications', $notifications ); -
do_action( 'wp_body_open' );
Generated from Magazine Blocks's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: