[wp-trac] [WordPress Trac] #31011: WP 4.1 checks for updates with every load of any admin page
WordPress Trac
noreply at wordpress.org
Tue Jan 27 13:41:17 UTC 2015
#31011: WP 4.1 checks for updates with every load of any admin page
-------------------------------------------------+-------------------------
Reporter: hallcp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Administration | Review
Severity: normal | Version: 4.1
Keywords: reporter-feedback has-patch needs- | Resolution:
testing | Focuses:
-------------------------------------------------+-------------------------
Changes (by Grezvany13):
* keywords: reporter-feedback => reporter-feedback has-patch needs-testing
Comment:
To follow up on my previous comment, I created a simple patch
(add_filters.patch) which adds 3 filters and placed them in the wp_*_check
methods.
- check_update_core
- check_update_plugin
- check_update_theme
By default they will return true, however if you don't want to check for
new updates automatically you can add the following 3 lines:
{{{
add_filter( 'check_update_core', '__return_false' ); // don't check for
core updates
add_filter( 'check_update_plugin', '__return_false' ); // don't check
for plugin updates
add_filter( 'check_update_theme', '__return_false' ); // don't check
for theme updates
}}}
It won't break any core functionality if the filters are not in place, and
obviously should only be used when the user knows what he/she is doing,
just like the auto_update_* filters.
I've tested this locally with WordPress 4.1 (clean install from SVN
trunk), and the errors described before don't pop-up, even when the
transients for the updates are reset.
Since this is my first patch (yeee!), I added 'has-patch' and 'needs-
testing', just to be sure :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31011#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list