[wp-hackers] Useless Filter
ncrice at gmail.com
Tue Feb 17 17:35:03 GMT 2009
My mistake guys and gals. The filter isn't useless.
So I'm not missing anything there, though, right? There is no current way
of passing variables into a filter function for that particular instance of
On Tue, Feb 17, 2009 at 12:29 PM, Jennifer Hodgdon <yahgrp at poplarware.com>wrote:
> 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, etc.
> 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
>> $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
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers