Skip to:
Content

bbPress.org

Changeset 4959


Ignore:
Timestamp:
05/27/2013 08:25:05 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use esc_html_e() in extensions. See #1999.

Location:
trunk/includes/extend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/extend/akismet.php

    r4813 r4959  
    302302                                // Spammy
    303303                                case 'spam' :
    304                                         $this->update_post_history( $post_id, sprintf( __( '%1$s reported this %2$s as spam', 'bbpress' ),     $post_data['reporter'], $post_data['comment_type'] ), 'report-spam' );
     304                                        $this->update_post_history( $post_id, sprintf( esc_html__( '%1$s reported this %2$s as spam', 'bbpress' ),     $post_data['reporter'], $post_data['comment_type'] ), 'report-spam' );
    305305                                        update_post_meta( $post_id, '_bbp_akismet_user_result', 'true'                 );
    306306                                        update_post_meta( $post_id, '_bbp_akismet_user',        $post_data['reporter'] );
    … …  
    309309                                // Hammy
    310310                                case 'ham'  :
    311                                         $this->update_post_history( $post_id, sprintf( __( '%1$s reported this %2$s as not spam', 'bbpress' ), $post_data['reporter'], $post_data['comment_type'] ), 'report-ham'  );
     311                                        $this->update_post_history( $post_id, sprintf( esc_html__( '%1$s reported this %2$s as not spam', 'bbpress' ), $post_data['reporter'], $post_data['comment_type'] ), 'report-ham'  );
    312312                                        update_post_meta( $post_id, '_bbp_akismet_user_result', 'false'                 );
    313313                                        update_post_meta( $post_id, '_bbp_akismet_user',         $post_data['reporter'] );
    … …  
    398398                        $post_data['bbp_akismet_result'] = $response[1];
    399399                } else {
    400                         $post_data['bbp_akismet_result'] = __( 'No response', 'bbpress' );
     400                        $post_data['bbp_akismet_result'] = esc_html__( 'No response', 'bbpress' );
    401401                }
    402402
    … …  
    456456                                        // Leave a trail so other's know what we did
    457457                                        update_post_meta( $post_id, '_bbp_akismet_result', 'true' );
    458                                         $this->update_post_history( $post_id, __( 'Akismet caught this post as spam', 'bbpress' ), 'check-spam' );
     458                                        $this->update_post_history( $post_id, esc_html__( 'Akismet caught this post as spam', 'bbpress' ), 'check-spam' );
    459459
    460460                                        // If post_status isn't the spam status, as expected, leave a note
    461461                                        if ( $_post->post_status != bbp_get_spam_status_id() ) {
    462                                                 $this->update_post_history( $post_id, sprintf( __( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
     462                                                $this->update_post_history( $post_id, sprintf( esc_html__( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
    463463                                        }
    464464
    … …  
    468468                                        // Leave a trail so other's know what we did
    469469                                        update_post_meta( $post_id, '_bbp_akismet_result', 'false' );
    470                                         $this->update_post_history( $post_id, __( 'Akismet cleared this post', 'bbpress' ), 'check-ham' );
     470                                        $this->update_post_history( $post_id, esc_html__( 'Akismet cleared this post', 'bbpress' ), 'check-ham' );
    471471
    472472                                        // If post_status is the spam status, which isn't expected, leave a note
    … …  
    475475                                                // @todo Use wp_blacklist_check()
    476476
    477                                                 $this->update_post_history( $post_id, sprintf( __( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
     477                                                $this->update_post_history( $post_id, sprintf( esc_html__( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
    478478                                        }
    479479
    … …  
    482482                                        // Leave a trail so other's know what we did
    483483                                        update_post_meta( $post_id, '_bbp_akismet_error', time() );
    484                                         $this->update_post_history( $post_id, sprintf( __( 'Akismet was unable to check this post (response: %s), will automatically retry again later.', 'bbpress' ), $this->last_post['bbp_akismet_result'] ), 'check-error' );
     484                                        $this->update_post_history( $post_id, sprintf( esc_html__( 'Akismet was unable to check this post (response: %s), will automatically retry again later.', 'bbpress' ), $this->last_post['bbp_akismet_result'] ), 'check-error' );
    485485                                }
    486486
  • trunk/includes/extend/buddypress/activity.php

    r4948 r4959  
    193193
    194194                // Sitewide activity stream items
    195                 bp_activity_set_action( $this->component, $this->topic_create, __( 'New forum topic', 'bbpress' ) );
    196                 bp_activity_set_action( $this->component, $this->reply_create, __( 'New forum reply', 'bbpress' ) );
     195                bp_activity_set_action( $this->component, $this->topic_create, esc_html__( 'New forum topic', 'bbpress' ) );
     196                bp_activity_set_action( $this->component, $this->reply_create, esc_html__( 'New forum reply', 'bbpress' ) );
    197197        }
    198198
    … …  
    352352        ?>
    353353
    354                 <option value="<?php echo $this->topic_create; ?>"><?php _e( 'Topics',  'bbpress' ); ?></option>
    355                 <option value="<?php echo $this->reply_create; ?>"><?php _e( 'Replies', 'bbpress' ); ?></option>
     354                <option value="<?php echo $this->topic_create; ?>"><?php esc_html_e( 'Topics',  'bbpress' ); ?></option>
     355                <option value="<?php echo $this->reply_create; ?>"><?php esc_html_e( 'Replies', 'bbpress' ); ?></option>
    356356
    357357        <?php
    … …  
    418418
    419419                // Activity action & text
    420                 $activity_text    = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
     420                $activity_text    = sprintf( esc_html__( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
    421421                $activity_action  = apply_filters( 'bbp_activity_topic_create',         $activity_text, $user_id,   $topic_id,   $forum_id );
    422422                $activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', $topic_content                                     );
    … …  
    563563
    564564                // Activity action & text
    565                 $activity_text    = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
     565                $activity_text    = sprintf( esc_html__( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
    566566                $activity_action  = apply_filters( 'bbp_activity_reply_create',         $activity_text, $user_id, $reply_id,  $topic_id );
    567567                $activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', $reply_content                                  );
  • trunk/includes/extend/buddypress/group.php

    r4817 r4959  
    266266                $checked = is_admin() ? bp_group_is_forum_enabled( $group ) : bp_get_new_group_enable_forum() || bp_group_is_forum_enabled( bp_get_group_id() ); ?>
    267267
    268                 <h4><?php _e( 'Group Forum Settings', 'bbpress' ); ?></h4>
     268                <h4><?php esc_html_e( 'Group Forum Settings', 'bbpress' ); ?></h4>
    269269
    270270                <fieldset>
    271                         <legend class="screen-reader-text"><?php _e( 'Group Forum Settings', 'bbpress' ); ?></legend>
    272                         <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
     271                        <legend class="screen-reader-text"><?php esc_html_e( 'Group Forum Settings', 'bbpress' ); ?></legend>
     272                        <p><?php esc_html_e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
    273273
    274274                        <div class="field-group">
    275275                                <div class="checkbox">
    276                                         <label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
     276                                        <label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php checked( $checked ); ?> /> <?php esc_html_e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
    277277                                </div>
    278278
    279                                 <p class="description"><?php _e( 'Saying no will not delete existing forum content.', 'bbpress' ); ?></p>
     279                                <p class="description"><?php esc_html_e( 'Saying no will not delete existing forum content.', 'bbpress' ); ?></p>
    280280                        </div>
    281281
    282282                        <?php if ( bbp_is_user_keymaster() ) : ?>
    283283                                <div class="field-group">
    284                                         <label for="bbp_group_forum_id"><?php _e( 'Group Forum:', 'bbpress' ); ?></label>
     284                                        <label for="bbp_group_forum_id"><?php esc_html_e( 'Group Forum:', 'bbpress' ); ?></label>
    285285                                        <?php
    286286                                                bbp_dropdown( array(
    … …  
    290290                                                ) );
    291291                                        ?>
    292                                         <p class="description"><?php _e( 'Network administrators can reconfigure which forum belongs to this group.', 'bbpress' ); ?></p>
     292                                        <p class="description"><?php esc_html_e( 'Network administrators can reconfigure which forum belongs to this group.', 'bbpress' ); ?></p>
    293293                                </div>
    294294                        <?php endif; ?>
    … …  
    464464                $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta( bp_get_new_group_id(), 'forum_id' ); ?>
    465465
    466                 <h4><?php _e( 'Group Forum', 'bbpress' ); ?></h4>
    467 
    468                 <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
     466                <h4><?php esc_html_e( 'Group Forum', 'bbpress' ); ?></h4>
     467
     468                <p><?php esc_html_e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
    469469
    470470                <div class="checkbox">
    471                         <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
     471                        <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked( $checked ); ?> /> <?php esc_html_e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
    472472                </div>
    473473
    … …  
    755755
    756756                                                <div id="message" class="info">
    757                                                         <p><?php _e( 'This group does not currently have a forum.', 'bbpress' ); ?></p>
     757                                                        <p><?php esc_html_e( 'This group does not currently have a forum.', 'bbpress' ); ?></p>
    758758                                                </div>
    759759
    … …  
    10201020
    10211021                <p>
    1022                         <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
     1022                        <label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></label><br />
    10231023                        <?php bbp_dropdown( array( 'include' => $forum_ids, 'selected' => bbp_get_form_topic_forum() ) ); ?>
    10241024                </p>
Note: See TracChangeset for help on using the changeset viewer.