Make WordPress Core


Ignore:
Timestamp:
01/12/2015 04:39:39 PM (10 years ago)
Author:
wonderboymusic
Message:

There are some random add_action() and add_filter() calls littered around some files in wp-includes/. These should be moved to wp-includes/default-filters.php with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even SHORTINIT - a lot of the hooks registered won't run anyways (that's already the case).

See #30947.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/canonical.php

    r30681 r31168  
    554554}
    555555
    556 add_action('template_redirect', 'redirect_canonical');
    557 
    558556function wp_redirect_admin_locations() {
    559557    global $wp_rewrite;
     
    583581    }
    584582}
    585 
    586 add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
Note: See TracChangeset for help on using the changeset viewer.