How can I hide "New version available" banner in the admin page?

Hi there,
is there a way to hide the banner in the admin page when a new YOURLS version is available?
I’m running YOURLS in production, and i’ve noticed there are many version updates lately: I would like to show this info just to the YOURLS admins, hiding it to the other users/contributors (since I’m filtering user roles).
I took a look into the code but I couldn’t find a smart way to easily hook this feature and custom it with a plugin.
Any advice?

Thank you very much!
EC

With a plugin that stops checking for new version, for instance. See GitHub - YOURLS/awesome-yourls: 🎉 A curated list of awesome things related to YOURLS

Hi and thank you for your time :slight_smile:
I tried to run a plugin according to your advice.
I merely tried copy/paste that code into a new YOURLS_DIR/user/plugins/my-plugin/plugin.php file and activated it but it’s not working.
I’m running YOURLS1.8 (tried the same with 1.8.1), php74, CentOS7.9 and everything else is working fine.
I don’t understand why i can’t hook ‘shunt_maybe_check_core_version’: looking at php-logs can’t find neither warnings nor erros about.

Thank you again

Think i’ve found what i needed for:
if < … > {
yourls_add_filter( ‘shunt_option_core_version_checks’, true );
}

The if statement just filters out everyone but the admins according to my global $amp_role_assignment variable.

Thank you very much.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.