Changeset 11164 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/functions.php
- Timestamp:
- 07/30/2021 03:52:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/functions.php
r11159 r11164 86 86 rawurlencode( wp_json_encode( array( 87 87 'userId' => get_current_user_id(), 88 'currentAuthorName' => esc_html( get_the_author_meta( 'display_name' ) ), 88 89 ) ) ), 89 90 ), … … 202 203 203 204 /** 204 * Add the "My Patterns" status rewrites. 205 * This will redirect `my-patterns/draft`, `my-patterns/pending` etc to use the My Patterns page. 205 * Add rewrites needed for nested page navigation. 206 * - `my-patterns/<status>` will render the My Patterns page. 207 * - `favorites/categories/<cat>` will render the Favorites page. 208 * - `author/<username>/categories/<cat>` will render the author archive. 206 209 */ 207 210 function add_rewrite() { 208 211 add_rewrite_rule( '^my-patterns/[^/]+/?$', 'index.php?pagename=my-patterns', 'top' ); 209 212 add_rewrite_rule( '^favorites/.+/?$', 'index.php?pagename=favorites', 'top' ); 213 add_rewrite_endpoint( 'categories', EP_AUTHORS ); 210 214 } 211 215
Note: See TracChangeset
for help on using the changeset viewer.