Making WordPress.org


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

Support Forum: Updated bbPress templates

See #3485.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.