Delete the update informations

Table of contents
Several people contribute to the writing of your publications? You have created a Wordpress environment where contributors can enter content? You would like this environment does not display Wordpress updates or plugin updates?

Introduction

When you share a WordPress environment with contributors, subscribers, authors or any other role that a user may inherit, you would not only want to remove certain rights, such as administrator rights or simplify the user interface, but also to remove all information about WordPress updates or plugins that pollute without really being useful to them.

Make it simple…without plugin

This can be done with plugins like White Label CMS. Now, if it’s just a matter of removing the update info, it might be better to do it with a few lines of code in PHP.

My method is as follows

// hide update notifications
function remove_core_updates() {
  global $wp_version;
  return(object) array(
    'last_checked'=> time(),
    'version_checked'=> $wp_version
  );
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');

These few lines of code allow you to remove the last update check as well as the latest version of WordPress.

We apply this code to 3 filters, the WordPress core update, the plugins update and the themes update.

Of course, you can display the information only for the administrator by filtering roles.

if (current_user_can('administrator') {
  code...
}
Table of contents
Also to be consulted

The Prism library

SEO and URL rewriting

Working with dates

Printing a PDF

Design of the website

The modal windows and the connection system

The plugins used on Fuyens.ch

Create an App for Azure (part 4)

Multilingual website

Create an App for Azure (part 2)

Also to be consulted

How to add the ReCaptcha (without plugin)

The Prism library

Printing a PDF

Capture a geographic map

Registration

To register, please fill in the fields below

Forgot your password ?

You will receive a message with a link allowing you to renew your password

Password update

Please enter your old password
as well as a new one and confirm it

Login