[wp-hackers] Please help diagnose custom post type permalinkproblem

Philip M. Hofer (Frumph) philip at frumph.net
Sun Dec 12 16:30:22 UTC 2010


To clarify by example:

register_activation_hook( __FILE__, 'ceo_flush_rewrite' );
register_deactivation_hook( __FILE__, 'ceo_flush_rewrite' );

function ceo_flush_rewrite() {
 global $wp_rewrite;
 $wp_rewrite->flush_rules();
}


----- Original Message ----- 
From: "Andrew Nacin" <wp at andrewnacin.com>
To: <wp-hackers at lists.automattic.com>
Sent: Saturday, December 11, 2010 9:48 PM
Subject: Re: [wp-hackers] Please help diagnose custom post type 
permalinkproblem


> On Sat, Dec 11, 2010 at 8:26 PM, David F. Carr 
> <david at carrcommunications.com
>> wrote:
>
>> I include add_action('admin_init', 'flush_rewrite_rules'); to regenerate
>> the
>> rewrite rules whenever a user is logged in.
>
>
> Please don't do that. :-( On plugin activation only.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 




More information about the wp-hackers mailing list