[wp-trac] [WordPress Trac] #6481: Fancy permalinks should be enabled on new sites

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 30 19:20:06 GMT 2008


#6481: Fancy permalinks should be enabled on new sites
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous
     Type:  enhancement        |      Status:  new      
 Priority:  normal             |   Milestone:  2.5.1    
Component:  General            |     Version:  2.5      
 Severity:  normal             |    Keywords:           
-------------------------------+--------------------------------------------
 Code to do this:

 {{{
 $permalink_structure = '';
 $cat_base = '';
 $tag_base = '';

 if ( got_mod_rewrite() && is_file(ABSPATH . '.htaccess') &&
 is_writable(ABSPATH . '.htaccess') )
 {
         $permalink_structure = '/%year%/%monthnum%/%day%/%postname%/';
 }

 update_option('permalink_structure', $permalink_structure);
 update_option('category_base', $cat_base);
 update_option('tag_base', $tag_base);

 $wp_rewrite->flush_rules();

 }}}

 The above has been tested by hundreds of users -- this has been built into
 my theme for over two years.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6481>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list