Hide admin notices with WPMasterToolKit's "Hide Admin Notices" module
In a WordPress environment, admin notices are a valuable tool for displaying important alerts, updates or recommendations. However, they can quickly become invasive, especially if several plugins use them excessively. To address this problem, we've developed the "Hide Admin Notices for the plugin WPMasterToolKit. This module allows you to hide these notifications while retaining the possibility of accessing them at any time via a dedicated interface.
Which plug-in can Hide Admin Notices replace?
This module can replace plugins such as Admin Notices Manager, WP Hide Notices or other similar solutions that focus on controlling admin notifications in the WordPress dashboard. With "Hide Admin Notices", you don't need to add an additional plugin, as this feature integrates directly into your installation via WPMasterToolKit.
Why hide administration notifications?
Administration notifications are important, but they can be detrimental to productivity and dashboard readability if they accumulate. Here are some of the advantages of hiding these notifications with our :
- Enhanced user experience A clean, distraction-free dashboard.
- Centralized management All notifications are accessible in a customized modal window.
- Reduced visual stress You can choose when to view messages, without interruption.
How the "Hide Admin Notices" module works
The "Hide Admin Notices" module takes a simple yet effective approach to managing administrative notifications:
- Notification masking All administration notifications are hidden from the main dashboard screen.
- Access via the administration bar A discreet bell-shaped icon is added to the top administration bar. This icon displays the number of notifications available.
- Consultation in a modal window Clicking on the icon opens a modal window displaying all notifications in a dedicated space.
Technical details
Scripts and styles
The module uses custom CSS and JavaScript files to style and manage interactions. These files are only loaded when the module is activated, in line with the philosophy of WPMasterToolKit which limits the resources loaded to optimize performance.
Administration bar
An entry is added to the administration bar using the wp_admin_bar->add_menu()
. This entry displays :
- A bell-shaped icon.
- Total number of unread notifications.
Modal window
The modal window is an HTML component displayed at the bottom of the page. It includes :
- A button to close the window.
- A reserved area where notifications can be displayed dynamically via the
wpmastertoolkit/hide_admin_notices/modal_body
.
How do I use the Hide Admin Notices module?
- Activation In the WordPress dashboard, activate the module "Hide Admin Notices from the WPMasterToolKit interface.
- Notification management :
- Once activated, administration notifications will be hidden.
- Click on the bell icon in the administration bar to open the modal window containing all notifications.
- Personalization You can use the
wpmastertoolkit/hide_admin_notices/modal_body
to add content or customize the display of notifications in the modal window.
Why this technical choice?
We have opted for management via a modal window for several reasons:
- Visual clarity In contrast to a permanent dashboard display, the modal allows for a clean, organized user experience.
- Performance By loading styles and scripts only when the module is activated, we minimize the impact on site performance.
- Extensibility : Thanks to the hook
wpmastertoolkit/hide_admin_notices/modal_body
Developers can enrich or customize the content of the modal window.
Conclusion
The module "Hide Admin Notices is an ideal solution for keeping your WordPress dashboard clean and organized. By hiding admin notifications while offering quick and convenient access via a modal window, this module enhances the user experience while reducing distractions. If you've had enough of intrusive notifications in WordPress, this module is for you. Test it now with WPMasterToolKit and regain control of your dashboard!