Changeset 8213
- Timestamp:
- 02/07/2019 06:59:25 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php
r7243 r8213 59 59 // Remove new topic form at the bottom of reviews forum. 60 60 add_filter( 'bbp_get_template_part', array( $this, 'noop_reviews_forum_form_topic' ), 10, 3 ); 61 62 // Tell WordPress not to 404 (before bbPress overrides it) so that Canonical can do it's job. 63 add_filter( 'pre_handle_404', array( $this, 'abort_wp_handle_404' ) ); 61 64 } 62 65 } … … 394 397 || 395 398 ( ! empty( $this->contributors ) && in_array( $user->user_nicename, $this->contributors ) ) 396 || 399 || 397 400 ( ! empty( $this->support_reps ) && in_array( $user->user_nicename, $this->support_reps ) ) 398 || 401 || 399 402 // Back-compat for support reps added before https://meta.trac.wordpress.org/changeset/5867, 400 403 // can be removed once they are re-added via the Plugin Directory UI. … … 705 708 706 709 /** 710 * Filter WP::handle_404() to not run on compat views, so as to allow Canonical to properly handle the request. 711 */ 712 public function abort_wp_handle_404( $handled ) { 713 if ( $this->slug() ) { 714 // We've matched a term, so WordPress shouldn't 404 this request. 715 $handled = true; 716 } 717 718 return $handled; 719 } 720 721 722 /** 707 723 * Add a subscribe/unsubscribe link to the compat views. 708 724 */ … … 899 915 FROM {$prefix}terms AS t 900 916 LEFT JOIN {$prefix}term_taxonomy AS tt ON tt.term_id = t.term_id 901 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 917 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 902 918 WHERE tt.taxonomy = 'plugin_committers' AND tr.object_id = %d", 903 919 $plugin->ID … … 934 950 FROM {$prefix}terms AS t 935 951 LEFT JOIN {$prefix}term_taxonomy AS tt ON tt.term_id = t.term_id 936 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 952 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 937 953 WHERE tt.taxonomy = 'plugin_contributors' AND tr.object_id = %d", 938 954 $plugin->ID … … 968 984 FROM {$prefix}terms AS t 969 985 LEFT JOIN {$prefix}term_taxonomy AS tt ON tt.term_id = t.term_id 970 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 986 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 971 987 WHERE tt.taxonomy = 'plugin_support_reps' AND tr.object_id = %d", 972 988 $plugin->ID
Note: See TracChangeset
for help on using the changeset viewer.