[buddypress-trac] [BuddyPress Trac] #9061: Rewrite Rules Built Even When Not Needed

buddypress-trac noreply at wordpress.org
Mon Jan 8 20:42:44 UTC 2024


#9061: Rewrite Rules Built Even When Not Needed
-------------------------+------------------------------
 Reporter:  sjregan      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  12.0.0
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by imath):

 If just like it's the case when you register a post type (see:
 https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
 includes/post.php#L1729), we need to set rewrite rules into the
 `WP_Rewrite` object, these are only generated and saved into the database
 when you refresh your permalinks, activate a component or customize BP
 slugs.

 If you look at the WP Code Reference, this is the way to go:
 https://developer.wordpress.org/reference/functions/add_rewrite_rule/

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9061#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list