Making WordPress.org


Ignore:
Timestamp:
10/09/2019 09:45:31 AM (5 years ago)
Author:
dd32
Message:

Support Forums: Add a robots header for banned users and those who don't have any profile content.

See #4754, #4632, #4714, #4696.

File:
1 edited

Legend:

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

    r9066 r9170  
    373373            // #3955
    374374            $robots = true;
     375        } elseif ( bbp_is_single_user() ) {
     376            // Blocked users are not indexed.
     377            if ( bbpress()->displayed_user && bbpress()->displayed_user->has_cap( 'bbp_blocked' ) ) {
     378                $robots = true;
     379            // Users with no Topics/Replies/Reviews are not indexed.
     380            } elseif (
     381                ! wporg_support_get_user_topics_count() &&
     382                ! bbp_get_user_reply_count_raw() &&
     383                ! wporg_support_get_user_reviews_count()
     384            ) {
     385                $robots = true;
     386            }
    375387        } elseif (
    376388            bbp_is_single_view() &&
Note: See TracChangeset for help on using the changeset viewer.