[wp-trac] [WordPress Trac] #31011: WP 4.1 checks for updates with every load of any admin page
WordPress Trac
noreply at wordpress.org
Mon Jan 26 12:37:02 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 Review
Component: Administration | Version: 4.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by Grezvany13):
I currently have the same problem, just under different circumstances.
For a local test I created a vagrant box and did a clean install of WP
4.1, and the first thing I see is a PHP warning (due WP_DEBUG is true)
about not able to connect to wordpress.org. The reason in this case is
simple; my vagrant box doesn't allow any outgoing internet connections.
Since I figured this was related to the auto update functionality of the
WP core, I added the following filters in a mu-plugin:
{{{
add_filter( 'automatic_updater_disabled', '__return_true' );
add_filter( 'auto_update_core', '__return_false' );
add_filter( 'auto_update_plugin', '__return_false' );
add_filter( 'auto_update_theme', '__return_false' );
add_filter( 'auto_update_translation', '__return_false' );
}}}
Which obviously doesn't work, since the auto_update_* filters are called
after checking for new versions.
Suggestions:
1) When the auto_update_* filters are set, obey them before checking for
updates. The user already knows the risk of not updating automatically, so
no need to check for updates either.
2) Add additional filters or definitions which check if any check should
be done for possible updates. Filters like "check_update_*" would be
sufficient in my eyes.
3) Instead of giving a PHP Warning (which it isn't, since it not a problem
with the code), giving a admin notice in wp-admin would be desirable since
right now it breaks the site with WP_DEBUG enabled.
Personally I would take option 2 and 3.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31011#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list