[wp-hackers] Useless Filter
yahgrp at poplarware.com
Tue Feb 17 17:29:09 GMT 2009
In answer to your question at the end of your post: You are missing
something. There are some plugins that need to filter titles in a way
that only depends on the text.
If you are interested, one example is multi-lingual plugins. When you
edit a post, you type something like this in for the post title:
[lang_en]Title in English[/lang_en][lang_es]Titulo en Español[/lang_es]
But when the blog is being viewed, you only display either English or
Spanish, depending on URL, cookies, etc. That is done with a
'the_title' filter, which decides on the language and spits out just
one part of that text. Independent of post ID, where it is being used,
I'm not saying you shouldn't advocate adding some more information to
'the_title', but the current usage is NOT useless.
Nathan Rice wrote:
> So last night I was trying to build a plugin when I ran across this code in
> $output .= $indent . '<li class="' . $css_class . '"><a href="' .
> get_page_link($page->ID) . '" title="' .
> attribute_escape(apply_filters('the_title', $page->post_title)) . '">' .
> $link_before . apply_filters('the_title', $page->post_title) . $link_after .
> Am I missing something, or am I right in thinking that the use of this
> filter here is completely non-existent?
Jennifer Hodgdon * Poplar ProductivityWare
Drupal/WordPress Sites, Themes, Modules/Plugins
Custom Web Programming, Web Databases
More information about the wp-hackers