Making WordPress.org

Changeset 14552


Ignore:
Timestamp:
10/10/2025 06:18:31 AM (5 weeks ago)
Author:
dd32
Message:

Support Forums: Don't link to hidden forums in the topic metadata.

This is primarily topics in Plugin/Themes/Reviews.

Fixes #8084.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php

    r14316 r14552  
    14861486    }
    14871487
    1488     ?>
    1489 
    1490     <li class="topic-forum"><?php
    1491         /* translators: %s: forum title */
    1492         printf( __( 'In: %s', 'wporg-forums' ),
     1488    $forum_hidden = false;
     1489    if ( class_exists( 'WordPressdotorg\Forums\Support_Compat' ) ) {
     1490        $forum_hidden = in_array( bbp_get_topic_forum_id(), WordPressdotorg\Forums\Support_Compat::HIDDEN_FORUMS, true );
     1491    }
     1492
     1493    if ( ! $forum_hidden ) {
     1494        echo '<li class="topic-forum">';
     1495        printf(
     1496            /* translators: %s: forum title */
     1497            __( 'In: %s', 'wporg-forums' ),
    14931498            sprintf( '<a href="%s">%s</a>',
    14941499                esc_url( bbp_get_forum_permalink( bbp_get_topic_forum_id() ) ),
     
    14961501            )
    14971502        );
    1498     ?></li>
     1503        echo '</li>';
     1504    }
     1505
     1506    ?>
    14991507    <?php if ( !empty( $reply_count ) ) : ?>
    15001508        <li class="reply-count"><?php echo $reply_count; ?></li>
Note: See TracChangeset for help on using the changeset viewer.