WordPress.org

Make WordPress Core

Changes between Version 4 and Version 5 of Ticket #17276, comment 5


Ignore:
Timestamp:
05/01/2011 09:28:52 AM (7 years ago)
Author:
squeeky
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17276, comment 5

    v4 v5  
    11- on "automatically flush rewrite rules" :
    2 post types do not need to be stored persistently to alleviate the need to visit "Settings" > "Permalinks" after registering a new custom post type - I did a quick test - in wp-includes/post.php I inserted :
     2post types do not need to be stored persistently to alleviate the need to visit "Settings" > "Permalinks" after registering a new custom post type - I did a quick test - in wp-includes/post.php within the "function register_post_type" I merely dropped (inserted) the following line :
    33
    44{{{
    5 $wp_rewrite->flush_rules(false);
     5                $wp_rewrite->flush_rules(false);
    66}}}
    77
    8 between line 1003 and line 1004 - so it now is :
     8between lines 1003 and 1004 - so it now is :
    99
    1010{{{
     
    1414}}}
    1515
    16 i just did this now / without much thought / but that single line there now makes it so that there is no need to visit "Settings" > "Permalinks" after registering a new custom post type - i'm sure some of you who know wordpress inside-out could figure out an even better way to do this - and i SUSPECT something like this for registering taxonomies might be good too (i don't know / i didn't test that yet)
     16i just did this / without much thought / but that single line there now makes it so that there is no need to visit "Settings" > "Permalinks" after registering a new custom post type - i'm sure some of you who know wordpress inside-out could figure out an even better way to do this - and i SUSPECT something like this for registering taxonomies might be good too (i don't know / i didn't test that yet)
    1717
    1818, , , , , , , , , , , , ,