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

    r30105 r31168  
    162162    return $qvs;
    163163}
    164 add_filter( 'request', '_post_format_request' );
    165164
    166165/**
     
    181180    }
    182181}
    183 add_filter( 'term_link', '_post_format_link', 10, 3 );
    184182
    185183/**
     
    195193    return $term;
    196194}
    197 add_filter( 'get_post_format', '_post_format_get_term' );
    198195
    199196/**
     
    219216    return $terms;
    220217}
    221 add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );
    222218
    223219/**
     
    235231    return $terms;
    236232}
    237 add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' );
Note: See TracChangeset for help on using the changeset viewer.