[wp-trac] [WordPress Trac] #4893: Audit of all filter and action
names.
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 2 20:22:27 GMT 2007
#4893: Audit of all filter and action names.
---------------------+------------------------------------------------------
Reporter: westi | Owner: westi
Type: task | Status: new
Priority: normal | Milestone: 2.4 (next)
Component: General | Version:
Severity: normal | Keywords:
---------------------+------------------------------------------------------
I think for 2.4 we should do an early audit of all the filters and actions
in the core and ensure that they follow the following set of rules:
1. All names should be unique
1. All names should be relevant to the calling context
1. All filters should pass in relevant context information
This should then ensure plugins can easily filter just the things they
want to.
This is to avoid messes like {{{the_title}}}
{{{
./wp-includes/post-template.php: return apply_filters( 'the_title',
$title );
./wp-includes/comment.php: $post_title = apply_filters('the_title',
$post->post_title);
./wp-includes/classes.php: $output .= $indent . '<li class="'
. $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' .
att
ribute_escape(apply_filters('the_title', $page->post_title)) . '">' .
apply_filters('the_title', $page->post_title) . '</a>';
./wp-includes/deprecated.php: $string .=
apply_filters('the_title', $post->post_title, $post);
./wp-includes/deprecated.php: $string .=
apply_filters('the_title', $post->post_title, $nextpost);
./wp-includes/link-template.php: $title =
apply_filters('the_title', $post->post_title, $post);
./wp-includes/link-template.php: $title =
apply_filters('the_title', $post->post_title, $post);
./wp-includes/general-template.php:
$text = strip_tags(apply_filters('the_title', $arc_title));
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/4893>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list