Support

Home Forums Event Espresso Premium Disable Update Notifications for Eventmanagers

Disable Update Notifications for Eventmanagers

Posted: February 15, 2013 at 4:01 am


Frank Grafenstein

February 15, 2013 at 4:01 am

Trying to disable update notifications for my regional eventmanagers using the following code in theme functions.php failed:

function filter_plugin_updates( $value ) {
if(!current_user_can(‘administrator’)) {
unset( $value->response[‘eventespresso.tmp/espresso.php’] );
return $value;
}
add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ );

How to hide EE-update notifications from non-administrator users?

Thanks
Frank


Dean

February 17, 2013 at 11:34 pm

Hi Frank,

Not sure if what you are trying there will work. The function in question isnt pluggable nor is there an action hook assigned to it.

The best thing I can come up with is a function to add to the themes functions which adds a css rule to the message so if not admin hide

function remove_pu() {
    if(!current_user_can('administrator')) { ?>
        <style>
        #pu_dashboard_message { display:none; }
        </style>
    <?php }
}
add_action('admin_footer', 'remove_pu');

This worked fine with my tests on Event Managers.

The support post ‘Disable Update Notifications for Eventmanagers’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso