[wp-hackers] the_alt_title recomendation
Chris Coggburn
Chris at Coggburn.us
Fri Aug 6 01:24:11 UTC 2004
Ryan Boren wrote:
>On Thu, 2004-08-05 at 17:28 -0600, Chris Coggburn wrote:
>
>
>>I believe that the Wordpress developers need to add a function and
>>filter similar to the_title but for use only in the alt tags.
>>For example:
>>
>><a href="http://chris.coggburn.us/archives/2004/08/04/title-images2-plugin/" rel="bookmark" title="permanent link: <img src='titleimages2.php?func=generate&title=stuff' alt='Wordpress Plugin: Title Images2' />">
>> <img src='titleimages2.php?func=generate&title=Stuff' alt='Stuff' />
>></a>
>>
>>That happens when the the_title filter applies html tag to format a title(For example, my Title Images2 plugin).
>>It would be much better to have a seperate tag called the_alt_title() which can have its own filter to format the
>>title in the alt tags. Now, I was talking to masquerade from #wordpress and he mentioned that for PatchDay he made a patch
>>that would add this support Wordpress and he was told it was commited. Where is it? The bug is located at:
>>http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000107
>>Without support for this feature my plugin will require users to modify their template, which I really wish I did not have to do.
>>
>>
>
>Actually, that patch doesn't fix this. It fixes something else.
>
>A separate tag may be in order since we want to strip_tags against the
>alt title but not on the regular title. Or, we could replace all of
>this:
>
><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link:
><?php the_title(); ?>"><?php the_title(); ?></a>
>
>with:
>
><?php post_link(__('Permanent Link: %s')); ?>
>
>And handle the strip_tags in there. For those who want to fix this in
>their existing templates, change it to:
>
><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link:
><?php the_title(); ?>"><?php strip_tags(the_title()); ?></a>
>
>
>
What I was saying is to not strip tags but to allow plugins to modify
both the permalink text and the actual title code though filters. If you
give both a filter it would make things alot nicer for plugins that
modify the title of a post.
>Something to think upon.
>
>Ryan
>
>
>_______________________________________________
>hackers mailing list
>hackers at wordpress.org
>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
--
Chris Coggburn
http://noderat.com
http://chris.coggburn.us
http://beyonddigital.net
More information about the hackers
mailing list