WordPress.org

Make WordPress Core


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

    r31032 r31168  
    10521052    }
    10531053}
    1054 
    1055 add_action( 'wp_default_scripts', 'wp_default_scripts' );
    1056 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
    1057 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
    1058 
    1059 add_action( 'wp_default_styles', 'wp_default_styles' );
    1060 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.