xxsimoxx/codepotent-update-manager

PHP_INT_MAX used in admin_footer_text

xxsimoxx opened this issue ยท 5 comments

Description

Here you are changing the default tagline for the whole menu with PHP_INT_MAX priority, but it also affects plugin (like mine) adding a submenu page to that menu.

Expected Behavior

A plugin can change this using a higher priority than your.

What you have described is the expected behavior. The use of PHP_INT_MAX is used here to ensure that no other plugins can override the footer text on the Update Manager's pages. By inserting your item into the Update Manager menu, the added page is automatically counted as an Update Manager page and it gets the Update Manager footer text. If you'd like to introduce a custom footer text, you'll have to break your item out of the menu and into it's own spot, maybe under Tools or Settings or Plugins.

Ok, I've just a question about this.

If you'd like to introduce a custom footer text

For me is OK leaving statistics page under the Update Manager menu and leaving there your footer. Is it OK for you?

Yes, it's absolutely fine to place the item under the Update Manager menu...that's where it makes the most sense. I just wanted to communicate that the PHP_INT_MAX was used for the admin footer text priority for an actual reason. ๐Ÿ˜„ When a plugin has a lot of extensions, having each developer change the footer text just starts to get messy. If you want to place branding or info about your extension in there, I recommend using a metabox (on your own page's view only) on the right-hand side of the page. This is how many plugins/extensions do it. Here's a quick render of the Syntax Highlighter plugin I'm working on that shows such a box.

Looks like I forgot to include the screenshot.

image

Yes :-)
But the idea was clear, thank you!
I think I will add after 1.0.0, I prefer to finish WP-CLI first.