WordPress messages, especially custom messages, are becoming a bit of a sore spot for developers, bloggers, content managers and so on.
And with good reason: It seems like every plugin has this desire to display tooltips, messages, promotional content, and so on every single time it’s activated or updated.
WordPress Messages aren’t inherently bad, but they’re abused. Still, they serve a purpose and can (and arguably should) be used sparingly when the opportunity presents itself.
In a series I’ve been working on for Tuts+, I’ve been walking through the process of creating a custom system for implementing, displaying, and customizing WordPress messages.
And how to do so in a way that’s reusable across various projects.
Custom WordPress Messages
As the series page states:
It’s possible to implement a system that allows us to programmatically set our own custom messages, their type, and when and where to display them on the administration page.
The idea behind each of the posts is simple:
- Talk about the various types of messages that WordPress displays,
- Define a custom hook that can display our messages and implement the proper callbacks,
- Build a plugin that showcases how to employ all of the above,
- Include everything in a documented, functional package that can be installed, studied, and adjusted for future work.
As mentioned earlier in the post, the idea behind the series isn’t to help foster abusing the WordPress message system.
Instead, it’s to help provide those interested in object-oriented programming, WordPress hooks, and building plugins understand the topics and use them in a respectable way in their products.
So if that sounds like you or includes something you’d like to study, then be sure to check out the series. And, as usual, feel free to leave comments or questions in the tutorial’s respective feed or contact me via Twitter.