[wp-hackers] 'option_update_plugins' filter won't run
Ryan Boren
ryan at boren.nu
Fri Feb 13 00:04:31 GMT 2009
On Tue, Feb 10, 2009 at 7:33 PM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
>
> On Feb 10, 2009, at 12:32 AM, Ryan Boren wrote:
>> Transients have transient_* filters that behave the same as option_*.
>> Hook your function to both option_update_plugins and
>> transient_update_plugins. option_update_plugins will be run for 2.7
>> and earlier. transient_update_plugins will be run for 2.8.
>
> I'm not using any cache plugins. Actually, I added an error_log() to the
> actual get_option() function, so the log excerpt above shows the actual
> get_option() function being run. The function is running, and calling the
> 'update_plugins' settings, but the 'option_update_plugins' filter is
> apparently not firing. The code is pretty straightforward -- I can't
> imagine why it isn't working.
>
> Any other idea?
>
> Thanks,
> Steve
>
> P.S. -- When I get it working, I'll be sure to hook transient_update_plugins
> as well. :)
I was wrong. A caching plugin does not need to be installed to get the
new behavior. 2.8 currently requires using transient_update_plugins.
The option in the DB is now called _transient_update_plugins and the
filter called _option__transient_update_plugins. I'll look into
adding some back-compat, but for now transient_update_plugins can be
used.
More information about the wp-hackers
mailing list