Update: looks like this should do the trick, but let me know if you notice anything wrong with it:
https://gist.github.com/Garconis/d308efccf02e7376c59eecabb922970b
Hi Jon,
What you have will get you almost there. However, it won’t hide the notes from unauthorized users on this page: /wp-admin/update-core.php. On that page, it renders a partial list of plugins that have updates available. Because there was no hook in WP core that would allow me to add an extra column on that page, I resorted to a JS solution. (You can see the commit where I added that feature here.)
What I can do is add a filter to the plugin that will check whether to hide notes on the updates page. I did a quick test, and it should be pretty straightforward. Will that work for you?
I think that’d be great if you could add that. Thanks!
Hi Jon,
I just released the update (v 1.2.6) that includes a hook so that you can specify which users can see plugin notes. The single hook plugin-notes-plus_hide_notes
will control whether notes are visible on the main plugin page and the plugin updates page (/wp-admin/update-core.php). You can see a usage example in the plugin FAQs.
Thanks for your patience with this!
Jamie
Hey @jamiebergen … I’m just now getting around to testing this out. To test it with barebones code, I’ve implemented this function:
function pnp_hide_notes( $hide_notes ) {
$hide_notes === true;
return $hide_notes;
}
add_filter( 'plugin-notes-plus_hide_notes', 'pnp_hide_notes' );
But the Notes are still showing up. Any tips?
Edit:
Looks like I have to set it to be
$hide_notes = false;
With only a single equal sign. Does that sound right?
Yes, the single equal sign should do it.