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/post.php

    r31132 r31168  
    165165    ) );
    166166}
    167 add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
    168167
    169168/**
     
    17151714    }
    17161715}
    1717 add_action( 'admin_menu', '_add_post_type_submenus' );
    17181716
    17191717/**
     
    27142712    unstick_post( $post->ID );
    27152713}
    2716 add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );
    2717 add_action( 'wp_trash_post',      '_reset_front_page_settings_for_post' );
    27182714
    27192715/**
Note: See TracChangeset for help on using the changeset viewer.