Making WordPress.org

Changeset 5734


Ignore:
Timestamp:
08/02/2017 01:23:10 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: After [5729], replace bbp_is_topic_public() check with in_array(), as the function doesn't exist in bbPress 2.5.x.

See #2795.

File:
1 edited

Legend:

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

    r5732 r5734  
    396396
    397397                // Remove 'Stick' link for reviews or non-public topics.
    398                 if ( Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $post_id ) || ! bbp_is_topic_public( $post_id ) ) {
     398                if (
     399                        Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $post_id )
     400                ||
     401                        ! in_array( get_post_status( $post_id ), array( 'publish', 'closed' ) )
     402                ) {
    399403                        unset( $r['stick'] );
    400404                }
     
    421425
    422426                // Remove 'Stick' link for reviews or non-public topics.
    423                 if ( Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $post->ID ) || ! bbp_is_topic_public( $post->ID ) ) {
     427                if (
     428                        Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $post->ID )
     429                ||
     430                        ! in_array( get_post_status( $post->ID ), array( 'publish', 'closed' ) )
     431                ) {
    424432                        unset( $actions['stick'] );
    425433                }
Note: See TracChangeset for help on using the changeset viewer.