Changeset 12895
- Timestamp:
- 09/18/2023 10:14:23 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r12860 r12895 24 24 add_action( 'wp_print_footer_scripts', array( $this, 'replace_quicktags_blockquote_button' ) ); 25 25 add_filter( 'bbp_show_user_profile', array( $this, 'allow_mods_to_view_inactive_users' ), 10, 2 ); 26 add_action( 'init', array( $this, 'add_rewrite_rules' ) ); 27 26 28 27 29 // Add bbPress support to the WordPress.org SEO plugin. … … 250 252 251 253 return $filter_value; 254 } 255 256 /** 257 * Add rewrite rules. 258 * 259 * This function needs to live in this file, so that it's ran no matter what theme is dynamically activated by 260 * the `template` / `stylesheet` callbacks above. 261 */ 262 function add_rewrite_rules() { 263 if ( ! function_exists( 'bbp_get_user_slug' ) ) { 264 return; 265 } 266 267 // e.g., https://wordpress.org/support/users/foo/edit/account/ 268 add_rewrite_rule( 269 bbp_get_user_slug() . '/([^/]+)/' . bbp_get_edit_slug() . '/account/?$', 270 'index.php?' . bbp_get_user_rewrite_id() . '=$matches[1]&edit_account=1', 271 'top' 272 ); 252 273 } 253 274
Note: See TracChangeset
for help on using the changeset viewer.