• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

Two Filters That No Longer Work In Gutenberg (And Workarounds)

Bhagwad Park

Published on: January 19, 2023

Categories: WordPress 0

While updating some of my older WordPress posts, I noticed that some of the code I’d used that worked with the older classic editor no longer works with Gutenberg. Even though I admitted my mistake and embraced Gutenberg, it’s annoying that the two filters I used no longer work. In this article, I’ll document three use cases.

1. “post_updated_messages” Filter

The first filter that I miss in Gutenberg is called “post_updated_messages”. In the classic editor, the WordPress system triggered this filter whenever a post was updated, and we could use it to change the message that appeared on the top of the editor. I found this filter most useful whenever I wanted to check the post’s content and, if necessary, revert the status based on some criteria.

For the first example, let’s say you want to include a minimum or maximum title length for your post writers. To ensure that they comply, I would use the “post_updated_messages” to check the length of the title, and if it was too long, I would unpublish the post with an error message on top.

As a second example, if you have a lot of guest writers, you want to ensure that they don’t link out too often. If you’re paranoid, you might worry that they’re accepting payment for linking to a 3rd party website. You could use the “post_updates_messages” notification to check the content for links to 3rd party domains, and then unpublish the post and mark it as pending when you can review it later.

With Gutenberg, actions like this are no longer possible.

2. “post_link” Filter No Longer Fires on the “Insert Link” Tool

We can use the “post_link” filter to change the URL returned by WordPress for a given post object. I used this filter to allow the “Insert Link” tool to return the “pretty permalinks” of even draft posts. This allowed me to create pages in advance, interlink them all, and then publish them all at once. Previously, linking to a draft post would only insert the “ugly” permalink used for previews.

Unfortunately, the “post_link” filter no longer fires when you insert a link using the Gutenberg editor in WordPress. I can’t link to draft posts with pretty permalinks anymore. It’s not too big of a loss in functionality, but for those who needed it, the loss hurts.

Filtering “admin_notices” Instead of “post_updated_messages”

As a poor workaround, the “admin_notices” filter can be used for some cases where you previously had the “post_updated_messages” filter. It’s far from perfect and doesn’t work at all while editing a post, so it’s useless to verify the content of a post. But at least you can still use it when you inform the user that they need to update a plugin or theme.

Keep Using the Classic Editor if you Need To

In the worst-case scenario, you can always install the WordPress classic editor plugin. Even though the WordPress team says they’ll maintain it only till 2024, there’s a good chance it’ll keep working for longer, as the community will keep updating it for compatibility. For how long? No idea. But in the near future, you can rely on it.

Despite the Loss, Gutenberg is a Huge Step Forward

Annoying as the loss of functionality is, I prefer Gutenberg to the classic editor. My pages are now more than just plain text and contain visual elements I could only dream of before. So I’m not complaining too hard!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Related Posts

Joomla vs. WordPress: Which One Is Better?

In this post, we’ll consider five differences between Joomla and WordPress and how you might go forward with setting up a WordPress website.

What Is Self-Hosted WordPress?

In this post, we’ll differentiate self-hosted WordPress from WordPress.com, and discuss the benefits of the former.

How To Start A Newsletter In WordPress

Check out our complete guide on why and how you should start your own newsletter in WordPress.

How to Eliminate Render-Blocking Resources in WordPress (& Why You Should)

Many things can slow down your site, including render-blocking resources. These are CSS and JavaScript files that delay the loading of content on your site. As a result, visitors will have to wait longer to interact with your page, which could lead to frustration and instant exits.  So, what can you do to eliminate render-blocking […]

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA