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/general-template.php

    r30983 r31168  
    17571757    wp_cache_delete( 'get_calendar', 'calendar' );
    17581758}
    1759 add_action( 'save_post', 'delete_get_calendar_cache' );
    1760 add_action( 'delete_post', 'delete_get_calendar_cache' );
    1761 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
    1762 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
    17631759
    17641760/**
Note: See TracChangeset for help on using the changeset viewer.