Make WordPress Core


Ignore:
Timestamp:
01/12/2015 04:39:39 PM (9 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/admin-bar.php

    r30598 r31168  
    4545    return true;
    4646}
    47 // Don't remove. Wrong way to disable.
    48 add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
    49 add_action( 'admin_init', '_wp_admin_bar_init' );
    5047
    5148/**
     
    9390    do_action( 'wp_after_admin_bar_render' );
    9491}
    95 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
    96 add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    9792
    9893/**
Note: See TracChangeset for help on using the changeset viewer.