$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Updating Wordpress plugin admin panel footer text|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Updating Wordpress plugin admin panel footer text

matteradmin9PV0评论

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
Add a comment  | 

1 Answer 1

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' );

}
Post a comment

comment list (0)

  1. No comments so far