Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

How to use admin_footer_text action in WordPress

Sandeep Kumar Mishra
Sandeep Kumar Mishra
March 16, 2023
5 minutes read

Hey there! If you’re diving into WordPress development, you’ve probably come across the concept of hooks. They’re super handy for customizing how WordPress behaves without altering the core code. Today, let’s talk about the admin_footer_text action. This hook is your go-to for tweaking the “Thank you” text displayed in the admin footer. It’s pretty straightforward to use, and I’ll walk you through it with some live examples.

Example 1: Custom Footer Text

Want to add a personal touch to your admin footer? Here’s how you can change the default text to something more custom.

    function weplugins_custom_admin_footer_text() {
        return 'My footer custom text';
    }
    add_action( 'admin_footer_text', 'weplugins_custom_admin_footer_text' );
    

Example 2: Add Additional Functionality

Let’s say you want to execute some custom functionality whenever this action is triggered. Here’s how you can do it.

    function weplugins_execute_on_admin_footer_text_event($text){
        // Code to execute during the admin_footer_text action
    }
    add_action( "admin_footer_text", "weplugins_execute_on_admin_footer_text_event", 10, 1);
    

Example 3: Removing a Registered Hook

If you need to remove a previously registered hook, you can use remove_action. Here’s how:

    remove_action( "admin_footer_text", "weplugins_execute_on_admin_footer_text_event", 10, 1 );
    

Just ensure you provide the same callback function name, priority, and number of arguments.

Access Premium WordPress Plugins

Contact Us

If you need any customization or are facing any issues, feel free to reach out to us. Visit our Contact Page.

Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.