Changeset 9850
- Timestamp:
- 05/12/2020 05:46:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r9848 r9850 16 16 add_filter( 'bbp_map_meta_caps', array( $this, 'disallow_editing_past_lock_time' ), 10, 4 ); 17 17 add_filter( 'redirect_canonical', array( $this, 'disable_redirect_guess_404_permalink' ) ); 18 add_filter( 'redirect_canonical', array( $this, 'handle_bbpress_root_pages' ), 10, 2 ); 18 19 add_filter( 'old_slug_redirect_post_id', array( $this, 'disable_wp_old_slug_redirect' ) ); 19 20 add_action( 'template_redirect', array( $this, 'redirect_update_php_page' ) ); … … 241 242 // Avoid redirecting the old slug of "Update PHP" page to a forum topic. 242 243 if ( is_404() && 'upgrade-php' === get_query_var( 'pagename' ) ) { 244 $redirect_url = false; 245 } 246 247 return $redirect_url; 248 } 249 250 /** 251 * Prevent a redirect for some base bbPress pages to random topics. 252 */ 253 public function handle_bbpress_root_pages( $redirect_url, $requested_url ) { 254 $url = str_replace( home_url('/'), '', $requested_url ); 255 256 if ( $url && preg_match( '!^(topic|topic-[^/]+|reply|users|view)(/[?]|/?$)!i', $url ) ) { 243 257 $redirect_url = false; 244 258 } … … 1186 1200 * Alter the bbPress topic freshness links to use the date in the title attribute rather than thread title. 1187 1201 */ 1188 function bbp_get_topic_freshness_link( $anchor, $topic_id, $time_since, $link_url, $title ) {1202 public function bbp_get_topic_freshness_link( $anchor, $topic_id, $time_since, $link_url, $title ) { 1189 1203 1190 1204 // Copy-paste from bbp_get_topic_last_active_time() which only returns humanized times.
Note: See TracChangeset
for help on using the changeset viewer.