[wp-hackers] Best practice way for a plugin to use WP_Rewrite

Tuna Can tunamaxx at yahoo.com
Wed Nov 11 07:56:17 UTC 2009

Please excuse a noob's first foray into [wp-hackers] but this thread is almost exactly why I signed up in the first place.

I am building a custom theme and including the option of 'taming' TimThumb URLs with a $non_wp_rules rewrite. Half of the problem was solved by Dion's:

add_filter('rewrite_rules_array', array($this, 'InsertRewriteRules'));

....but the rest of the problem lies in the fact that I can't seem to force a $wp_rewrite->flush_rules() when saving theme options. The only way I can get changes to permanently exist in .htaccess is by manually saving the Permalink options.

Is it possible to flush_rules() when saving theme options?

For more history on my question, please see my support topic on the .org forums:




Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now

More information about the wp-hackers mailing list