Acronym Replacer and Markdown in WordPress
I wanted to use the excellent Acronym Replacer plugin in my WordPress installation. But I also wanted to use the equally excellent Markdown plugin delivered with WordPress 1.2 Beta.
Download, install, activate.
Everything went fine, except for the fact that the feeds were completely broke: The Acronyms were duly replaced, but Markdown didn’t seem to work anymore. Well.
I filed the obligatory bug report on the forums but was quite desperate to find a solution. One thing, however, struck my attention when I peeked into the acronyms.php
file.
add_filter('the_content', 'acronyms', 8 );add_filter('comment_text', 'acronyms', 8 );
Obviously, there seemed to be something that could be some kind of priority. But what kind? Some more diggin’ and functions.php
surfaced with the function definition for add_filter()
function add_filter($tag, $function_to_add, $priority = 10 )
Well, a good start. I changed the priority of the acronyms.php to something bigger than markdown’s standard of 10 and – voilà – it works. Upon further notice, I consider this problem as solved. (Can anyone tell my why a bigger priority actually means less priority?)
So, if you run into the same problem, here’s what the add_filter
statements must look like:
add_filter('the_content', 'acronyms', 12 );add_filter('comment_text', 'acronyms', 12 );