[wp-hackers] 'option_update_plugins' filter won't run

Stephen Rider wp-hackers at striderweb.com
Tue Feb 10 05:56:14 GMT 2009


I'm working on a third-party plugin version checker.

I'm trying to add a filter to the 'update_plugins' setting when it is  
called by get_option().  (simplified code follows)

function add_filters() {
	error_log( 'running add_filters()' );
	add_filter( 'option_update_plugins', 'filter_update_plugins' );
}

In my PHP logs, I see that add_filters is called, and then  
get_option('update_plugins') is called multiple times, but  
filter_update_plugins() never runs.  It should be running in the  
course of every run of get_option('update_plugins')

I've done similar filters, including one on  
'pre_update_option_update_plugins', and that runs just fine.

Logs give me:

running add_filters()
get_option('update_plugins')
get_option('update_plugins')
get_option('update_plugins')
get_option('update_plugins')

Any idea why this doesn't work?  I'm running WP 2.8 bleeding.

Stephen

-- 
Stephen Rider
http://striderweb.com/






More information about the wp-hackers mailing list