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

    r31102 r31168  
    11571157    add_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 );
    11581158}
    1159 add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );
    11601159
    11611160/**
     
    25962595    $wp_scripts->add_data( 'wp-plupload', 'data', $script );
    25972596}
    2598 add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );
    25992597
    26002598/**
Note: See TracChangeset for help on using the changeset viewer.