Making WordPress.org

Changeset 14550


Ignore:
Timestamp:
10/10/2025 05:27:39 AM (2 months ago)
Author:
dd32
Message:

Support Forums: Add a notice to the 'You can't reply to this' notice suggesting it may be because their account is flagged as a company account.

See #7925.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/bbpress
Files:
2 edited

Legend:

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

    r13530 r14550  
    3030
    3131                    <div class="bbp-template-notice">
    32                         <ul>
    33                             <li><?php esc_html_e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to reply.', 'wporg-forums' ); ?></li>
    34                         </ul>
     32                        <p><?php esc_html_e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to reply.', 'wporg-forums' ); ?></p>
    3533                    </div>
    3634
     
    4038
    4139                    <div class="bbp-template-notice">
    42                         <ul>
    43                             <li><?php
    44                                 printf(
    45                                     /* translators: %s: forum title */
    46                                     esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies, however your posting capabilities still allow you to post.', 'wporg-forums' ),
    47                                     bbp_get_forum_title( bbp_get_topic_forum_id() )
    48                                 );
    49                             ?></li>
    50                         </ul>
     40                        <p><?php
     41                            printf(
     42                                /* translators: %s: forum title */
     43                                esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies, however your posting capabilities still allow you to post.', 'wporg-forums' ),
     44                                bbp_get_forum_title( bbp_get_topic_forum_id() )
     45                            );
     46                        ?></p>
    5147                    </div>
    5248
     
    5652
    5753                    <div class="bbp-template-notice">
    58                         <ul>
    59                             <li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'wporg-forums' ); ?></li>
    60                         </ul>
     54                        <p><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'wporg-forums' ); ?></p>
    6155                    </div>
    6256
     
    200194    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    201195        <div class="bbp-template-notice">
    202             <ul>
    203                 <li><?php printf( esc_html__( 'The topic &#8216;%s&#8217; is closed to new replies.', 'wporg-forums' ), bbp_get_topic_title() ); ?></li>
    204             </ul>
     196            <p><?php printf( esc_html__( 'The topic &#8216;%s&#8217; is closed to new replies.', 'wporg-forums' ), bbp_get_topic_title() ); ?></p>
    205197        </div>
    206198    </div>
     
    210202    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    211203        <div class="bbp-template-notice">
    212             <ul>
    213                 <li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'wporg-forums' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li>
    214             </ul>
     204            <p><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'wporg-forums' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p>
    215205        </div>
    216206    </div>
     
    220210    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    221211        <div class="bbp-template-notice">
    222             <ul>
    223                 <?php if ( wporg_support_is_single_review() ) : ?>
    224 
    225                     <?php if ( is_user_logged_in() ) : ?>
    226                         <li><?php esc_html_e( 'You cannot reply to this review.', 'wporg-forums' ); ?></li>
    227                     <?php else : ?>
    228                         <li><?php printf( __( 'You must be <a href="%s">logged in</a> to reply to this review.', 'wporg-forums' ), wp_login_url() ); ?></li>
    229                     <?php endif; ?>
    230 
    231                 <?php else : ?>
    232 
    233                     <?php if ( is_user_logged_in() ) : ?>
    234                         <li><?php esc_html_e( 'You cannot reply to this topic.', 'wporg-forums' ); ?></li>
    235                     <?php else : ?>
    236                         <li><?php printf( __( 'You must be <a href="%s">logged in</a> to reply to this topic.', 'wporg-forums' ), wp_login_url() ); ?></li>
    237                     <?php endif; ?>
    238 
    239                 <?php endif; ?>
    240             </ul>
     212            <p><?php
     213                if ( wporg_support_is_single_review() ) {
     214                    if ( is_user_logged_in() ) {
     215                        esc_html_e( 'You cannot reply to this review.', 'wporg-forums' );
     216                    } else {
     217                        printf( __( 'You must be <a href="%s">logged in</a> to reply to this review.', 'wporg-forums' ), wp_login_url() );
     218                    }
     219                } else {
     220                    if ( is_user_logged_in() ) {
     221                        esc_html_e( 'You cannot reply to this topic.', 'wporg-forums' );
     222                    } else {
     223                        printf( __( 'You must be <a href="%s">logged in</a> to reply to this topic.', 'wporg-forums' ), wp_login_url() );
     224                    }
     225                }
     226            ?></p>
     227            <?php if ( current_user_can( bbp_get_spectator_role() ) && ! bbp_is_topic_closed() && ! bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?>
     228                <p><?php
     229                    printf(
     230                        __( 'This may be caused by your account being marked as a brand or shared company account.', 'wporg-forums' ) . '<br>' .
     231                        /* translators: %s: Link to https://make.wordpress.org/support/2025/03/about-the-spectator-role-in-the-wordpress-support-forums/ */
     232                        __( '<a href="%s">Please read this announcement</a> for more information.', 'wporg-forums' ) . '<br>' .
     233                        /* translators: %s: Email address. */
     234                        __( 'If you believe this to be in error, please contact the forum moderation team via <code>%s</code>.', 'wporg-forums' ),
     235                        'https://make.wordpress.org/support/2025/03/about-the-spectator-role-in-the-wordpress-support-forums/',
     236                        WordPressdotorg\Forums\MODERATION_EMAIL
     237                    );
     238                ?></p>
     239            <?php endif; ?>
    241240        </div>
    242241    </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/bbpress/form-topic.php

    r14323 r14550  
    266266        <div class="bbp-template-notice">
    267267            <p><?php _e( 'You cannot create new topics at this time.', 'wporg-forums' ); ?></p>
     268            <?php if ( current_user_can( bbp_get_spectator_role() ) ) : ?>
     269                <p><?php
     270                    printf(
     271                        __( 'This may be caused by your account being marked as a brand or shared company account.', 'wporg-forums' ) . '<br>' .
     272                        /* translators: %s: Link to https://make.wordpress.org/support/2025/03/about-the-spectator-role-in-the-wordpress-support-forums/ */
     273                        __( '<a href="%s">Please read this announcement</a> for more information.', 'wporg-forums' ) . '<br>' .
     274                        /* translators: %s: Email address. */
     275                        __( 'If you believe this to be in error, please contact the forum moderation team via <code>%s</code>.', 'wporg-forums' ),
     276                        'https://make.wordpress.org/support/2025/03/about-the-spectator-role-in-the-wordpress-support-forums/',
     277                        WordPressdotorg\Forums\MODERATION_EMAIL
     278                    );
     279                ?></p>
     280            <?php endif; ?>
    268281        </div>
    269282    </div>
Note: See TracChangeset for help on using the changeset viewer.