[wp-hackers] $wp_rewrite->flush_rules() on plugin activation
matt at mattjacob.com
Tue Dec 8 22:52:39 UTC 2009
On Tue, Dec 8, 2009 at 3:49 PM, Austin Matzko <if.website at gmail.com> wrote:
> Yes, you need just to call flush_rules() directly in the callback
> you've attached to register_activation_hook. The problem is that when
> the plugin is activated and activate_[plugin name] is called, "init"
> has already been called. So attaching a callback to it at that point
> will be fruitless.
And what about filtering rewrite_rules_array? I assume that also needs
to be done before flushing the rules.
More information about the wp-hackers