Making WordPress.org


Ignore:
Timestamp:
10/17/2019 02:44:34 PM (5 years ago)
Author:
Otto42
Message:

Support Forums: Limit disabling of old slug redirects to hidden topics, as the function says it does. This overreach prevented proper topic redirections for non-logged in users, such as googlebot. Fixes #4766

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r9170 r9201  
    238238            $hidden_topic = get_post( $post_id );
    239239
    240             if ( $hidden_topic && ! current_user_can( 'read_topic', $hidden_topic->ID ) ) {
     240            if ( $hidden_topic &&
     241                 in_array( $hidden_topic->post_status, array( 'spam', 'pending', 'archived' ) ) &&
     242                 ! current_user_can( 'read_topic', $hidden_topic->ID )
     243               ) {
    241244                $post_id = 0;
    242245            }
Note: See TracChangeset for help on using the changeset viewer.