[wp-trac] [WordPress Trac] #30947: wp-includes files should not contain hooks

WordPress Trac noreply at wordpress.org
Mon Jan 19 10:27:37 UTC 2015


#30947: wp-includes files should not contain hooks
-----------------------------------+-----------------------
 Reporter:  wonderboymusic         |       Owner:
     Type:  enhancement            |      Status:  reopened
 Priority:  normal                 |   Milestone:  4.2
Component:  General                |     Version:  trunk
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------
Changes (by bobbingwide):

 * keywords:  has-patch => has-patch 2nd-opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 -1.

 I think there may be a problem with the changes to update.php
 since the code no longer takes into account this test that preceded the
 logic to add the actions.

 {{{
 if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined(
 'DOING_AJAX' ) && DOING_AJAX ) ) {
         return;
 }
 }}}

 Question: What happens during AJAX processing for 'init'... will
 wp_schedule_update_checks() get invoked?

 Answer: Yes, wp_schedule_update_checks will be run.
 For instance. When you're editing a post and a heartbeat request is sent
 then this function is invoked.

 Question: Will it work properly on multisite?
 Answer: No.


 Also... what's left at the bottom of the file is now rather unnecessary!

 This is an unintended functional change.

 I believe you'll need to revert the change to /wp-includes/update.php

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30947#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list