The Wordpress admin backend displays the following footer text for each page of the admin panel: 'Thank you for creating with Wordpress'.
What is the cleanest way to update this text for a particular plugin page only ?
Currently I have added a filter for the 'admin_footer_text' hook, however, this has the effect of updating all page footers on the backend, not just those specific to my plugin.
Is it a case of using the 'admin_footer_text' hook, and adding some conditional checking around which admin panel page is being called? Or is there a cleaner, more direct hook I should be using?
The Wordpress admin backend displays the following footer text for each page of the admin panel: 'Thank you for creating with Wordpress'.
What is the cleanest way to update this text for a particular plugin page only ?
Currently I have added a filter for the 'admin_footer_text' hook, however, this has the effect of updating all page footers on the backend, not just those specific to my plugin.
Is it a case of using the 'admin_footer_text' hook, and adding some conditional checking around which admin panel page is being called? Or is there a cleaner, more direct hook I should be using?
Share Improve this question edited Dec 15, 2018 at 14:56 Scratcha asked Dec 15, 2018 at 14:35 ScratchaScratcha 1152 silver badges7 bronze badges 4- Should everybody guess the plugin name? – Max Yudin Commented Dec 15, 2018 at 14:45
- I don't see how the particular plugin name is relevant to the question ? – Scratcha Commented Dec 15, 2018 at 14:53
- May be it has a hook to modify it's footer. Now content yourself with generic code. – Max Yudin Commented Dec 15, 2018 at 14:59
- It's my own custom plugin... – Scratcha Commented Dec 15, 2018 at 18:41
1 Answer
Reset to default 1<?php
// check the plugin admin page
if( is_admin() && isset( $_GET['page'] ) && 'PLUGIN-NAME' == $_GET['page'] ) {
// replace the footer with empty string
add_filter( 'admin_footer_text', '__return_empty_string' );
}