Two plugins using the_title; one not passing second param.

I have this issue in some of my own plugins, and it’s an easy fix. Basically, I label this a “lazy developer” issue. It’s a matter of someone adding a filter but not taking optional parameters into account. Step 1 – Edit the plugin file The code that’s breaking starts around line 639 (according to … Read more

Is there any plugin which can paste a common content to my every post?

Actually you don’t need a plugin to do this. Just add a simple function to your functions.php file: function my_content($content) { $content=”My content before post” . $content . ‘My content after post’; return $content; } add_filter(‘the_content’,’my_content’); If you don’t want additional content to appear in your feed, use following function: if( !is_feed() ) { function … Read more

publish_post action doesn’t work

It’s never fired since the hook you need is not publish_post but publish_magazine which is actually {$new_status}_{$post_type} hook. So try publish_magazine update: also you don’t need to use get_post since you the hook passes the $post object to the function as a second parameter. take a look at wp_transition_post_status() and if that’s not working then … Read more

Executing jQuery in a plugin

That snippet ‘works’ for me. Is the script being printed at the bottom of the page? More specifically, does your theme call wp_footer. All themes should, but not all themes do call wp_footer which breaks plugins which rely on it. For the record – you should not print scripts directly to the page. WordPress has … Read more

Is Timthumb still broken? What security measures should be taken?

Take a look here: http://ma.tt/2011/08/the-timthumb-saga/ I assume you know who Matt is. Also, Matt mentioned this guy in that link, and he’s got some updates on the issue posted to his site http://markmaunder.com/2011/08/01/zero-day-vulnerability-in-many-wordpress-themes/ The short is, there’s now TimThumb 2.0 which is fixed. It’s available here http://code.google.com/p/timthumb/

How to disable a widget when dependent plugin is inactive?

well first of all, is_plugin_active takes the name of the plugin sub-directory/file, so passing it a classname won’t work. I’m not sure why you’re passing anything widget related if you’re checking for plugins your widget depends on. other options are php’s class_exists and function_exists to check if plugin functions your widget uses exist. check in … Read more