[wp-hackers] Center in WP 2.7 with different code in the editor

Andrew Ozz admin at laptoptips.ca
Wed Jan 14 15:18:47 GMT 2009

Stephen Rider wrote:
> If the planet is pulling it from your RSS feed, you might also make a 
> plugin that filters the feed.  Do a preg-replace on the feed content. :)
> Stephen
> On Jan 14, 2009, at 7:20 AM, Mário Gamito wrote:
>> Wp 2.7 TinyMCE center aligns objects with <p style="text-align: center;">
>> And that's fine and what it should be.
>> My problem is that my blog is in the most important Portuguese Planet
>> and it doesn't recognise this code, due to technical complications
>> regarding different blogging platforms and the way their code manage
>> things in a diferent way.

The old hack should still work, but it has to go at the top of the 
wpautop() function in editor.js so it's applied when saving, not when 
loading the post.

However Stephen is right, much better to make a small plugin that would 
filter the_content_rss and the_excerpt_rss and replace it only there. 
Can also replace <em> and <strong> with <i> and <b> if needed.

More information about the wp-hackers mailing list