Tagged PHP

Ever since I started using the PXS Mail Form plugin in favor of WP-ContactForm for my contact page, I always had problems with it conflicting with the Markdown plugin. Namely, that it disabled the Markdown formatting, and left me with a pile of rubbish.

At the time I decided to keep Markdown and disabled PXS Mail Form, and my contact page took a vacation, but I finally managed to take some time to look a little deeper. Turns out, it’s pretty obvious. Lines 467 through 472:

~~~ .prettyprint remove_filter(‘the_content’, ‘Markdown’, 6); // [… snipped some …] add_filter(‘the_content’, ‘pxs_callback’, 1);

D'oh. In case that doesn't make sense to you, it's actually taking the `Markdown()` filter *off* and putting its own as priority 1. That's not good. I ended up changing it to:

~~~ .prettyprint
//remove_filter('the_content', 'Markdown', 6);
// [... snipped some ...]
add_filter('the_content', 'pxs_callback', 14);

So now the line removing Markdown() is commented out, and I lowered (so to speak) the priority of pxs_callback() to 14, and it all works great. Just in case someone else runs into this.

I find it highly ironic that PHP’s somewhat infamous safe_mode is listed under “Features” in the PHP manual.

So, I’m quite a reader of Particletree. They’ve got good articles, and it’s a solid read every time a new article pops up in my feed reader. Except when I try to comment, it took about 30 seconds to tell me that, no, I could not comment, because I “didn’t have JavaScript enabled.”

Two things:

  • Maybe make it so it actually does an efficient check? I am definitely running with JavaScript enabled.
  • Maybe give me a link to prove that I’m not a robot, because, you know, those “spam blockers” can fail.

Either way, I tried going through, twice, and both times I got false-flagged without an option to “prove myself.” The article in question was about backing up MySQL databases with PHP, and I just wanted to say that you might want to run the parameters through escapeshellarg(), and that if the host blocked PHP’s ability to run shell commands, that whole escapade wouldn’t work.

In that case, a completely-PHP routine would be needed, but I for one would rather take the easy way out.