Making WordPress.org


Ignore:
Timestamp:
11/01/2018 11:00:00 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Revert [7813], overzealous escaping breaks legitimate markup.

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

    r7813 r7818  
    11<?php
     2
    23/**
    34 * Merge Topic
     
    1718        <div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
    1819
    19             <form id="merge_topic" name="merge_topic" method="post" action="<?php bbp_topic_permalink(); ?>">
     20            <form id="merge_topic" name="merge_topic" method="post" action="<?php the_permalink(); ?>">
    2021
    2122                <fieldset class="bbp-form">
    2223
    23                     <legend><?php printf( esc_html__( 'Merge topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
     24                    <legend><?php printf( __( 'Merge topic "%s"', 'wporg-forums' ), bbp_get_topic_title() ); ?></legend>
    2425
    2526                    <div>
    2627
    2728                        <div class="bbp-template-notice info">
    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>
     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>
    3031                        </div>
    3132
    3233                        <div class="bbp-template-notice">
    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>
     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>
    3435                        </div>
    3536
    3637                        <fieldset class="bbp-form">
    37                             <legend><?php esc_html_e( 'Destination', 'wporg-forums' ); ?></legend>
     38                            <legend><?php _e( 'Destination', 'wporg-forums' ); ?></legend>
    3839                            <div>
    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                                     ?>
     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() ) ) ) ) : ?>
    4841
    49                                     <label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'wporg-forums' ); ?></label>
     42                                    <label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'wporg-forums' ); ?></label>
    5043
    5144                                    <?php
    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                                         );
     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                                        ) );
    6556                                    ?>
    6657
    6758                                <?php else : ?>
    6859
    69                                     <label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'wporg-forums' ); ?></label>
     60                                    <label><?php _e( 'There are no other topics in this forum to merge with.', 'wporg-forums' ); ?></label>
    7061
    7162                                <?php endif; ?>
     
    7566
    7667                        <fieldset class="bbp-form">
    77                             <legend><?php esc_html_e( 'Topic Extras', 'wporg-forums' ); ?></legend>
     68                            <legend><?php _e( 'Topic Extras', 'wporg-forums' ); ?></legend>
    7869
    7970                            <div>
     
    8273
    8374                                    <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
    84                                     <label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'wporg-forums' ); ?></label><br />
     75                                    <label for="bbp_topic_subscribers"><?php _e( 'Merge topic subscribers', 'wporg-forums' ); ?></label><br />
    8576
    8677                                <?php endif; ?>
    8778
    8879                                <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
    89                                 <label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'wporg-forums' ); ?></label><br />
     80                                <label for="bbp_topic_favoriters"><?php _e( 'Merge topic favoriters', 'wporg-forums' ); ?></label><br />
    9081
    9182                                <?php if ( bbp_allow_topic_tags() ) : ?>
    9283
    9384                                    <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
    94                                     <label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'wporg-forums' ); ?></label><br />
     85                                    <label for="bbp_topic_tags"><?php _e( 'Merge topic tags', 'wporg-forums' ); ?></label><br />
    9586
    9687                                <?php endif; ?>
     
    10091
    10192                        <div class="bbp-template-notice error">
    102                             <p><?php esc_html_e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
     93                            <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'wporg-forums' ); ?></p>
    10394                        </div>
    10495
    10596                        <div class="bbp-submit-wrapper">
    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>
     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>
    10798                        </div>
    10899                    </div>
     
    117108
    118109        <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
    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>
     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>
    120111        </div>
    121112
Note: See TracChangeset for help on using the changeset viewer.