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.

Built from https://develop.svn.wordpress.org/trunk@31168


git-svn-id: http://core.svn.wordpress.org/trunk@31149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2015-01-12 16:40:23 +00:00
parent b51593763a
commit fc843ce4d0
18 changed files with 95 additions and 74 deletions

View File

@@ -161,7 +161,6 @@ function _post_format_request( $qvs ) {
$qvs['post_type'] = $tax->object_type;
return $qvs;
}
add_filter( 'request', '_post_format_request' );
/**
* Filters the post format term link to remove the format prefix.
@@ -180,7 +179,6 @@ function _post_format_link( $link, $term, $taxonomy ) {
return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
}
}
add_filter( 'term_link', '_post_format_link', 10, 3 );
/**
* Remove the post format prefix from the name property of the term object created by get_term().
@@ -194,7 +192,6 @@ function _post_format_get_term( $term ) {
}
return $term;
}
add_filter( 'get_post_format', '_post_format_get_term' );
/**
* Remove the post format prefix from the name property of the term objects created by get_terms().
@@ -218,7 +215,6 @@ function _post_format_get_terms( $terms, $taxonomies, $args ) {
}
return $terms;
}
add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );
/**
* Remove the post format prefix from the name property of the term objects created by wp_get_object_terms().
@@ -234,4 +230,3 @@ function _post_format_wp_get_object_terms( $terms ) {
}
return $terms;
}
add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' );