Making WordPress.org

Changeset 7813


Ignore:
Timestamp:
11/01/2018 07:02:31 AM (7 years ago)
Author:
netweb
Message:

Support Forum: Updated bbPress templates

See #3485.

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

Legend:

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

    r5127 r7813  
    1 <?php if ( ! is_front_page() ) : ?>
     1<?php
     2/**
     3 * Archive Forum Content Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12if ( ! is_front_page() && ! is_archive( 'forum' ) ) : ?>
    213
    314    <?php bbp_breadcrumb(); ?>
     
    1021
    1122    <?php if ( bbp_has_forums() ) : ?>
    12        
    13         <?php if ( is_front_page() ) : ?>
    14             <?php bbp_get_template_part( 'loop',     'forums-homepage'    ); ?>
     23
     24        <?php if ( is_front_page() || is_archive( 'forum' ) ) : ?>
     25            <?php bbp_get_template_part( 'loop', 'forums-homepage' ); ?>
    1526        <?php else : ?>
    16             <?php bbp_get_template_part( 'loop',     'forums'    ); ?>
     27            <?php bbp_get_template_part( 'loop', 'forums' ); ?>
    1728        <?php endif; ?>
    1829
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-archive-topic.php

    r5628 r7813  
     1<?php
     2/**
     3 * Archive Topic Content Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
    18
    2 <?php bbp_breadcrumb(); ?>
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12bbp_breadcrumb(); ?>
    313
    414<?php if ( bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_search() ) : ?>
     
    2737    <?php if ( bbp_has_topics() ) : ?>
    2838
    29         <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     39        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    3040
    31         <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
     41        <?php bbp_get_template_part( 'loop', 'topics' ); ?>
    3242
    33         <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     43        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    3444
    3545    <?php else : ?>
    3646
    37         <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
     47        <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
    3848
    3949    <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-search.php

    r5104 r7813  
     1<?php
     2/**
     3 * Search Content Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
    18
    2 <?php bbp_breadcrumb(); ?>
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12bbp_breadcrumb(); ?>
    313
    414<?php if ( bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_search() ) : ?>
     
    2030    <?php if ( bbp_has_search_results() ) : ?>
    2131
    22          <?php bbp_get_template_part( 'pagination', 'search' ); ?>
     32        <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    2333
    24          <?php bbp_get_template_part( 'loop',      'search' ); ?>
     34        <?php bbp_get_template_part( 'loop', 'search' ); ?>
    2535
    26          <?php bbp_get_template_part( 'pagination', 'search' ); ?>
     36        <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    2737
    2838    <?php elseif ( bbp_get_search_terms() ) : ?>
    2939
    30          <?php bbp_get_template_part( 'feedback',  'no-search' ); ?>
     40        <?php bbp_get_template_part( 'feedback', 'no-search' ); ?>
    3141
    3242    <?php else : ?>
    3343
    34         <?php bbp_get_template_part( 'feedback',   'search' ); ?>
     44        <?php bbp_get_template_part( 'feedback', 'search' ); ?>
    3545
    3646    <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-forum.php

    r4841 r7813  
    11<?php
    2 
    32/**
    43 * Single Topic Content Part
     
    1312
    1413<header class="page-header">
    15     <h1 class="page-title"><?php printf( __( '%s Forum', 'wporg-forums' ), bbp_get_topic_title() ); ?></h1>
     14    <h1 class="page-title"><?php printf( esc_html__( '%s Forum', 'wporg-forums' ), bbp_get_topic_title() ); ?></h1>
    1615    <p><?php bbp_forum_content(); ?></p>
    1716</header>
     
    3130        <?php endif; ?>
    3231
    33         <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
     32        <?php if ( ! bbp_is_forum_category() && bbp_has_topics() ) : ?>
    3433
    35             <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     34            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    3635
    37             <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
     36            <?php bbp_get_template_part( 'loop', 'topics' ); ?>
    3837
    39             <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     38            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    4039
    41             <?php if ( ! bb_base_topic_search_query( false ) ) bbp_get_template_part( 'form',       'topic'     ); ?>
     40            <?php
     41            if ( ! bb_base_topic_search_query( false ) ) {
     42                bbp_get_template_part( 'form', 'topic' );
     43            }
     44            ?>
    4245
    43         <?php elseif( !bbp_is_forum_category() ) : ?>
     46        <?php elseif ( ! bbp_is_forum_category() ) : ?>
    4447
    45             <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
     48            <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
    4649
    47             <?php if ( ! bb_base_topic_search_query( false ) ) bbp_get_template_part( 'form',       'topic'     ); ?>
     50            <?php
     51            if ( ! bb_base_topic_search_query( false ) ) {
     52                bbp_get_template_part( 'form', 'topic' );
     53            }
     54            ?>
    4855
    4956        <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-reply.php

    r5638 r7813  
    1 <?php
    2 
     1<?php
    32/**
    43 * Single Reply Content Part
     
    87 */
    98
    10 ?>
    11    
    12 <?php bbp_breadcrumb(); ?>
     9bbp_breadcrumb(); ?>
    1310
    1411<div id="bbpress-forums">
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-topic-lead.php

    r7518 r7813  
    11<?php
    2 
    32/**
    43 * Single Topic Part
     
    4544                <?php do_action( 'bbp_theme_before_topic_author_details' ); ?>
    4645
    47                 <?php bbp_topic_author_link( array( 'sep' => '', 'show_role' => false, 'size' => 100 ) ); ?>
     46                <?php
     47                bbp_topic_author_link(
     48                    array(
     49                        'sep'       => '',
     50                        'show_role' => false,
     51                        'size'      => 100,
     52                    )
     53                );
     54                ?>
    4855
    49                 <?php bbp_user_nicename( bbp_get_topic_author_id(), array( 'before' => '<p class="bbp-user-nicename">(@', 'after' => ')</p><br />' ) ); ?>
     56                <?php
     57                bbp_user_nicename(
     58                    bbp_get_topic_author_id(),
     59                    array(
     60                        'before' => '<p class="bbp-user-nicename">(@',
     61                        'after'  => ')</p><br />',
     62                    )
     63                );
     64                ?>
    5065
    5166                <?php if ( current_user_can( 'moderate', bbp_get_topic_id() ) && 'bbp_blocked' === bbp_get_user_role( bbp_get_topic_author_id() ) ) : ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-topic.php

    r4248 r7813  
    11<?php
    2 
    32/**
    43 * Single Topic Content Part
     
    3635            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    3736
    38             <?php bbp_get_template_part( 'loop',       'replies' ); ?>
     37            <?php bbp_get_template_part( 'loop', 'replies' ); ?>
    3938
    4039            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    4140
    42         <?php elseif( bb_base_reply_search_query() ) : ?>
     41        <?php elseif ( bb_base_reply_search_query() ) : ?>
    4342
    44             <?php bbp_get_template_part( 'feedback',   'no-replies' ); ?>
     43            <?php bbp_get_template_part( 'feedback', 'no-replies' ); ?>
    4544
    4645        <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-user.php

    r5637 r7813  
    11<?php
    2 
    32/**
    43 * Single User Content Part
     
    2524
    2625        <div id="bbp-user-body">
    27             <?php if ( bbp_is_favorites()                               ) bbp_get_template_part( 'user', 'favorites'         ); ?>
    28             <?php if ( bbp_is_subscriptions()                           ) bbp_get_template_part( 'user', 'subscriptions'     ); ?>
     26            <?php
     27            if ( bbp_is_favorites() ) {
     28                bbp_get_template_part( 'user', 'favorites' );
     29            }
     30            ?>
    2931
    3032            <?php
    31                 if ( function_exists( 'bbp_is_single_user_engagements' ) && bbp_is_single_user_engagements() ) {
    32                     bbp_get_template_part( 'user', 'engagements' );
    33                 }
     33            if ( bbp_is_subscriptions() ) {
     34                bbp_get_template_part( 'user', 'subscriptions' );
     35            }
    3436            ?>
    3537
    36             <?php if ( bbp_is_single_user_topics()                      ) bbp_get_template_part( 'user', 'topics-created'    ); ?>
    37             <?php if ( bbp_is_single_user_replies()                     ) bbp_get_template_part( 'user', 'replies-created'   ); ?>
    38             <?php if ( wporg_support_is_single_user_reviews()           ) bbp_get_template_part( 'user', 'reviews-written'   ); ?>
    39             <?php if ( wporg_support_is_single_user_topics_replied_to() ) bbp_get_template_part( 'user', 'topics-replied-to' ); ?>
    40             <?php if ( bbp_is_single_user_edit()                        ) bbp_get_template_part( 'form', 'user-edit'         ); ?>
    41             <?php if ( bbp_is_single_user_profile()                     ) bbp_get_template_part( 'user', 'profile'           ); ?>
     38            <?php
     39            if ( function_exists( 'bbp_is_single_user_engagements' ) && bbp_is_single_user_engagements() ) {
     40                bbp_get_template_part( 'user', 'engagements' );
     41            }
     42            ?>
     43
     44            <?php
     45            if ( bbp_is_single_user_topics() ) {
     46                bbp_get_template_part( 'user', 'topics-created' );
     47            }
     48            ?>
     49
     50            <?php
     51            if ( bbp_is_single_user_replies() ) {
     52                bbp_get_template_part( 'user', 'replies-created' );
     53            }
     54            ?>
     55
     56            <?php
     57            if ( wporg_support_is_single_user_reviews() ) {
     58                bbp_get_template_part( 'user', 'reviews-written' );
     59            }
     60            ?>
     61
     62            <?php
     63            if ( wporg_support_is_single_user_topics_replied_to() ) {
     64                bbp_get_template_part( 'user', 'topics-replied-to' );
     65            }
     66            ?>
     67
     68            <?php
     69            if ( bbp_is_single_user_edit() ) {
     70                bbp_get_template_part( 'form', 'user-edit' );
     71            }
     72            ?>
     73
     74            <?php
     75            if ( bbp_is_single_user_profile() ) {
     76                bbp_get_template_part( 'user', 'profile' );
     77            }
     78            ?>
    4279        </div>
    4380    </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/content-single-view.php

    r4895 r7813  
    11<?php
    2 
    32/**
    43 * Single View Content Part
     
    2221        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    2322
    24         <?php if ( in_array( bbp_get_view_id(), array( 'spam', 'pending', 'archived' ) ) ) : ?>
     23        <?php if ( in_array( bbp_get_view_id(), array( 'spam', 'pending', 'archived' ), true ) ) : ?>
    2524
    26         <?php bbp_get_template_part( 'loop',       'posts'    ); ?>
     25            <?php bbp_get_template_part( 'loop', 'posts' ); ?>
    2726
    2827        <?php else : ?>
    2928
    30         <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
     29            <?php bbp_get_template_part( 'loop', 'topics' ); ?>
    3130
    3231        <?php endif; ?>
    3332
    34         <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     33        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    3534
    3635    <?php else : ?>
    3736
    38         <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
     37        <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
    3938
    4039    <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/feedback-no-search.php

    r5019 r7813  
     1<?php
     2/**
     3 * No Search Results Feedback Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<div class="bbp-template-notice">
    2     <p><?php _e( 'No results found. Try a different search or start a new post.', 'wporg-forums' ); ?></p>
     15    <p><?php esc_html_e( 'No results found. Try a different search or start a new post.', 'wporg-forums' ); ?></p>
    316</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/feedback-no-topics.php

    r5019 r7813  
     1<?php
     2/**
     3 * No Topics Feedback Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<div class="bbp-template-notice">
    2     <p><?php _e( 'No topics found. Select another view or start a new post.', 'wporg-forums' ); ?></p>
     15    <p><?php esc_html_e( 'No topics found. Select another view or start a new post.', 'wporg-forums' ); ?></p>
    316</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/feedback-search.php

    r4248 r7813  
     1<?php
     2/**
     3 * Search Results Feedback Part
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<div class="bbp-template-notice">
    2     <p><?php _e( 'Please enter some search terms above', 'wporg-forums' ); ?></p>
     15    <p><?php esc_html_e( 'Please enter some search terms above', 'wporg-forums' ); ?></p>
    316</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/form-reply.php

    r6050 r7813  
    11<?php
    2 
    32/**
    43 * New/Edit Reply
     
    4342                    <div class="bbp-template-notice">
    4443                        <ul>
    45                             <li><?php
     44                            <li>
     45                                <?php
    4646                                printf(
    4747                                    /* translators: %s: forum title */
     
    4949                                    bbp_get_forum_title( bbp_get_topic_forum_id() )
    5050                                );
    51                             ?></li>
     51                                ?>
     52                            </li>
    5253                        </ul>
    5354                    </div>
     
    8081
    8182                        <p class="form-allowed-tags">
    82                             <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','wporg-forums' ); ?></label><br />
     83                            <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'wporg-forums' ); ?></label><br />
    8384                            <code><?php bbp_allowed_tags(); ?></code>
    8485                        </p>
     
    227228                        <li><?php esc_html_e( 'You cannot reply to this review.', 'wporg-forums' ); ?></li>
    228229                    <?php else : ?>
    229                         <li><?php printf( __( 'You must be <a href="%s">logged in</a> to reply to this review.', 'wporg-forums' ), wp_login_url() ); ?></li>
     230                        <li><?php printf( esc_html__( 'You must be <a href="%s">logged in</a> to reply to this review.', 'wporg-forums' ), wp_login_url() ); ?></li>
    230231                    <?php endif; ?>
    231232
     
    235236                        <li><?php esc_html_e( 'You cannot reply to this topic.', 'wporg-forums' ); ?></li>
    236237                    <?php else : ?>
    237                         <li><?php printf( __( 'You must be <a href="%s">logged in</a> to reply to this topic.', 'wporg-forums' ), wp_login_url() ); ?></li>
     238                        <li><?php printf( esc_html__( 'You must be <a href="%s">logged in</a> to reply to this topic.', 'wporg-forums' ), wp_login_url() ); ?></li>
    238239                    <?php endif; ?>
    239240
     
    249250</div>
    250251
    251 <?php endif;
     252<?php
     253endif;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/form-topic-merge.php

    r5042 r7813  
    11<?php
    2 
    32/**
    43 * Merge Topic
     
    1817        <div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
    1918
    20             <form id="merge_topic" name="merge_topic" method="post" action="<?php the_permalink(); ?>">
     19            <form id="merge_topic" name="merge_topic" method="post" action="<?php bbp_topic_permalink(); ?>">
    2120
    2221                <fieldset class="bbp-form">
    2322
    24                     <legend><?php printf( __( 'Merge topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
     23                    <legend><?php printf( esc_html__( 'Merge topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
    2524
    2625                    <div>
    2726
    2827                        <div class="bbp-template-notice info">
    29                             <p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'wporg-forums' ); ?></p>
    30                             <p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'wporg-forums' ); ?></p>
     28                            <p><?php esc_html_e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'wporg-forums' ); ?></p>
     29                            <p><?php esc_html_e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'wporg-forums' ); ?></p>
    3130                        </div>
    3231
    3332                        <div class="bbp-template-notice">
    34                             <p><?php _e( 'All replies within both the topics will be merged chronologically. The order of the merged replies is based on the time they were posted. If the destination topic was created after this one, its post date will be updated to a second earlier than this one.', 'wporg-forums' ); ?></p>
     33                            <p><?php esc_html_e( 'All replies within both the topics will be merged chronologically. The order of the merged replies is based on the time they were posted. If the destination topic was created after this one, its post date will be updated to a second earlier than this one.', 'wporg-forums' ); ?></p>
    3534                        </div>
    3635
    3736                        <fieldset class="bbp-form">
    38                             <legend><?php _e( 'Destination', 'wporg-forums' ); ?></legend>
     37                            <legend><?php esc_html_e( 'Destination', 'wporg-forums' ); ?></legend>
    3938                            <div>
    40                                 <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
     39                                <?php
     40                                if ( bbp_has_topics(
     41                                    array(
     42                                        'show_stickies' => false,
     43                                        'post_parent'   => bbp_get_topic_forum_id( bbp_get_topic_id() ),
     44                                        'post__not_in'  => array( bbp_get_topic_id() ),
     45                                    )
     46                                ) ) :
     47                                    ?>
    4148
    42                                     <label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'wporg-forums' ); ?></label>
     49                                    <label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'wporg-forums' ); ?></label>
    4350
    4451                                    <?php
    45                                         bbp_dropdown( array(
    46                                             'post_type'   => bbp_get_topic_post_type(),
    47                                             'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
    48                                             'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
    49                                             'selected'    => -1,
    50                                             'numberposts' => 100,
    51                                             'orderby'     => 'date',
    52                                             'order'       => 'DESC',
    53                                             'exclude'     => bbp_get_topic_id(),
    54                                             'select_id'   => 'bbp_destination_topic'
    55                                         ) );
     52                                        bbp_dropdown(
     53                                            array(
     54                                                'post_type'   => bbp_get_topic_post_type(),
     55                                                'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
     56                                                'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
     57                                                'selected'    => -1,
     58                                                'numberposts' => 100,
     59                                                'orderby'     => 'date',
     60                                                'order'       => 'DESC',
     61                                                'exclude'     => bbp_get_topic_id(),
     62                                                'select_id'   => 'bbp_destination_topic',
     63                                            )
     64                                        );
    5665                                    ?>
    5766
    5867                                <?php else : ?>
    5968
    60                                     <label><?php _e( 'There are no other topics in this forum to merge with.', 'wporg-forums' ); ?></label>
     69                                    <label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'wporg-forums' ); ?></label>
    6170
    6271                                <?php endif; ?>
     
    6675
    6776                        <fieldset class="bbp-form">
    68                             <legend><?php _e( 'Topic Extras', 'wporg-forums' ); ?></legend>
     77                            <legend><?php esc_html_e( 'Topic Extras', 'wporg-forums' ); ?></legend>
    6978
    7079                            <div>
     
    7382
    7483                                    <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
    75                                     <label for="bbp_topic_subscribers"><?php _e( 'Merge topic subscribers', 'wporg-forums' ); ?></label><br />
     84                                    <label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'wporg-forums' ); ?></label><br />
    7685
    7786                                <?php endif; ?>
    7887
    7988                                <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
    80                                 <label for="bbp_topic_favoriters"><?php _e( 'Merge topic favoriters', 'wporg-forums' ); ?></label><br />
     89                                <label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'wporg-forums' ); ?></label><br />
    8190
    8291                                <?php if ( bbp_allow_topic_tags() ) : ?>
    8392
    8493                                    <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
    85                                     <label for="bbp_topic_tags"><?php _e( 'Merge topic tags', 'wporg-forums' ); ?></label><br />
     94                                    <label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'wporg-forums' ); ?></label><br />
    8695
    8796                                <?php endif; ?>
     
    91100
    92101                        <div class="bbp-template-notice error">
    93                             <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
     102                            <p><?php esc_html_e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
    94103                        </div>
    95104
    96105                        <div class="bbp-submit-wrapper">
    97                             <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button button-primary submit"><?php _e( 'Submit', 'wporg-forums' ); ?></button>
     106                            <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button button-primary submit"><?php esc_html_e( 'Submit', 'wporg-forums' ); ?></button>
    98107                        </div>
    99108                    </div>
     
    108117
    109118        <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
    110             <div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'wporg-forums' ) : _e( 'You cannot edit this topic.', 'wporg-forums' ); ?></div>
     119            <div class="entry-content"><?php is_user_logged_in() ? esc_html_e( 'You do not have the permissions to edit this topic!', 'wporg-forums' ) : esc_html_e( 'You cannot edit this topic.', 'wporg-forums' ); ?></div>
    111120        </div>
    112121
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/form-topic-split.php

    r5042 r7813  
    11<?php
    2 
    32/**
    43 * Split Topic
     
    2221                <fieldset class="bbp-form">
    2322
    24                     <legend><?php printf( __( 'Split topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
     23                    <legend><?php printf( esc_html__( 'Split topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
    2524
    2625                    <div>
    2726
    2827                        <div class="bbp-template-notice info">
    29                             <p><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'wporg-forums' ); ?></p>
     28                            <p><?php esc_html_e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'wporg-forums' ); ?></p>
    3029                        </div>
    3130
    3231                        <div class="bbp-template-notice">
    33                             <p><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'wporg-forums' ); ?></p>
     32                            <p><?php esc_html_e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'wporg-forums' ); ?></p>
    3433                        </div>
    3534
    3635                        <fieldset class="bbp-form">
    37                             <legend><?php _e( 'Split Method', 'wporg-forums' ); ?></legend>
     36                            <legend><?php esc_html_e( 'Split Method', 'wporg-forums' ); ?></legend>
    3837
    3938                            <div>
    4039                                <input name="bbp_topic_split_option" id="bbp_topic_split_option_reply" type="radio" checked="checked" value="reply" />
    41                                 <label for="bbp_topic_split_option_reply"><?php printf( __( 'New topic in <strong>%s</strong> titled:', 'wporg-forums' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
     40                                <label for="bbp_topic_split_option_reply"><?php printf( esc_html__( 'New topic in <strong>%s</strong> titled:', 'wporg-forums' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
    4241                                <input type="text" id="bbp_topic_split_destination_title" value="<?php echo esc_attr( sprintf( __( 'Split: %s', 'wporg-forums' ), bbp_get_topic_title() ) ); ?>" size="35" name="bbp_topic_split_destination_title" />
    4342                            </div>
    4443
    45                             <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
     44                            <?php
     45                            if ( bbp_has_topics(
     46                                array(
     47                                    'show_stickies' => false,
     48                                    'post_parent'   => bbp_get_topic_forum_id( bbp_get_topic_id() ),
     49                                    'post__not_in'  => array( bbp_get_topic_id() ),
     50                                )
     51                            ) ) :
     52                                ?>
    4653
    4754                                <div>
    4855                                    <input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" />
    49                                     <label for="bbp_topic_split_option_existing"><?php _e( 'Use an existing topic in this forum:', 'wporg-forums' ); ?></label>
     56                                    <label for="bbp_topic_split_option_existing"><?php esc_html_e( 'Use an existing topic in this forum:', 'wporg-forums' ); ?></label>
    5057
    5158                                    <?php
    52                                         bbp_dropdown( array(
    53                                             'post_type'   => bbp_get_topic_post_type(),
    54                                             'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
    55                                             'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
    56                                             'selected'    => -1,
    57                                             'numberposts' => 100,
    58                                             'orderby'     => 'date',
    59                                             'exclude'     => bbp_get_topic_id(),
    60                                             'select_id'   => 'bbp_destination_topic'
    61                                         ) );
     59                                        bbp_dropdown(
     60                                            array(
     61                                                'post_type'   => bbp_get_topic_post_type(),
     62                                                'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
     63                                                'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
     64                                                'selected'    => -1,
     65                                                'numberposts' => 100,
     66                                                'orderby'     => 'date',
     67                                                'exclude'     => bbp_get_topic_id(),
     68                                                'select_id'   => 'bbp_destination_topic',
     69                                            )
     70                                        );
    6271                                    ?>
    6372
     
    6978
    7079                        <fieldset class="bbp-form">
    71                             <legend><?php _e( 'Topic Extras', 'wporg-forums' ); ?></legend>
     80                            <legend><?php esc_html_e( 'Topic Extras', 'wporg-forums' ); ?></legend>
    7281
    7382                            <div>
     
    7685
    7786                                    <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
    78                                     <label for="bbp_topic_subscribers"><?php _e( 'Copy subscribers to the new topic', 'wporg-forums' ); ?></label><br />
     87                                    <label for="bbp_topic_subscribers"><?php esc_html_e( 'Copy subscribers to the new topic', 'wporg-forums' ); ?></label><br />
    7988
    8089                                <?php endif; ?>
    8190
    8291                                <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
    83                                 <label for="bbp_topic_favoriters"><?php _e( 'Copy favoriters to the new topic', 'wporg-forums' ); ?></label><br />
     92                                <label for="bbp_topic_favoriters"><?php esc_html_e( 'Copy favoriters to the new topic', 'wporg-forums' ); ?></label><br />
    8493
    8594                                <?php if ( bbp_allow_topic_tags() ) : ?>
    8695
    8796                                    <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
    88                                     <label for="bbp_topic_tags"><?php _e( 'Copy topic tags to the new topic', 'wporg-forums' ); ?></label><br />
     97                                    <label for="bbp_topic_tags"><?php esc_html_e( 'Copy topic tags to the new topic', 'wporg-forums' ); ?></label><br />
    8998
    9099                                <?php endif; ?>
     
    94103
    95104                        <div class="bbp-template-notice error">
    96                             <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
     105                            <p><?php esc_html_e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
    97106                        </div>
    98107
    99108                        <div class="bbp-submit-wrapper">
    100                             <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button button-primary submit"><?php _e( 'Submit', 'wporg-forums' ); ?></button>
     109                            <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button button-primary submit"><?php esc_html_e( 'Submit', 'wporg-forums' ); ?></button>
    101110                        </div>
    102111                    </div>
     
    111120
    112121        <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
    113             <div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'wporg-forums' ) : _e( 'You cannot edit this topic.', 'wporg-forums' ); ?></div>
     122            <div class="entry-content"><?php is_user_logged_in() ? esc_html_e( 'You do not have the permissions to edit this topic!', 'wporg-forums' ) : esc_html_e( 'You cannot edit this topic.', 'wporg-forums' ); ?></div>
    114123        </div>
    115124
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/form-topic.php

    r6050 r7813  
    1 <?php if ( ! bbp_is_single_forum() && ! bbp_is_single_view() ) : ?>
     1<?php
     2/**
     3 * New/Edit Topic
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12if ( ! bbp_is_single_forum() && ! bbp_is_single_view() ) : ?>
    213
    314<div id="bbpress-forums">
     
    1930
    2031                    <?php
    21                         if ( bbp_is_topic_edit() ) {
    22                             printf( __( 'Now Editing &ldquo;%s&rdquo;', 'wporg-forums' ), bbp_get_topic_title() );
     32                    if ( bbp_is_topic_edit() ) {
     33                        printf( esc_html__( 'Now Editing &ldquo;%s&rdquo;', 'wporg-forums' ), bbp_get_topic_title() );
     34                    } else {
     35                        if ( bbp_is_single_forum() ) {
     36                            printf( esc_html__( 'Create a new topic in &ldquo;%s Forum&rdquo;', 'wporg-forums' ), bbp_get_forum_title() );
     37                        } elseif ( bbp_is_single_view() && 'reviews' === bbp_get_view_id() ) {
     38                            esc_html_e( 'Create a new review', 'wporg-forums' );
    2339                        } else {
    24                             if ( bbp_is_single_forum() ) {
    25                                 printf( __( 'Create a new topic in &ldquo;%s Forum&rdquo;', 'wporg-forums' ), bbp_get_forum_title() );
    26                             } elseif ( bbp_is_single_view() && 'reviews' === bbp_get_view_id() ) {
    27                                 _e( 'Create a new review', 'wporg-forums' );
    28                             } else {
    29                                 _e( 'Create a new topic', 'wporg-forums' );
    30                             }
     40                            esc_html_e( 'Create a new topic', 'wporg-forums' );
    3141                        }
     42                    }
    3243                    ?>
    3344
     
    4657                        <?php else : ?>
    4758
    48                             <p><?php _e( 'When posting a new topic, follow these steps:', 'wporg-forums' ); ?></p>
     59                            <p><?php esc_html_e( 'When posting a new topic, follow these steps:', 'wporg-forums' ); ?></p>
    4960                            <ul>
    50                                 <li><?php
     61                                <li>
     62                                    <?php
    5163                                    /* translators: %s: Handbook URL for forum welcome */
    52                                     printf( __( '<strong>Read the <a href="%s">Forum Welcome</a></strong> to find out how to maximize your odds of getting help!', 'wporg-forums' ), esc_url( __( 'https://wordpress.org/support/welcome/', 'wporg-forums' ) ) );
    53                                 ?></li>
    54                                 <li><?php
     64                                    printf( esc_html__( '<strong>Read the <a href="%s">Forum Welcome</a></strong> to find out how to maximize your odds of getting help!', 'wporg-forums' ), esc_url( esc_html__( 'https://wordpress.org/support/welcome/', 'wporg-forums' ) ) );
     65                                    ?>
     66                                </li>
     67                                <li>
     68                                    <?php
    5569                                    /* translators: %s: URL to search */
    56                                     printf( __( '<strong><a href="%s">Search</a> the forums</strong> to see if your topic has been resolved already.', 'wporg-forums' ), esc_url( bbp_get_search_url() ) );
    57                                 ?></li>
    58                                 <li><?php _e( '<strong>Update to the latest versions</strong> of your plugins, themes, and WordPress.', 'wporg-forums' ); ?></li>
    59                                 <li><?php _e( '<strong>Note the exact steps</strong> needed to reproduce your issue.', 'wporg-forums' ); ?></li>
    60                                 <li><?php _e( '<strong>Provide any information</strong> you might think is useful. If your issue is visual, note your browser and operating system. If your issue is technical, note your server environment.', 'wporg-forums' ); ?></li>
    61                                 <?php if ( ! bbp_is_single_view() || ! in_array( bbp_get_view_id(), array( 'theme', 'plugin' ) ) ) : ?>
    62                                 <li><?php
     70                                    printf( esc_html__( '<strong><a href="%s">Search</a> the forums</strong> to see if your topic has been resolved already.', 'wporg-forums' ), esc_url( bbp_get_search_url() ) );
     71                                    ?>
     72                                </li>
     73                                <li><?php esc_html_e( '<strong>Update to the latest versions</strong> of your plugins, themes, and WordPress.', 'wporg-forums' ); ?></li>
     74                                <li><?php esc_html_e( '<strong>Note the exact steps</strong> needed to reproduce your issue.', 'wporg-forums' ); ?></li>
     75                                <li><?php esc_html_e( '<strong>Provide any information</strong> you might think is useful. If your issue is visual, note your browser and operating system. If your issue is technical, note your server environment.', 'wporg-forums' ); ?></li>
     76                                <?php if ( ! bbp_is_single_view() || ! in_array( bbp_get_view_id(), array( 'theme', 'plugin' ), true ) ) : ?>
     77                                <li>
     78                                    <?php
    6379                                    /* translators: 1: Theme Directory URL, 2: Appearance icon, 3: Plugin Directory URL, 4: Plugins icon */
    64                                     printf( __( '<strong>Looking for help with a specific <a href="%1$s">%2$s theme</a> or <a href="%3$s">%4$s plugin</a>?</strong> Don\'t post here &#8211; instead, head to the theme or plugin\'s page and find the "View support forum" link to visit the theme or plugin\'s individual forum.', 'wporg-forums' ),
    65                                         esc_url( __( 'https://wordpress.org/themes/', 'wporg-forums' ) ),
     80                                    printf(
     81                                        esc_html__( '<strong>Looking for help with a specific <a href="%1$s">%2$s theme</a> or <a href="%3$s">%4$s plugin</a>?</strong> Don\'t post here &#8211; instead, head to the theme or plugin\'s page and find the "View support forum" link to visit the theme or plugin\'s individual forum.', 'wporg-forums' ),
     82                                        esc_url( esc_html__( 'https://wordpress.org/themes/', 'wporg-forums' ) ),
    6683                                        '<span class="dashicons dashicons-admin-appearance"></span>',
    67                                         esc_url( __( 'https://wordpress.org/plugins/', 'wporg-forums' ) ),
     84                                        esc_url( esc_html__( 'https://wordpress.org/plugins/', 'wporg-forums' ) ),
    6885                                        '<span class="dashicons dashicons-admin-plugins"></span>'
    6986                                    );
    70                                 ?></li>
     87                                    ?>
     88                                </li>
    7189                                <?php endif; ?>
    7290                            </ul>
     
    7896                <?php endif; ?>
    7997
    80                 <?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
     98                <?php if ( ! bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
    8199
    82100                    <div class="bbp-template-notice">
    83                         <p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to create a topic.', 'wporg-forums' ); ?></p>
     101                        <p><?php esc_html_e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to create a topic.', 'wporg-forums' ); ?></p>
    84102                    </div>
    85103
     
    89107
    90108                    <div class="bbp-template-notice">
    91                         <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'wporg-forums' ); ?></p>
     109                        <p><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'wporg-forums' ); ?></p>
    92110                    </div>
    93111
     
    103121
    104122                    <p>
    105                         <label for="bbp_topic_title"><?php
     123                        <label for="bbp_topic_title">
     124                            <?php
    106125                            if ( bbp_is_single_view() && 'reviews' === bbp_get_view_id() ) {
    107                                 printf( __( 'Review Title (Maximum Length: %d):', 'wporg-forums' ), bbp_get_title_max_length() );
     126                                printf( esc_html__( 'Review Title (Maximum Length: %d):', 'wporg-forums' ), bbp_get_title_max_length() );
    108127                            } else {
    109                                 printf( __( 'Topic Title (Maximum Length: %d):', 'wporg-forums' ), bbp_get_title_max_length() );
     128                                printf( esc_html__( 'Topic Title (Maximum Length: %d):', 'wporg-forums' ), bbp_get_title_max_length() );
    110129                            }
    111                         ?></label><br />
     130                            ?>
     131                        </label><br />
    112132                        <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />
    113133                    </p>
     
    124144
    125145                    <p>
    126                         <label for="bbp_topic_tags"><?php
     146                        <label for="bbp_topic_tags">
     147                            <?php
    127148                            if ( bbp_is_single_view() && 'reviews' === bbp_get_view_id() ) {
    128                                 _e( 'Review Tags:', 'wporg-forums' );
     149                                esc_html_e( 'Review Tags:', 'wporg-forums' );
    129150                            } else {
    130                                 _e( 'Topic Tags:', 'wporg-forums' );
     151                                esc_html_e( 'Topic Tags:', 'wporg-forums' );
    131152                            }
    132                         ?></label><br />
     153                            ?>
     154                        </label><br />
    133155                        <input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" aria-describedby="bbp_topic_tags_description" <?php disabled( bbp_is_topic_spam() ); ?> /><br />
    134156                        <em id="bbp_topic_tags_description"><?php esc_html_e( 'Separate tags with commas', 'wporg-forums' ); ?></em>
     
    142164
    143165                        <p>
    144                             <label for="bbp_forum_id"><?php _e( 'Forum:', 'wporg-forums' ); ?></label><br />
     166                            <label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'wporg-forums' ); ?></label><br />
    145167                            <?php bbp_dropdown( array( 'selected' => bbp_get_form_topic_forum() ) ); ?>
    146168                        </p>
     
    150172                    <?php endif; ?>
    151173
    152                     <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
     174                    <?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_topic_edit() || ( bbp_is_topic_edit() && ! bbp_is_topic_anonymous() ) ) ) : ?>
    153175
    154176                        <?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
     
    157179                            <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> />
    158180
    159                             <?php if ( bbp_is_topic_edit() && ( get_the_author_meta( 'ID' ) != bbp_get_current_user_id() ) ) : ?>
    160 
    161                                 <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'wporg-forums' ); ?></label>
     181                            <?php if ( bbp_is_topic_edit() && ( get_the_author_meta( 'ID' ) !== bbp_get_current_user_id() ) ) : ?>
     182
     183                                <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'wporg-forums' ); ?></label>
    162184
    163185                            <?php else : ?>
    164186
    165                                 <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'wporg-forums' ); ?></label>
     187                                <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'wporg-forums' ); ?></label>
    166188
    167189                            <?php endif; ?>
     
    179201                            <legend>
    180202                                <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> />
    181                                 <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'wporg-forums' ); ?></label><br />
     203                                <label for="bbp_log_topic_edit"><?php esc_html_e( 'Keep a log of this edit:', 'wporg-forums' ); ?></label><br />
    182204                            </legend>
    183205
    184206                            <div>
    185                                 <label for="bbp_topic_edit_reason"><em><?php _e( 'Optional reason for editing:', 'wporg-forums' ); ?></em></label><br />
     207                                <label for="bbp_topic_edit_reason"><em><?php esc_html_e( 'Optional reason for editing:', 'wporg-forums' ); ?></em></label><br />
    186208                                <input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
    187209                            </div>
     
    198220                        <?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
    199221
    200                         <button type="submit" id="bbp_topic_submit" name="bbp_topic_submit" class="button button-primary submit"><?php _e( 'Submit', 'wporg-forums' ); ?></button>
     222                        <button type="submit" id="bbp_topic_submit" name="bbp_topic_submit" class="button button-primary submit"><?php esc_html_e( 'Submit', 'wporg-forums' ); ?></button>
    201223
    202224                        <?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
     
    221243    <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
    222244        <div class="bbp-template-notice">
    223             <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'wporg-forums' ), bbp_get_forum_title() ); ?></p>
     245            <p><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'wporg-forums' ), bbp_get_forum_title() ); ?></p>
    224246        </div>
    225247    </div>
     
    230252        <div class="bbp-template-notice">
    231253            <?php if ( is_user_logged_in() ) : ?>
    232                 <p><?php _e( 'You cannot create new topics at this time.', 'wporg-forums' ); ?></p>
     254                <p><?php esc_html_e( 'You cannot create new topics at this time.', 'wporg-forums' ); ?></p>
    233255            <?php else : ?>
    234                 <p><?php printf( __( 'You must be <a href="%s">logged in</a> to create new topics.', 'wporg-forums' ), wp_login_url() ); ?></p>
     256                <p><?php printf( esc_html__( 'You must be <a href="%s">logged in</a> to create new topics.', 'wporg-forums' ), wp_login_url() ); ?></p>
    235257            <?php endif; ?>
    236258        </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-forums-homepage.php

    r4687 r7813  
    1 <?php do_action( 'bbp_template_before_forums_loop' ); ?>
     1<?php
     2/**
     3 * Forums Loop Homepage
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12do_action( 'bbp_template_before_forums_loop' ); ?>
    213
    314<div id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums three-up">
    415
    516
    6         <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    7 
    8             <?php bbp_get_template_part( 'loop', 'single-forum-homepage' ); ?>
    9 
    10         <?php endwhile; ?>
    11 
     17        <?php
     18        while ( bbp_forums() ) :
     19            bbp_the_forum();
     20            bbp_get_template_part( 'loop', 'single-forum-homepage' );
     21        endwhile;
     22        ?>
    1223
    1324</div><!-- .forums-directory -->
    1425
    1526<div class="themes-plugins">
    16    
    17     <h3><?php _e( 'Themes and Plugins', 'wporg-forums' ); ?></h3>
    18     <p><?php
    19         /* translators: 1: Theme Directory URL, 2: Appearance icon, 3: Plugin Directory URL, 4: Plugins icon */
    20         printf( __( 'Looking for help with a specific <a href="%1$s">%2$s theme</a> or <a href="%3$s">%4$s plugin</a>? Head to the theme or plugin\'s page and find the "View support forum" link to visit the theme or plugin\'s individual forum.', 'wporg-forums' ),
    21             esc_url( __( 'https://wordpress.org/themes/', 'wporg-forums' ) ),
     27
     28    <h3><?php esc_html_e( 'Themes and Plugins', 'wporg-forums' ); ?></h3>
     29    <p>
     30        <?php
     31        printf(
     32            /* translators: 1: Theme Directory URL, 2: Appearance icon, 3: Plugin Directory URL, 4: Plugins icon */
     33            esc_html__( 'Looking for help with a specific <a href="%1$s">%2$s theme</a> or <a href="%3$s">%4$s plugin</a>? Head to the theme or plugin\'s page and find the "View support forum" link to visit the theme or plugin\'s individual forum.', 'wporg-forums' ),
     34            esc_url( esc_html__( 'https://wordpress.org/themes/', 'wporg-forums' ) ),
    2235            '<span class="dashicons dashicons-admin-appearance"></span>',
    23             esc_url( __( 'https://wordpress.org/plugins/', 'wporg-forums' ) ),
     36            esc_url( esc_html__( 'https://wordpress.org/plugins/', 'wporg-forums' ) ),
    2437            '<span class="dashicons dashicons-admin-plugins"></span>'
    2538        );
    26     ?></p>
     39        ?>
     40    </p>
    2741
    2842</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-forums.php

    r4248 r7813  
    1 <?php do_action( 'bbp_template_before_forums_loop' ); ?>
     1<?php
     2/**
     3 * Forums Loop
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12do_action( 'bbp_template_before_forums_loop' ); ?>
    213
    314<ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
     
    617
    718        <ul class="forum-titles">
    8             <li class="bbp-forum-info"><?php _e( 'Forum', 'wporg-forums' ); ?></li>
    9             <li class="bbp-forum-topic-count"><?php _e( 'Topics', 'wporg-forums' ); ?></li>
    10             <li class="bbp-forum-reply-count"><?php _e( 'Posts', 'wporg-forums' ); ?></li>
     19            <li class="bbp-forum-info"><?php esc_attr_e( 'Forum', 'wporg-forums' ); ?></li>
     20            <li class="bbp-forum-topic-count"><?php esc_attr_e( 'Topics', 'wporg-forums' ); ?></li>
     21            <li class="bbp-forum-reply-count"><?php esc_attr_e( 'Posts', 'wporg-forums' ); ?></li>
    1122        </ul>
    1223
     
    1526    <li class="bbp-body">
    1627
    17         <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
     28        <?php
     29        while ( bbp_forums() ) :
     30            bbp_the_forum();
     31            bbp_get_template_part( 'loop', 'single-forum' );
    1832
    19             <?php bbp_get_template_part( 'loop', 'single-forum' ); ?>
    20 
    21             <?php bbp_list_forums( array(
    22                 'before'           => '',
    23                 'after'            => '',
    24                 'link_before'      => '<ul class="forum"><li class="bbp-forum-info">&mdash; <span class="bbp-forum-title">',
    25                 'link_after'       => '',
    26                 'count_before'     => '</span></li><li class="bbp-forum-reply-count">',
    27                 'count_after'      => '</li></ul>',
    28                 'separator'        => '',
    29                 'show_topic_count' => false,
    30                 'show_reply_count' => true,
    31             ) ); ?>
    32 
    33         <?php endwhile; ?>
     33            bbp_list_forums(
     34                array(
     35                    'before'           => '',
     36                    'after'            => '',
     37                    'link_before'      => '<ul class="forum"><li class="bbp-forum-info">&mdash; <span class="bbp-forum-title">',
     38                    'link_after'       => '',
     39                    'count_before'     => '</span></li><li class="bbp-forum-reply-count">',
     40                    'count_after'      => '</li></ul>',
     41                    'separator'        => '',
     42                    'show_topic_count' => false,
     43                    'show_reply_count' => true,
     44                )
     45            );
     46        endwhile;
     47        ?>
    3448
    3549    </li><!-- .bbp-body -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-posts.php

    r5108 r7813  
    11<?php
    2 
    32/**
    43 * Posts Loop
     
    1312    <li class="bbp-body">
    1413
    15         <?php while ( bbp_topics() ) : bbp_the_topic(); ?>
     14        <?php
     15        while ( bbp_topics() ) :
     16            bbp_the_topic();
     17            ?>
    1618
    17             <?php if ( 'topic' == get_post_type() ) : ?>
     19            <?php if ( 'topic' === get_post_type() ) : ?>
    1820
    1921                <?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
    2022
    21             <?php // This actually works. ?>
    22             <?php else : bbpress()->reply_query = bbpress()->topic_query; ?>
     23                <?php // This actually works. ?>
     24                <?php
     25            else :
     26                bbpress()->reply_query = bbpress()->topic_query;
     27                ?>
    2328
    2429                <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-replies.php

    r4248 r7813  
    1 <?php do_action( 'bbp_template_before_replies_loop' ); ?>
     1<?php
     2/**
     3 * Replies Loop
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12do_action( 'bbp_template_before_replies_loop' ); ?>
    213
    314<ul id="topic-<?php bbp_topic_id(); ?>-replies" class="forums bbp-replies">
     
    516    <li class="bbp-body">
    617
    7         <?php while ( bbp_replies() ) : bbp_the_reply(); ?>
    8 
    9             <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    10 
    11         <?php endwhile; ?>
     18        <?php
     19        while ( bbp_replies() ) :
     20            bbp_the_reply();
     21            bbp_get_template_part( 'loop', 'single-reply' );
     22        endwhile;
     23        ?>
    1224
    1325    </li><!-- .bbp-body -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-reply-topics.php

    r5626 r7813  
    1 <?php do_action( 'bbp_template_before_topics_loop' ); ?>
     1<?php
     2/**
     3 * Reply Topics Loop
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12do_action( 'bbp_template_before_topics_loop' ); ?>
    213
    314<ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
     
    617            <li class="bbp-topic-title"><?php esc_html_e( 'Topic', 'wporg-forums' ); ?></li>
    718            <li class="bbp-topic-voice-count"><?php esc_html_e( 'Voices', 'wporg-forums' ); ?></li>
    8             <li class="bbp-topic-reply-count"><?php bbp_show_lead_topic()
     19            <li class="bbp-topic-reply-count">
     20                <?php
     21                bbp_show_lead_topic()
    922                ? esc_html_e( 'Replies', 'wporg-forums' )
    10                 : esc_html_e( 'Posts',   'wporg-forums' );
    11             ?></li>
     23                : esc_html_e( 'Posts', 'wporg-forums' );
     24                ?>
     25            </li>
    1226            <li class="bbp-topic-freshness"><?php esc_html_e( 'Last Post', 'wporg-forums' ); ?></li>
    1327        </ul>
     
    1630    <li class="bbp-body">
    1731
    18         <?php while ( bbp_replies() ) : bbp_the_reply(); ?>
     32        <?php
     33        while ( bbp_replies() ) :
     34            bbp_the_reply();
     35            ?>
    1936
    2037            <?php bbp_get_template_part( 'loop', 'single-reply-topic' ); ?>
     
    3350</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
    3451
    35 <?php do_action( 'bbp_template_after_topics_loop' ); ?>
     52<?php
     53do_action( 'bbp_template_after_topics_loop' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-search.php

    r5025 r7813  
    1 <?php do_action( 'bbp_template_before_search_results_loop' ); ?>
     1<?php
     2/**
     3 * Search Loop
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12do_action( 'bbp_template_before_search_results_loop' ); ?>
    213
    314<ul id="bbp-search-results" class="forums bbp-search-results">
     
    516    <li class="bbp-body">
    617
    7         <?php while ( bbp_search_results() ) : bbp_the_search_result(); ?>
     18        <?php
     19        while ( bbp_search_results() ) :
     20            bbp_the_search_result();
     21            ?>
    822
    923            <?php if ( 'topic' === get_post_type() ) : ?>
     
    2337</ul><!-- #bbp-search-results -->
    2438
    25 <?php do_action( 'bbp_template_after_search_results_loop' ); ?>
     39<?php
     40do_action( 'bbp_template_after_search_results_loop' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php

    r4763 r7813  
     1<?php
     2/**
     3 * Single Forum Loop Homepage
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<div id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class( bbp_get_forum_id(), array( '' ) ); ?>>
    2    
     15
    316    <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><h3><?php bbp_forum_title(); ?></h3></a>
    417    <p><?php bbp_forum_content(); ?></p>
    5     <p><a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a></p>
     18    <p><a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php esc_html_e( 'View forum', 'wporg-forums' ); ?></a></p>
    619
    720</div><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum.php

    r4248 r7813  
     1<?php
     2/**
     3 * Forums Loop - Single Forum
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
    215    <li class="bbp-forum-info">
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-reply-topic.php

    r5626 r7813  
     1<?php
     2/**
     3 * Replies Loop - Single Reply Topic
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<?php $topic_id = bbp_get_reply_topic_id(); ?>
    215
     
    1932            <?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
    2033
    21             <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'wporg-forums' ), bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'size' => '14' ) ) ); ?></span>
     34            <span class="bbp-topic-started-by">
     35                <?php
     36                printf(
     37                    esc_html__( 'Started by: %1$s', 'wporg-forums' ),
     38                    bbp_get_topic_author_link(
     39                        array(
     40                            'post_id' => $topic_id,
     41                            'size'    => '14',
     42                        )
     43                    )
     44                );
     45                ?>
     46            </span>
    2247
    2348            <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
     
    2550            <?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
    2651
    27             <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'wporg-forums' ), bbp_get_forum_permalink( bbp_get_topic_forum_id( $topic_id ) ), bbp_get_forum_title( bbp_get_topic_forum_id( $topic_id ) ) ); ?></span>
     52            <span class="bbp-topic-started-in"><?php printf( esc_html__( 'in: <a href="%1$s">%2$s</a>', 'wporg-forums' ), bbp_get_forum_permalink( bbp_get_topic_forum_id( $topic_id ) ), bbp_get_forum_title( bbp_get_topic_forum_id( $topic_id ) ) ); ?></span>
    2853
    2954            <?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
     
    5378            <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    5479
    55             <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id( $topic_id ), 'size' => 14 ) ); ?></span>
     80            <span class="bbp-topic-freshness-author">
     81                <?php
     82                bbp_author_link(
     83                    array(
     84                        'post_id' => bbp_get_topic_last_active_id( $topic_id ),
     85                        'size'    => 14,
     86                    )
     87                );
     88                ?>
     89            </span>
    5690
    5791            <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-reply.php

    r7518 r7813  
    11<?php
    2 
    32/**
    43 * Replies Loop - Single Reply
     
    3029        <?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    3130
    32         <?php bbp_reply_author_link( array( 'sep' => '', 'show_role' => false, 'size' => 100 ) ); ?>
     31        <?php
     32        bbp_reply_author_link(
     33            array(
     34                'sep'       => '',
     35                'show_role' => false,
     36                'size'      => 100,
     37            )
     38        );
     39        ?>
    3340
    34         <?php bbp_user_nicename( bbp_get_reply_author_id(), array( 'before' => '<p class="bbp-user-nicename">(@', 'after' => ')</p>' ) ); ?>
     41        <?php
     42        bbp_user_nicename(
     43            bbp_get_reply_author_id(),
     44            array(
     45                'before' => '<p class="bbp-user-nicename">(@',
     46                'after'  => ')</p>',
     47            )
     48        );
     49        ?>
    3550
    3651        <?php if ( current_user_can( 'moderate', bbp_get_reply_topic_id() ) && 'bbp_blocked' === bbp_get_user_role( bbp_get_reply_author_id() ) ) : ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-topic.php

    r5637 r7813  
     1<?php
     2/**
     3 * Topics Loop - Single
     4 *
     5 * @package bbPress
     6 * @subpackage Theme
     7 */
     8
     9// Exit if accessed directly
     10defined( 'ABSPATH' ) || exit;
     11
     12?>
     13
    114<ul id="bbp-topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
    215
     
    1124                    <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
    1225
    13                     <?php bbp_user_favorites_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '&times;' ) ); ?>
     26                    <?php
     27                    bbp_user_favorites_link(
     28                        array(
     29                            'before'    => '',
     30                            'favorite'  => '+',
     31                            'favorited' => '&times;',
     32                        )
     33                    );
     34                    ?>
    1435
    1536                    <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
     
    2344                    <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
    2445
    25                     <?php bbp_user_subscribe_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
     46                    <?php
     47                    bbp_user_subscribe_link(
     48                        array(
     49                            'before'      => '',
     50                            'subscribe'   => '+',
     51                            'unsubscribe' => '&times;',
     52                        )
     53                    );
     54                    ?>
    2655
    2756                    <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
     
    4776            <?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
    4877
    49             <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'wporg-forums' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
     78            <span class="bbp-topic-started-by"><?php printf( esc_html__( 'Started by: %1$s', 'wporg-forums' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
    5079
    5180            <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
    5281
    53             <?php if (
     82            <?php
     83            if (
    5484                        ( bbp_is_single_view() && ! wporg_support_is_compat_view() )
    5585                    ||
     
    5787                    ||
    5888                        bbp_is_single_user_topics()
    59                     ) : ?>
     89                    ) :
     90                ?>
    6091
    6192                <?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
    6293
    63                 <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'wporg-forums' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
     94                <span class="bbp-topic-started-in"><?php printf( esc_html__( 'in: <a href="%1$s">%2$s</a>', 'wporg-forums' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
    6495
    6596                <?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
     
    91122            <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    92123
    93             <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
     124            <span class="bbp-topic-freshness-author">
     125                <?php
     126                bbp_author_link(
     127                    array(
     128                        'post_id' => bbp_get_topic_last_active_id(),
     129                        'size'    => 14,
     130                    )
     131                );
     132                ?>
     133            </span>
    94134
    95135            <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-details.php

    r5637 r7813  
    11<?php
    2 
    32/**
    43 * User Details
     
    2322    <div id="bbp-user-navigation">
    2423        <ul>
    25             <li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>">
     24            <li class="
     25            <?php
     26            if ( bbp_is_single_user_profile() ) :
     27                ?>
     28 current<?php endif; ?>">
    2629                <span class="vcard bbp-user-profile-link">
    27                     <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php
    28                         /* translators: %s: user's display name */
    29                         printf( esc_attr__( "%s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    30                     ?>" rel="me"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></a>
     30                    <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="
     31                                                                            <?php
     32                                                                            /* translators: %s: user's display name */
     33                                                                            printf( esc_attr__( "%s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     34                                                                            ?>
     35                    " rel="me"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></a>
    3136                </span>
    3237            </li>
    3338
    34             <li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>">
     39            <li class="
     40            <?php
     41            if ( bbp_is_single_user_topics() ) :
     42                ?>
     43 current<?php endif; ?>">
    3544                <span class='bbp-user-topics-created-link'>
    36                     <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php
    37                         /* translators: %s: user's display name */
    38                         printf( esc_attr__( "%s's Topics Started", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    39                     ?>"><?php esc_html_e( 'Topics Started', 'wporg-forums' ); ?></a>
     45                    <a href="<?php bbp_user_topics_created_url(); ?>" title="
     46                                                                    <?php
     47                                                                    /* translators: %s: user's display name */
     48                                                                    printf( esc_attr__( "%s's Topics Started", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     49                                                                    ?>
     50                    "><?php esc_html_e( 'Topics Started', 'wporg-forums' ); ?></a>
    4051                </span>
    4152            </li>
    4253
    43             <li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
     54            <li class="
     55            <?php
     56            if ( bbp_is_single_user_replies() ) :
     57                ?>
     58 current<?php endif; ?>">
    4459                <span class='bbp-user-replies-created-link'>
    45                     <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php
    46                         /* translators: %s: user's display name */
    47                         printf( esc_attr__( "%s's Replies Created", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    48                     ?>"><?php esc_html_e( 'Replies Created', 'wporg-forums' ); ?></a>
     60                    <a href="<?php bbp_user_replies_created_url(); ?>" title="
     61                                                                    <?php
     62                                                                    /* translators: %s: user's display name */
     63                                                                    printf( esc_attr__( "%s's Replies Created", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     64                                                                    ?>
     65                    "><?php esc_html_e( 'Replies Created', 'wporg-forums' ); ?></a>
    4966                </span>
    5067            </li>
    5168
    52             <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == get_current_blog_id() ) : ?>
    53                 <li class="<?php if ( wporg_support_is_single_user_reviews() ) :?>current<?php endif; ?>">
     69            <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID === get_current_blog_id() ) : ?>
     70                <li class="
     71                <?php
     72                if ( wporg_support_is_single_user_reviews() ) :
     73                    ?>
     74 current<?php endif; ?>">
    5475                    <span class='bbp-user-reviews-link'>
    55                         <a href="<?php bbp_user_profile_url(); ?>reviews/" title="<?php
    56                             /* translators: %s: user's display name */
    57                             printf( esc_attr__( "%s's Reviews Written", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    58                         ?>"><?php esc_html_e( 'Reviews Written', 'wporg-forums' ); ?></a>
     76                        <a href="<?php bbp_user_profile_url(); ?>reviews/" title="
     77                                                               <?php
     78                                                                /* translators: %s: user's display name */
     79                                                                printf( esc_attr__( "%s's Reviews Written", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     80                                                                ?>
     81                        "><?php esc_html_e( 'Reviews Written', 'wporg-forums' ); ?></a>
    5982                    </span>
    6083                </li>
    6184            <?php endif; ?>
    6285
    63             <li class="<?php if ( wporg_support_is_single_user_topics_replied_to() ) :?>current<?php endif; ?>">
     86            <li class="
     87            <?php
     88            if ( wporg_support_is_single_user_topics_replied_to() ) :
     89                ?>
     90 current<?php endif; ?>">
    6491                <span class='bbp-user-topics-replied-to-link'>
    65                     <a href="<?php bbp_user_profile_url(); ?>replied-to/" title="<?php
    66                         /* translators: %s: user's display name */
    67                         printf( esc_attr__( 'Topics %s Has Replied To', 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    68                     ?>"><?php esc_html_e( 'Topics Replied To', 'wporg-forums' ); ?></a>
     92                    <a href="<?php bbp_user_profile_url(); ?>replied-to/" title="
     93                                                            <?php
     94                                                            /* translators: %s: user's display name */
     95                                                            printf( esc_attr__( 'Topics %s Has Replied To', 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     96                                                            ?>
     97                    "><?php esc_html_e( 'Topics Replied To', 'wporg-forums' ); ?></a>
    6998                </span>
    7099            </li>
    71100
    72101            <?php if ( function_exists( 'bbp_is_engagements_active' ) && bbp_is_engagements_active() ) : ?>
    73                 <li class="<?php if ( bbp_is_single_user_engagements() ) :?>current<?php endif; ?>">
     102                <li class="
     103                <?php
     104                if ( bbp_is_single_user_engagements() ) :
     105                    ?>
     106 current<?php endif; ?>">
    74107                    <span class='bbp-user-engagements-created-link'>
    75                         <a href="<?php bbp_user_engagements_url(); ?>" title="<?php
    76                             /* translators: %s: user's display name */
    77                             printf( esc_attr__( "%s's Engagements", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    78                         ?>"><?php esc_html_e( 'Engagements', 'wporg-forums' ); ?></a>
     108                        <a href="<?php bbp_user_engagements_url(); ?>" title="
     109                                                                   <?php
     110                                                                    /* translators: %s: user's display name */
     111                                                                    printf( esc_attr__( "%s's Engagements", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     112                                                                    ?>
     113                        "><?php esc_html_e( 'Engagements', 'wporg-forums' ); ?></a>
    79114                    </span>
    80115                </li>
     
    82117
    83118            <?php if ( bbp_is_favorites_active() ) : ?>
    84                 <li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>">
     119                <li class="
     120                <?php
     121                if ( bbp_is_favorites() ) :
     122                    ?>
     123 current<?php endif; ?>">
    85124                    <span class="bbp-user-favorites-link">
    86                         <a href="<?php bbp_favorites_permalink(); ?>" title="<?php
    87                             /* translators: %s: user's display name */
    88                             printf( esc_attr__( "%s's Favorites", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    89                         ?>"><?php esc_html_e( 'Favorites', 'wporg-forums' ); ?></a>
     125                        <a href="<?php bbp_favorites_permalink(); ?>" title="
     126                                                                  <?php
     127                                                                    /* translators: %s: user's display name */
     128                                                                    printf( esc_attr__( "%s's Favorites", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     129                                                                    ?>
     130                        "><?php esc_html_e( 'Favorites', 'wporg-forums' ); ?></a>
    90131                    </span>
    91132                </li>
     
    95136
    96137                <?php if ( bbp_is_subscriptions_active() ) : ?>
    97                     <li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>">
     138                    <li class="
     139                    <?php
     140                    if ( bbp_is_subscriptions() ) :
     141                        ?>
     142 current<?php endif; ?>">
    98143                        <span class="bbp-user-subscriptions-link">
    99                             <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php
    100                                 /* translators: %s: user's display name */
    101                                 printf( esc_attr__( "%s's Subscriptions", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    102                             ?>"><?php esc_html_e( 'Subscriptions', 'wporg-forums' ); ?></a>
     144                            <a href="<?php bbp_subscriptions_permalink(); ?>" title="
     145                                                                          <?php
     146                                                                            /* translators: %s: user's display name */
     147                                                                            printf( esc_attr__( "%s's Subscriptions", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     148                                                                            ?>
     149                            "><?php esc_html_e( 'Subscriptions', 'wporg-forums' ); ?></a>
    103150                        </span>
    104151                    </li>
    105152                <?php endif; ?>
    106153
    107                 <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
     154                <li class="
     155                <?php
     156                if ( bbp_is_single_user_edit() ) :
     157                    ?>
     158 current<?php endif; ?>">
    108159                    <span class="bbp-user-edit-link">
    109                         <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php
    110                             /* translators: %s: user's display name */
    111                             printf( esc_attr__( "Edit %s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
    112                         ?>"><?php esc_html_e( 'Edit', 'wporg-forums' ); ?></a>
     160                        <a href="<?php bbp_user_profile_edit_url(); ?>" title="
     161                                                                    <?php
     162                                                                    /* translators: %s: user's display name */
     163                                                                    printf( esc_attr__( "Edit %s's Profile", 'wporg-forums' ), bbp_get_displayed_user_field( 'display_name' ) );
     164                                                                    ?>
     165                        "><?php esc_html_e( 'Edit', 'wporg-forums' ); ?></a>
    113166                    </span>
    114167                </li>
     
    123176</div>
    124177
    125 <?php do_action( 'bbp_template_after_user_details' );
     178<?php
     179do_action( 'bbp_template_after_user_details' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-profile.php

    r5651 r7813  
    11<?php
    2 
    32/**
    43 * User Profile
     
    1211<div id="bbp-user-profile" class="bbp-user-profile">
    1312    <h2 class="entry-title"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></h2>
    14     <div class="bbp-user-section"><?php
    15         if ( current_user_can( 'moderate' ) && class_exists( 'WordPressdotorg\Forums\User_Moderation\Plugin' ) ) {
    16             $displayed_user_id = bbp_get_displayed_user_id();
    17             $plugin_instance   = WordPressdotorg\Forums\User_Moderation\Plugin::get_instance();
    18             $is_user_flagged   = $plugin_instance->is_user_flagged( $displayed_user_id );
    19             $moderator         = get_user_meta( $displayed_user_id, $plugin_instance::MODERATOR_META, true );
    20             $moderation_date   = get_user_meta( $displayed_user_id, $plugin_instance::MODERATION_DATE_META, true );
     13    <div class="bbp-user-section">
     14    <?php
     15    if ( current_user_can( 'moderate' ) && class_exists( 'WordPressdotorg\Forums\User_Moderation\Plugin' ) ) {
     16        $displayed_user_id = bbp_get_displayed_user_id();
     17        $plugin_instance   = WordPressdotorg\Forums\User_Moderation\Plugin::get_instance();
     18        $is_user_flagged   = $plugin_instance->is_user_flagged( $displayed_user_id );
     19        $moderator         = get_user_meta( $displayed_user_id, $plugin_instance::MODERATOR_META, true );
     20        $moderation_date   = get_user_meta( $displayed_user_id, $plugin_instance::MODERATION_DATE_META, true );
    2121
    22             if ( $is_user_flagged ) {
    23                 if ( $moderator && $moderation_date ) {
    24                     $msg = sprintf(
    25                         /* translators: 1: linked moderator's username, 2: moderation date, 3: moderation time */
    26                         __( 'This user has been flagged by %1$s on %2$s at %3$s.', 'wporg-forums' ),
    27                         sprintf( '<a href="%s">%s</a>', esc_url( home_url( "/users/$moderator/" ) ), $moderator ),
    28                         /* translators: localized date format, see https://secure.php.net/date */
    29                         mysql2date( __( 'F j, Y', 'wporg-forums' ), $moderation_date ),
    30                         /* translators: localized time format, see https://secure.php.net/date */
    31                         mysql2date( __( 'g:i a', 'wporg-forums' ), $moderation_date )
    32                     );
    33                 } elseif ( $moderator ) {
    34                     $msg = sprintf(
    35                         /* translators: %s: linked moderator's username */
    36                         __( 'This user has been flagged by %s.', 'wporg-forums' ),
    37                         sprintf( '<a href="%s">%s</a>', esc_url( home_url( "/users/$moderator/" ) ), $moderator )
    38                     );
    39                 } else {
    40                     $msg = __( 'This user has been flagged.', 'wporg-forums' );
    41                 }
     22        if ( $is_user_flagged ) {
     23            if ( $moderator && $moderation_date ) {
     24                $msg = sprintf(
     25                    /* translators: 1: linked moderator's username, 2: moderation date, 3: moderation time */
     26                    esc_html__( 'This user has been flagged by %1$s on %2$s at %3$s.', 'wporg-forums' ),
     27                    sprintf( '<a href="%s">%s</a>', esc_url( home_url( "/users/$moderator/" ) ), $moderator ),
     28                    /* translators: localized date format, see https://secure.php.net/date */
     29                    mysql2date( esc_html__( 'F j, Y', 'wporg-forums' ), $moderation_date ),
     30                    /* translators: localized time format, see https://secure.php.net/date */
     31                    mysql2date( esc_html__( 'g:i a', 'wporg-forums' ), $moderation_date )
     32                );
     33            } elseif ( $moderator ) {
     34                $msg = sprintf(
     35                    /* translators: %s: linked moderator's username */
     36                    esc_html__( 'This user has been flagged by %s.', 'wporg-forums' ),
     37                    sprintf( '<a href="%s">%s</a>', esc_url( home_url( "/users/$moderator/" ) ), $moderator )
     38                );
     39            } else {
     40                $msg = esc_html__( 'This user has been flagged.', 'wporg-forums' );
     41            }
    4242
    43                 printf(
    44                     '<div class="bbp-template-notice warning"><p>%s</p></div>',
    45                     $msg
    46                 );
    47             }
     43            printf(
     44                '<div class="bbp-template-notice warning"><p>%s</p></div>',
     45                $msg
     46            );
    4847        }
    49         ?>
     48    }
     49    ?>
    5050
    5151        <?php if ( bbp_get_displayed_user_field( 'description' ) ) : ?>
     
    5757        <?php if ( current_user_can( 'moderate' ) ) : ?>
    5858
    59             <p class="bbp-user-email"><?php
     59            <p class="bbp-user-email">
     60            <?php
    6061                /* translators: %s: user's email address */
    6162                printf( esc_html__( 'Email: %s', 'wporg-forums' ), bbp_get_displayed_user_field( 'user_email' ) );
    62             ?></p>
     63            ?>
     64            </p>
    6365
    6466        <?php endif; ?>
    6567
    66         <p class="bbp-user-wporg-profile"><?php
     68        <p class="bbp-user-wporg-profile">
     69        <?php
    6770            $user_nicename  = bbp_get_displayed_user_field( 'user_nicename' );
    6871            $slack_username = wporg_support_get_slack_username();
    6972
    70             if ( $slack_username && $slack_username != $user_nicename ) {
    71                 /* translators: 1: user's WordPress.org profile link, 2: user's Slack username, 3: make.wordpress.org/chat URL */
    72                 printf( __( '%1$s on WordPress.org, %2$s on <a href="%3$s">Slack</a>', 'wporg-forums' ),
    73                     wporg_support_get_wporg_profile_link(),
    74                     '@' . $slack_username,
    75                     'https://make.wordpress.org/chat/'
    76                 );
    77             } elseif( $slack_username ) {
    78                 /* translators: 1: WordPress.org and Slack username, 2: URL for information about Slack */
    79                 printf( __( '%1$s on WordPress.org and <a href="%2$s">Slack</a>', 'wporg-forums' ),
    80                     wporg_support_get_wporg_profile_link(),
    81                     'https://make.wordpress.org/chat/'
    82                 );
    83             } else {
    84                 /* translators: %s: user's WordPress.org profile link */
    85                 printf( esc_html__( '%s on WordPress.org', 'wporg-forums' ),
    86                     wporg_support_get_wporg_profile_link()
    87                 );
    88             }
    89         ?></p>
     73        if ( $slack_username && $slack_username !== $user_nicename ) {
     74            /* translators: 1: user's WordPress.org profile link, 2: user's Slack username, 3: make.wordpress.org/chat URL */
     75            printf(
     76                esc_html__( '%1$s on WordPress.org, %2$s on <a href="%3$s">Slack</a>', 'wporg-forums' ),
     77                wporg_support_get_wporg_profile_link(),
     78                '@' . $slack_username,
     79                'https://make.wordpress.org/chat/'
     80            );
     81        } elseif ( $slack_username ) {
     82            /* translators: 1: WordPress.org and Slack username, 2: URL for information about Slack */
     83            printf(
     84                esc_html__( '%1$s on WordPress.org and <a href="%2$s">Slack</a>', 'wporg-forums' ),
     85                wporg_support_get_wporg_profile_link(),
     86                'https://make.wordpress.org/chat/'
     87            );
     88        } else {
     89            /* translators: %s: user's WordPress.org profile link */
     90            printf(
     91                esc_html__( '%s on WordPress.org', 'wporg-forums' ),
     92                wporg_support_get_wporg_profile_link()
     93            );
     94        }
     95        ?>
     96        </p>
    9097
    9198        <?php if ( $custom_title = get_user_option( 'title', bbp_get_displayed_user_id() ) ) : ?>
    92    
    93             <p class="bbp-user-custom-title"><?php
     99
     100            <p class="bbp-user-custom-title">
     101            <?php
    94102                /* translators: %s: user's custom title */
    95103                printf( esc_html__( 'Title: %s', 'wporg-forums' ), esc_html( $custom_title ) );
    96             ?></p>
    97    
     104            ?>
     105            </p>
     106
    98107        <?php endif; ?>
    99108
    100         <p class="bbp-user-forum-role"><?php
     109        <p class="bbp-user-forum-role">
     110        <?php
    101111            /* translators: %s: user's forum role */
    102112            printf( esc_html__( 'Forum Role: %s', 'wporg-forums' ), bbp_get_user_display_role() );
    103         ?></p>
     113        ?>
     114        </p>
    104115
    105116        <?php if ( is_user_logged_in() && $website = bbp_get_displayed_user_field( 'user_url' ) ) : ?>
    106    
    107             <p class="bbp-user-website"><?php
    108             /* translators: %s: link to user's website */
     117
     118            <p class="bbp-user-website">
     119            <?php
     120            /* translators: %s: link to user's website */
    109121            printf( esc_html__( 'Website: %s', 'wporg-forums' ), sprintf( '<a href="%s">%s</a>', esc_url( $website ), esc_html( $website ) ) );
    110             ?></p>
    111    
     122            ?>
     123            </p>
     124
    112125        <?php endif; ?>
    113126
    114         <p class="bbp-user-member-since"><?php
     127        <p class="bbp-user-member-since">
     128        <?php
    115129            /* translators: %s: user's registration date */
    116130            printf( esc_html__( 'Member Since: %s', 'wporg-forums' ), wporg_support_get_user_registered_date() );
    117         ?></p>
     131        ?>
     132        </p>
    118133
    119         <p class="bbp-user-topic-count"><?php
     134        <p class="bbp-user-topic-count">
     135        <?php
    120136            /* translators: %s: number of user's topics */
    121137            printf( esc_html__( 'Topics Started: %s', 'wporg-forums' ), number_format_i18n( wporg_support_get_user_topics_count() ) );
    122         ?></p>
     138        ?>
     139        </p>
    123140
    124         <p class="bbp-user-reply-count"><?php
     141        <p class="bbp-user-reply-count">
     142        <?php
    125143            /* translators: %s: number of user's replies */
    126144            printf( esc_html__( 'Replies Created: %s', 'wporg-forums' ), number_format_i18n( bbp_get_user_reply_count_raw() ) );
    127         ?></p>
     145        ?>
     146        </p>
    128147
    129         <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == get_current_blog_id() ) : ?>
    130             <p class="bbp-user-review-count"><?php
     148        <?php if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID === get_current_blog_id() ) : ?>
     149            <p class="bbp-user-review-count">
     150            <?php
    131151                /* translators: %s: number of user's reviews */
    132152                printf( esc_html__( 'Reviews Written: %s', 'wporg-forums' ), number_format_i18n( wporg_support_get_user_reviews_count() ) );
    133             ?></p>
     153            ?>
     154            </p>
    134155        <?php endif; ?>
    135156    </div>
    136157</div><!-- #bbp-author-topics-started -->
    137158
    138 <?php do_action( 'bbp_template_after_user_profile' );
     159<?php
     160do_action( 'bbp_template_after_user_profile' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-reviews-written.php

    r5626 r7813  
    11<?php
    2 
    32/**
    43 * User Reviews Written
     
    1817            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    1918
    20             <?php bbp_get_template_part( 'loop',       'topics' ); ?>
     19            <?php bbp_get_template_part( 'loop', 'topics' ); ?>
    2120
    2221            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     
    2423        <?php else : ?>
    2524
    26             <p><?php bbp_is_user_home()
    27                 ? esc_html_e( 'You have not written any reviews.',      'wporg-forums' )
     25            <p>
     26                <?php
     27                bbp_is_user_home()
     28                ? esc_html_e( 'You have not written any reviews.', 'wporg-forums' )
    2829                : esc_html_e( 'This user has not written any reviews.', 'wporg-forums' );
    29             ?></p>
     30                ?>
     31            </p>
    3032
    3133        <?php endif; ?>
     
    3436</div><!-- #bbp-user-reviews-written -->
    3537
    36 <?php do_action( 'bbp_template_after_user_reviews_written' );
     38<?php
     39do_action( 'bbp_template_after_user_reviews_written' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-topics-replied-to.php

    r5626 r7813  
    11<?php
    2 
    32/**
    43 * User Topics Replied To
     
    1817            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    1918
    20             <?php bbp_get_template_part( 'loop',       'reply-topics' ); ?>
     19            <?php bbp_get_template_part( 'loop', 'reply-topics' ); ?>
    2120
    2221            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
     
    2423        <?php else : ?>
    2524
    26             <p><?php bbp_is_user_home()
    27                 ? esc_html_e( 'You have not replied to any topics.',      'wporg-forums' )
     25            <p>
     26                <?php
     27                bbp_is_user_home()
     28                ? esc_html_e( 'You have not replied to any topics.', 'wporg-forums' )
    2829                : esc_html_e( 'This user has not replied to any topics.', 'wporg-forums' );
    29             ?></p>
     30                ?>
     31            </p>
    3032
    3133        <?php endif; ?>
     
    3436</div><!-- #bbp-user-topics-replied-to -->
    3537
    36 <?php do_action( 'bbp_template_after_user_topics_replied_to' );
     38<?php
     39do_action( 'bbp_template_after_user_topics_replied_to' );
Note: See TracChangeset for help on using the changeset viewer.