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