Skip to:
Content

bbPress.org

Changeset 4950


Ignore:
Timestamp:
05/27/2013 06:16:35 AM (13 years ago)
Author:
johnjamesjacoby
Message:

In admin, escape output of translated text where appropriate. Also review and refresh existing escaping approaches. See #1999.

Location:
trunk/includes/admin
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/admin.php

    r4949 r4950  
    13361336
    13371337        <div class="wrap about-wrap">
    1338             <h1><?php printf( __( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
    1339             <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s goes great with pizza and popcorn, and will nicely complement your community too!', 'bbpress' ), $display_version ); ?></div>
    1340             <div class="bbp-badge"><?php printf( __( 'Version %s', 'bbpress' ), $display_version ); ?></div>
     1338            <h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
     1339            <div class="about-text"><?php printf( esc_html__( 'Thank you for updating to the latest version! bbPress %s goes great with pizza and popcorn, and will nicely complement your community too!', 'bbpress' ), $display_version ); ?></div>
     1340            <div class="bbp-badge"><?php printf( esc_html__( 'Version %s', 'bbpress' ), $display_version ); ?></div>
    13411341
    13421342            <h2 class="nav-tab-wrapper">
    13431343                <a class="nav-tab nav-tab-active" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>">
    1344                     <?php _e( 'What&#8217;s New', 'bbpress' ); ?>
     1344                    <?php esc_html_e( 'What&#8217;s New', 'bbpress' ); ?>
    13451345                </a><a class="nav-tab" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>">
    1346                     <?php _e( 'Credits', 'bbpress' ); ?>
     1346                    <?php esc_html_e( 'Credits', 'bbpress' ); ?>
    13471347                </a>
    13481348            </h2>
    13491349
    13501350            <div class="changelog">
    1351                 <h3><?php _e( 'Forum Search', 'bbpress' ); ?></h3>
     1351                <h3><?php esc_html_e( 'Forum Search', 'bbpress' ); ?></h3>
    13521352
    13531353                <div class="feature-section">
    1354                     <h4><?php _e( 'Only Forum Content', 'bbpress' ); ?></h4>
    1355                     <p><?php _e( 'Allow your forums to be searched without mixing in your posts or pages.', 'bbpress' ); ?></p>
    1356 
    1357                     <h4><?php _e( 'Choose Your Own Slug', 'bbpress' ); ?></h4>
    1358                     <p><?php _e( 'Setup your forum search to live anywhere relative to the forum index.', 'bbpress' ); ?></p>
     1354                    <h4><?php esc_html_e( 'Only Forum Content', 'bbpress' ); ?></h4>
     1355                    <p><?php esc_html_e( 'Allow your forums to be searched without mixing in your posts or pages.', 'bbpress' ); ?></p>
     1356
     1357                    <h4><?php esc_html_e( 'Choose Your Own Slug', 'bbpress' ); ?></h4>
     1358                    <p><?php esc_html_e( 'Setup your forum search to live anywhere relative to the forum index.', 'bbpress' ); ?></p>
    13591359                </div>
    13601360            </div>
    13611361
    13621362            <div class="changelog">
    1363                 <h3><?php _e( 'New & Improved Forum Importers', 'bbpress' ); ?></h3>
     1363                <h3><?php esc_html_e( 'New & Improved Forum Importers', 'bbpress' ); ?></h3>
    13641364
    13651365                <div class="feature-section">
    1366                     <h4><?php _e( 'BBCodes & Smilies', 'bbpress' ); ?></h4>
    1367                     <p><?php _e( 'Happy faces all-around now that the importers properly convert BBCodes & smilies. :)', 'bbpress' ); ?></p>
    1368 
    1369                     <h4><?php _e( 'Vanilla', 'bbpress' ); ?></h4>
    1370                     <p><?php _e( 'Tired of plain old Vanilla? Now you can easily switch to <del>Mint Chocolate Chip</del> bbPress!', 'bbpress' ); ?></p>
    1371 
    1372                     <h4><?php _e( 'SimplePress', 'bbpress' ); ?></h4>
    1373                     <p><?php _e( 'Converting an existing SimplePress powered forum to bbPress has never been "simpler!"', 'bbpress' ); ?></p>
    1374 
    1375                     <h4><?php _e( 'Mingle', 'bbpress' ); ?></h4>
    1376                     <p><?php _e( 'No time to... chit-chat; convert your Mingle forums to bbPress today!', 'bbpress' ); ?></p>
     1366                    <h4><?php esc_html_e( 'BBCodes & Smilies', 'bbpress' ); ?></h4>
     1367                    <p><?php esc_html_e( 'Happy faces all-around now that the importers properly convert BBCodes & smilies. :)', 'bbpress' ); ?></p>
     1368
     1369                    <h4><?php esc_html_e( 'Vanilla', 'bbpress' ); ?></h4>
     1370                    <p><?php esc_html_e( 'Tired of plain old Vanilla? Now you can easily switch to <del>Mint Chocolate Chip</del> bbPress!', 'bbpress' ); ?></p>
     1371
     1372                    <h4><?php esc_html_e( 'SimplePress', 'bbpress' ); ?></h4>
     1373                    <p><?php esc_html_e( 'Converting an existing SimplePress powered forum to bbPress has never been "simpler!"', 'bbpress' ); ?></p>
     1374
     1375                    <h4><?php esc_html_e( 'Mingle', 'bbpress' ); ?></h4>
     1376                    <p><?php esc_html_e( 'No time to... chit-chat; convert your Mingle forums to bbPress today!', 'bbpress' ); ?></p>
    13771377                </div>
    13781378            </div>
    13791379
    13801380            <div class="changelog">
    1381                 <h3><?php _e( 'Even Better BuddyPress Integration', 'bbpress' ); ?></h3>
     1381                <h3><?php esc_html_e( 'Even Better BuddyPress Integration', 'bbpress' ); ?></h3>
    13821382
    13831383                <div class="feature-section">
    1384                     <h4><?php _e( 'bbPress powered BuddyPress Group Forums', 'bbpress' ); ?></h4>
    1385                     <p><?php _e( 'Use bbPress to manage your BuddyPress Group Forums, allowing for seamless integration and improved plugin performance.', 'bbpress' ); ?></p>
     1384                    <h4><?php esc_html_e( 'bbPress powered BuddyPress Group Forums', 'bbpress' ); ?></h4>
     1385                    <p><?php esc_html_e( 'Use bbPress to manage your BuddyPress Group Forums, allowing for seamless integration and improved plugin performance.', 'bbpress' ); ?></p>
    13861386                </div>
    13871387            </div>
    13881388
    13891389            <div class="changelog">
    1390                 <h3><?php _e( 'Under the Hood', 'bbpress' ); ?></h3>
     1390                <h3><?php esc_html_e( 'Under the Hood', 'bbpress' ); ?></h3>
    13911391
    13921392                <div class="feature-section col three-col">
    13931393                    <div>
    1394                         <h4><?php _e( 'Smarter Fancy Editor', 'bbpress' ); ?></h4>
    1395                         <p><?php _e( 'We simplified the Fancy Editor, and the allowed HTML tags that work with it.', 'bbpress' ); ?></p>
    1396 
    1397                         <h4><?php _e( 'Better Code Posting', 'bbpress' ); ?></h4>
    1398                         <p><?php _e( 'Your users can now post code snippets without too much hassle.', 'bbpress' ); ?></p>
     1394                        <h4><?php esc_html_e( 'Smarter Fancy Editor', 'bbpress' ); ?></h4>
     1395                        <p><?php esc_html_e( 'We simplified the Fancy Editor, and the allowed HTML tags that work with it.', 'bbpress' ); ?></p>
     1396
     1397                        <h4><?php esc_html_e( 'Better Code Posting', 'bbpress' ); ?></h4>
     1398                        <p><?php esc_html_e( 'Your users can now post code snippets without too much hassle.', 'bbpress' ); ?></p>
    13991399                    </div>
    14001400
    14011401                    <div>
    1402                         <h4><?php _e( 'Template Stacking', 'bbpress' ); ?></h4>
    1403                         <p><?php _e( 'Now you can replace specific template parts on the fly without modifying the existing theme.', 'bbpress' ); ?></p>
    1404 
    1405                         <h4><?php _e( 'TwentyThirteen Tested', 'bbpress' ); ?></h4>
    1406                         <p><?php _e( 'bbPress 2.3 already works with the in-development TwentyThirteen theme, coming in a future version of WordPress.', 'bbpress' ); ?></p>
     1402                        <h4><?php esc_html_e( 'Template Stacking', 'bbpress' ); ?></h4>
     1403                        <p><?php esc_html_e( 'Now you can replace specific template parts on the fly without modifying the existing theme.', 'bbpress' ); ?></p>
     1404
     1405                        <h4><?php esc_html_e( 'TwentyThirteen Tested', 'bbpress' ); ?></h4>
     1406                        <p><?php esc_html_e( 'bbPress 2.3 already works with the in-development TwentyThirteen theme, coming in a future version of WordPress.', 'bbpress' ); ?></p>
    14071407                    </div>
    14081408
    14091409                    <div class="last-feature">
    1410                         <h4><?php _e( 'Statistics Shortcode', 'bbpress' ); ?></h4>
    1411                         <p><?php _e( 'The old statistics easter-egg page was turned into an easy to use shortcode.', 'bbpress' ); ?></p>
    1412 
    1413                         <h4><?php _e( 'Green Theme Updated', 'bbpress' ); ?></h4>
    1414                         <p><?php _e( 'The green admin theme easter-egg was updated to work with WordPress 3.5 changes.', 'bbpress' ); ?></p>
     1410                        <h4><?php esc_html_e( 'Statistics Shortcode', 'bbpress' ); ?></h4>
     1411                        <p><?php esc_html_e( 'The old statistics easter-egg page was turned into an easy to use shortcode.', 'bbpress' ); ?></p>
     1412
     1413                        <h4><?php esc_html_e( 'Green Theme Updated', 'bbpress' ); ?></h4>
     1414                        <p><?php esc_html_e( 'The green admin theme easter-egg was updated to work with WordPress 3.5 changes.', 'bbpress' ); ?></p>
    14151415                    </div>
    14161416                </div>
     
    14181418
    14191419            <div class="return-to-dashboard">
    1420                 <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings', 'bbpress' ); ?></a>
     1420                <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php esc_html_e( 'Go to Forum Settings', 'bbpress' ); ?></a>
    14211421            </div>
    14221422
     
    14451445            <h2 class="nav-tab-wrapper">
    14461446                <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
    1447                     <?php _e( 'What&#8217;s New', 'bbpress' ); ?>
     1447                    <?php esc_html_e( 'What&#8217;s New', 'bbpress' ); ?>
    14481448                </a><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>" class="nav-tab nav-tab-active">
    1449                     <?php _e( 'Credits', 'bbpress' ); ?>
     1449                    <?php esc_html_e( 'Credits', 'bbpress' ); ?>
    14501450                </a>
    14511451            </h2>
    14521452
    1453             <p class="about-description"><?php _e( 'bbPress is created by a worldwide swarm of busy, busy bees.', 'bbpress' ); ?></p>
    1454 
    1455             <h4 class="wp-people-group"><?php _e( 'Project Leaders', 'bbpress' ); ?></h4>
     1453            <p class="about-description"><?php esc_html_e( 'bbPress is created by a worldwide swarm of busy, busy bees.', 'bbpress' ); ?></p>
     1454
     1455            <h4 class="wp-people-group"><?php esc_html_e( 'Project Leaders', 'bbpress' ); ?></h4>
    14561456            <ul class="wp-people-group " id="wp-people-group-project-leaders">
    14571457                <li class="wp-person" id="wp-person-matt">
    14581458                    <a href="http://profiles.wordpress.org/matt"><img src="http://0.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=60" class="gravatar" alt="Matt Mullenweg" /></a>
    14591459                    <a class="web" href="http://profiles.wordpress.org/matt">Matt Mullenweg</a>
    1460                     <span class="title"><?php _e( 'Founding Developer', 'bbpress' ); ?></span>
     1460                    <span class="title"><?php esc_html_e( 'Founding Developer', 'bbpress' ); ?></span>
    14611461                </li>
    14621462                <li class="wp-person" id="wp-person-johnjamesjacoby">
    14631463                    <a href="http://profiles.wordpress.org/johnjamesjacoby"><img src="http://0.gravatar.com/avatar/81ec16063d89b162d55efe72165c105f?s=60" class="gravatar" alt="John James Jacoby" /></a>
    14641464                    <a class="web" href="http://profiles.wordpress.org/johnjamesjacoby">John James Jacoby</a>
    1465                     <span class="title"><?php _e( 'Lead Developer', 'bbpress' ); ?></span>
     1465                    <span class="title"><?php esc_html_e( 'Lead Developer', 'bbpress' ); ?></span>
    14661466                </li>
    14671467                <li class="wp-person" id="wp-person-jmdodd">
     
    14721472            </ul>
    14731473
    1474             <h4 class="wp-people-group"><?php _e( 'Contributing Developers', 'bbpress' ); ?></h4>
     1474            <h4 class="wp-people-group"><?php esc_html_e( 'Contributing Developers', 'bbpress' ); ?></h4>
    14751475            <ul class="wp-people-group " id="wp-people-group-contributing-developers">
    14761476                <li class="wp-person" id="wp-person-netweb">
     
    14911491            </ul>
    14921492
    1493             <h4 class="wp-people-group"><?php _e( 'Core Contributors to bbPress 2.3', 'bbpress' ); ?></h4>
     1493            <h4 class="wp-people-group"><?php esc_html_e( 'Core Contributors to bbPress 2.3', 'bbpress' ); ?></h4>
    14941494            <p class="wp-credits-list">
    14951495                <a href="http://profiles.wordpress.org/alexvorn2">alexvorn2</a>,
     
    15321532
    15331533            <div class="return-to-dashboard">
    1534                 <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings', 'bbpress' ); ?></a>
     1534                <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php esc_html_e( 'Go to Forum Settings', 'bbpress' ); ?></a>
    15351535            </div>
    15361536
     
    15581558        <div class="wrap">
    15591559            <div id="icon-edit" class="icon32 icon32-posts-topic"><br /></div>
    1560             <h2><?php _e( 'Update Forum', 'bbpress' ); ?></h2>
     1560            <h2><?php esc_html_e( 'Update Forum', 'bbpress' ); ?></h2>
    15611561
    15621562        <?php
     
    15691569                bbp_version_updater(); ?>
    15701570
    1571                 <p><?php _e( 'All done!', 'bbpress' ); ?></p>
    1572                 <a class="button" href="index.php?page=bbp-update"><?php _e( 'Go Back', 'bbpress' ); ?></a>
     1571                <p><?php esc_html_e( 'All done!', 'bbpress' ); ?></p>
     1572                <a class="button" href="index.php?page=bbp-update"><?php esc_html_e( 'Go Back', 'bbpress' ); ?></a>
    15731573
    15741574                <?php
     
    15791579            default : ?>
    15801580
    1581                 <p><?php _e( 'You can update your forum through this page. Hit the link below to update.', 'bbpress' ); ?></p>
    1582                 <p><a class="button" href="index.php?page=bbp-update&amp;action=bbp-update"><?php _e( 'Update Forum', 'bbpress' ); ?></a></p>
     1581                <p><?php esc_html_e( 'You can update your forum through this page. Hit the link below to update.', 'bbpress' ); ?></p>
     1582                <p><a class="button" href="index.php?page=bbp-update&amp;action=bbp-update"><?php esc_html_e( 'Update Forum', 'bbpress' ); ?></a></p>
    15831583
    15841584            <?php break;
     
    16061606        <div class="wrap">
    16071607            <div id="icon-edit" class="icon32 icon32-posts-topic"><br /></div>
    1608             <h2><?php _e( 'Update Forums', 'bbpress' ); ?></h2>
     1608            <h2><?php esc_html_e( 'Update Forums', 'bbpress' ); ?></h2>
    16091609
    16101610        <?php
     
    16231623                if ( empty( $blogs ) ) : ?>
    16241624
    1625                     <p><?php _e( 'All done!', 'bbpress' ); ?></p>
    1626                     <a class="button" href="update-core.php?page=bbpress-update"><?php _e( 'Go Back', 'bbpress' ); ?></a>
     1625                    <p><?php esc_html_e( 'All done!', 'bbpress' ); ?></p>
     1626                    <a class="button" href="update-core.php?page=bbpress-update"><?php esc_html_e( 'Go Back', 'bbpress' ); ?></a>
    16271627
    16281628                    <?php break; ?>
     
    16751675
    16761676                    <p>
    1677                         <?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:', 'bbpress' ); ?>
    1678                         <a class="button" href="update-core.php?page=bbpress-update&amp;action=bbpress-update&amp;n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Forums', 'bbpress' ); ?></a>
     1677                        <?php esc_html_e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:', 'bbpress' ); ?>
     1678                        <a class="button" href="update-core.php?page=bbpress-update&amp;action=bbpress-update&amp;n=<?php echo ( $n + 5 ); ?>"><?php esc_html_e( 'Next Forums', 'bbpress' ); ?></a>
    16791679                    </p>
    16801680                    <script type='text/javascript'>
     
    16941694            default : ?>
    16951695
    1696                 <p><?php _e( 'You can update all the forums on your network through this page. It works by calling the update script of each site automatically. Hit the link below to update.', 'bbpress' ); ?></p>
    1697                 <p><a class="button" href="update-core.php?page=bbpress-update&amp;action=bbpress-update"><?php _e( 'Update Forums', 'bbpress' ); ?></a></p>
     1696                <p><?php esc_html_e( 'You can update all the forums on your network through this page. It works by calling the update script of each site automatically. Hit the link below to update.', 'bbpress' ); ?></p>
     1697                <p><a class="button" href="update-core.php?page=bbpress-update&amp;action=bbpress-update"><?php esc_html_e( 'Update Forums', 'bbpress' ); ?></a></p>
    16981698
    16991699            <?php break;
  • trunk/includes/admin/converter.php

    r4824 r4950  
    221221                    jQuery('#bbp-converter-stop').show();
    222222                    jQuery('#bbp-converter-progress').show();
    223                     bbconverter_log( '<p class="loading"><?php _e( 'Starting Conversion', 'bbpress' ); ?></p>' );
     223                    bbconverter_log( '<p class="loading"><?php esc_html_e( 'Starting Conversion', 'bbpress' ); ?></p>' );
    224224                    bbconverter_run();
    225225                }
     
    246246                bbconverter_log(response);
    247247
    248                 if ( response == '<p class="loading"><?php _e( 'Conversion Complete', 'bbpress' ); ?></p>' || response.indexOf('error') > -1 ) {
     248                if ( response == '<p class="loading"><?php esc_html_e( 'Conversion Complete', 'bbpress' ); ?></p>' || response.indexOf('error') > -1 ) {
    249249                    bbconverter_log('<p>Repair any missing information: <a href="<?php echo admin_url(); ?>tools.php?page=bbp-repair">Continue</a></p>');
    250250                    bbconverter_stop();
  • trunk/includes/admin/forums.php

    r4909 r4950  
    449449
    450450            case 'bbp_forum_created':
    451                 printf( __( '%1$s <br /> %2$s', 'bbpress' ),
     451                printf( '%1$s <br /> %2$s',
    452452                    get_the_date(),
    453453                    esc_attr( get_the_time() )
     
    459459                $last_active = bbp_get_forum_last_active_time( $forum_id, false );
    460460                if ( !empty( $last_active ) )
    461                     echo $last_active;
     461                    echo esc_html( $last_active );
    462462                else
    463                     _e( 'No Topics', 'bbpress' );
     463                    esc_html_e( 'No Topics', 'bbpress' );
    464464
    465465                break;
  • trunk/includes/admin/functions.php

    r4835 r4950  
    247247
    248248        // Loop through tabs and build navigation
    249         foreach( $tabs as $tab_id => $tab_data ) {
     249        foreach( array_values( $tabs ) as $tab_data ) {
    250250            $is_current = (bool) ( $tab_data['name'] == $active_tab );
    251251            $tab_class  = $is_current ? $active_class : $idle_class;
    252             $tabs_html .= '<a href="' . $tab_data['href'] . '" class="' . $tab_class . '">' . $tab_data['name'] . '</a>';
     252            $tabs_html .= '<a href="' . esc_url( $tab_data['href'] ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab_data['name'] ) . '</a>';
    253253        }
    254254
  • trunk/includes/admin/metaboxes.php

    r4944 r4950  
    4040    <div class="table table_content">
    4141
    42         <p class="sub"><?php _e( 'Discussion', 'bbpress' ); ?></p>
     42        <p class="sub"><?php esc_html_e( 'Discussion', 'bbpress' ); ?></p>
    4343
    4444        <table>
     
    125125    <div class="table table_discussion">
    126126
    127         <p class="sub"><?php _e( 'Users &amp; Moderation', 'bbpress' ); ?></p>
     127        <p class="sub"><?php esc_html_e( 'Users &amp; Moderation', 'bbpress' ); ?></p>
    128128
    129129        <table>
     
    259259
    260260    <p>
    261         <strong class="label"><?php _e( 'Type:', 'bbpress' ); ?></strong>
    262         <label class="screen-reader-text" for="bbp_forum_type_select"><?php _e( 'Type:', 'bbpress' ) ?></label>
     261        <strong class="label"><?php esc_html_e( 'Type:', 'bbpress' ); ?></strong>
     262        <label class="screen-reader-text" for="bbp_forum_type_select"><?php esc_html_e( 'Type:', 'bbpress' ) ?></label>
    263263        <?php bbp_form_forum_type_dropdown( $post_id ); ?>
    264264    </p>
     
    271271
    272272    <p>
    273         <strong class="label"><?php _e( 'Status:', 'bbpress' ); ?></strong>
    274         <label class="screen-reader-text" for="bbp_forum_status_select"><?php _e( 'Status:', 'bbpress' ) ?></label>
     273        <strong class="label"><?php esc_html_e( 'Status:', 'bbpress' ); ?></strong>
     274        <label class="screen-reader-text" for="bbp_forum_status_select"><?php esc_html_e( 'Status:', 'bbpress' ) ?></label>
    275275        <?php bbp_form_forum_status_dropdown( $post_id ); ?>
    276276    </p>
     
    283283
    284284    <p>
    285         <strong class="label"><?php _e( 'Visibility:', 'bbpress' ); ?></strong>
    286         <label class="screen-reader-text" for="bbp_forum_visibility_select"><?php _e( 'Visibility:', 'bbpress' ) ?></label>
     285        <strong class="label"><?php esc_html_e( 'Visibility:', 'bbpress' ); ?></strong>
     286        <label class="screen-reader-text" for="bbp_forum_visibility_select"><?php esc_html_e( 'Visibility:', 'bbpress' ) ?></label>
    287287        <?php bbp_form_forum_visibility_dropdown( $post_id ); ?>
    288288    </p>
     
    297297
    298298    <p>
    299         <strong class="label"><?php _e( 'Parent:', 'bbpress' ); ?></strong>
    300         <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum Parent', 'bbpress' ); ?></label>
     299        <strong class="label"><?php esc_html_e( 'Parent:', 'bbpress' ); ?></strong>
     300        <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum Parent', 'bbpress' ); ?></label>
    301301        <?php bbp_dropdown( array(
    302302            'post_type'          => bbp_get_forum_post_type(),
     
    320320
    321321    <p>
    322         <strong class="label"><?php _e( 'Order:', 'bbpress' ); ?></strong>
    323         <label class="screen-reader-text" for="menu_order"><?php _e( 'Forum Order', 'bbpress' ); ?></label>
     322        <strong class="label"><?php esc_html_e( 'Order:', 'bbpress' ); ?></strong>
     323        <label class="screen-reader-text" for="menu_order"><?php esc_html_e( 'Forum Order', 'bbpress' ); ?></label>
    324324        <input name="menu_order" type="number" step="1" size="4" id="menu_order" value="<?php echo esc_attr( $menu_order ); ?>" />
    325325    </p>
     
    348348
    349349    <p>
    350         <strong class="label"><?php _e( 'Type:', 'bbpress' ); ?></strong>
    351         <label class="screen-reader-text" for="bbp_stick_topic"><?php _e( 'Topic Type', 'bbpress' ); ?></label>
     350        <strong class="label"><?php esc_html_e( 'Type:', 'bbpress' ); ?></strong>
     351        <label class="screen-reader-text" for="bbp_stick_topic"><?php esc_html_e( 'Topic Type', 'bbpress' ); ?></label>
    352352        <?php bbp_topic_type_select( array( 'topic_id' => $post_id ) ); ?>
    353353    </p>
    354354
    355355    <p>
    356         <strong class="label"><?php _e( 'Forum:', 'bbpress' ); ?></strong>
    357         <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
     356        <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong>
     357        <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label>
    358358        <?php bbp_dropdown( array(
    359359            'post_type'          => bbp_get_forum_post_type(),
     
    407407
    408408        <p>
    409             <strong class="label"><?php _e( 'Forum:', 'bbpress' ); ?></strong>
    410             <label class="screen-reader-text" for="bbp_forum_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
     409            <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong>
     410            <label class="screen-reader-text" for="bbp_forum_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label>
    411411            <?php bbp_dropdown( array(
    412412                'post_type'          => bbp_get_forum_post_type(),
     
    432432
    433433    <p>
    434         <strong class="label"><?php _e( 'Topic:', 'bbpress' ); ?></strong>
    435         <label class="screen-reader-text" for="parent_id"><?php _e( 'Topic', 'bbpress' ); ?></label>
     434        <strong class="label"><?php esc_html_e( 'Topic:', 'bbpress' ); ?></strong>
     435        <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Topic', 'bbpress' ); ?></label>
    436436        <input name="parent_id" id="bbp_topic_id" type="text" value="<?php echo esc_attr( $reply_topic_id ); ?>" />
    437437    </p>
    438438
    439439    <p>
    440         <strong class="label"><?php _e( 'Reply To:', 'bbpress' ); ?></strong>
    441         <label class="screen-reader-text" for="bbp_reply_to"><?php _e( 'Reply To', 'bbpress' ); ?></label>
     440        <strong class="label"><?php esc_html_e( 'Reply To:', 'bbpress' ); ?></strong>
     441        <label class="screen-reader-text" for="bbp_reply_to"><?php esc_html_e( 'Reply To', 'bbpress' ); ?></label>
    442442        <input name="bbp_reply_to" id="bbp_reply_to" type="text" value="<?php echo esc_attr( $reply_to ); ?>" />
    443443    </p>
     
    469469
    470470        <p>
    471             <strong class="label"><?php _e( 'Name:', 'bbpress' ); ?></strong>
    472             <label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label>
     471            <strong class="label"><?php esc_html_e( 'Name:', 'bbpress' ); ?></strong>
     472            <label class="screen-reader-text" for="bbp_anonymous_name"><?php esc_html_e( 'Name', 'bbpress' ); ?></label>
    473473            <input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_name', true ) ); ?>" />
    474474        </p>
    475475
    476476        <p>
    477             <strong class="label"><?php _e( 'Email:', 'bbpress' ); ?></strong>
    478             <label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label>
     477            <strong class="label"><?php esc_html_e( 'Email:', 'bbpress' ); ?></strong>
     478            <label class="screen-reader-text" for="bbp_anonymous_email"><?php esc_html_e( 'Email', 'bbpress' ); ?></label>
    479479            <input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_email', true ) ); ?>" />
    480480        </p>
    481481
    482482        <p>
    483             <strong class="label"><?php _e( 'Website:', 'bbpress' ); ?></strong>
    484             <label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label>
     483            <strong class="label"><?php esc_html_e( 'Website:', 'bbpress' ); ?></strong>
     484            <label class="screen-reader-text" for="bbp_anonymous_website"><?php esc_html_e( 'Website', 'bbpress' ); ?></label>
    485485            <input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_website', true ) ); ?>" />
    486486        </p>
     
    489489
    490490        <p>
    491             <strong class="label"><?php _e( 'Name:', 'bbpress' ); ?></strong>
    492             <label class="screen-reader-text" for="bbp_author_name"><?php _e( 'Name', 'bbpress' ); ?></label>
     491            <strong class="label"><?php esc_html_e( 'Name:', 'bbpress' ); ?></strong>
     492            <label class="screen-reader-text" for="bbp_author_name"><?php esc_html_e( 'Name', 'bbpress' ); ?></label>
    493493            <input type="text" id="bbp_author_name" name="bbp_author_name" value="<?php echo esc_attr( get_the_author_meta( 'nicename', bbp_get_global_post_field( 'post_author' ) ) ); ?>" disabled="disabled" />
    494494        </p>
    495495
    496496        <p>
    497             <strong class="label"><?php _e( 'Email:', 'bbpress' ); ?></strong>
    498             <label class="screen-reader-text" for="bbp_author_email"><?php _e( 'Email', 'bbpress' ); ?></label>
     497            <strong class="label"><?php esc_html_e( 'Email:', 'bbpress' ); ?></strong>
     498            <label class="screen-reader-text" for="bbp_author_email"><?php esc_html_e( 'Email', 'bbpress' ); ?></label>
    499499            <input type="text" id="bbp_author_email" name="bbp_author_email" value="<?php echo esc_attr( get_the_author_meta( 'email', bbp_get_global_post_field( 'post_author' ) ) ); ?>" disabled="disabled" />
    500500        </p>
     
    503503
    504504    <p>
    505         <strong class="label"><?php _e( 'IP:', 'bbpress' ); ?></strong>
    506         <label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label>
     505        <strong class="label"><?php esc_html_e( 'IP:', 'bbpress' ); ?></strong>
     506        <label class="screen-reader-text" for="bbp_author_ip_address"><?php esc_html_e( 'IP Address', 'bbpress' ); ?></label>
    507507        <input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_author_ip', true ) ); ?>" disabled="disabled" />
    508508    </p>
  • trunk/includes/admin/replies.php

    r4944 r4950  
    526526                return;
    527527
    528             $reply_title = esc_html( bbp_get_reply_title( $reply->ID ) );
     528            $reply_title = bbp_get_reply_title( $reply->ID );
    529529
    530530            switch ( $notice ) {
     
    544544
    545545            <div id="message" class="<?php echo $is_failure == true ? 'error' : 'updated'; ?> fade">
    546                 <p style="line-height: 150%"><?php echo $message; ?></p>
     546                <p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
    547547            </div>
    548548
     
    624624                    $topic_title = bbp_get_topic_title( $topic_id );
    625625                    if ( empty( $topic_title ) ) {
    626                         $topic_title = __( 'No Topic', 'bbpress' );
     626                        $topic_title = esc_html__( 'No Topic', 'bbpress' );
    627627                    }
    628628
     
    632632                // Reply has no topic
    633633                } else {
    634                     _e( 'No Topic', 'bbpress' );
     634                    esc_html_e( 'No Topic', 'bbpress' );
    635635                }
    636636
     
    650650                    $forum_title = bbp_get_forum_title( $reply_forum_id );
    651651                    if ( empty( $forum_title ) ) {
    652                         $forum_title = __( 'No Forum', 'bbpress' );
     652                        $forum_title = esc_html__( 'No Forum', 'bbpress' );
    653653                    }
    654654
     
    656656                    if ( $reply_forum_id != $topic_forum_id ) {
    657657                        if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) {
    658                             $forum_title .= '<div class="attention">' . __( '(Mismatch)', 'bbpress' ) . '</div>';
     658                            $forum_title .= '<div class="attention">' . esc_html__( '(Mismatch)', 'bbpress' ) . '</div>';
    659659                        }
    660660                    }
     
    679679
    680680                // Output last activity time and date
    681                 printf( __( '%1$s <br /> %2$s', 'bbpress' ),
     681                printf( '%1$s <br /> %2$s',
    682682                    get_the_date(),
    683683                    esc_attr( get_the_time() )
     
    724724
    725725        // Reply view links to topic
    726         $actions['view'] = '<a href="' . bbp_get_reply_url( $reply->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
     726        $actions['view'] = '<a href="' . bbp_get_reply_url( $reply->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';
    727727
    728728        // User cannot view replies in trash
     
    733733        if ( current_user_can( 'moderate', $reply->ID ) ) {
    734734            if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_spam_status_id() ) ) ) {
    735                 $spam_uri  = esc_url( wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_'  . $reply->ID ) );
     735                $spam_uri  = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_'  . $reply->ID );
    736736                if ( bbp_is_reply_spam( $reply->ID ) ) {
    737                     $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . __( 'Not spam', 'bbpress' ) . '</a>';
     737                    $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';
    738738                } else {
    739                     $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark this reply as spam',    'bbpress' ) . '">' . __( 'Spam',     'bbpress' ) . '</a>';
     739                    $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this reply as spam',    'bbpress' ) . '">' . esc_html__( 'Spam',     'bbpress' ) . '</a>';
    740740                }
    741741            }
     
    745745        if ( current_user_can( 'delete_reply', $reply->ID ) ) {
    746746            if ( bbp_get_trash_status_id() == $reply->post_status ) {
    747                 $post_type_object = get_post_type_object( bbp_get_reply_post_type() );
    748                 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
     747                $post_type_object   = get_post_type_object( bbp_get_reply_post_type() );
     748                $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>";
    749749            } elseif ( EMPTY_TRASH_DAYS ) {
    750                 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
     750                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";
    751751            }
    752752
    753753            if ( bbp_get_trash_status_id() == $reply->post_status || !EMPTY_TRASH_DAYS ) {
    754                 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
     754                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";
    755755            } elseif ( bbp_get_spam_status_id() == $reply->post_status ) {
    756756                unset( $actions['trash'] );
  • trunk/includes/admin/settings.php

    r4944 r4950  
    2121function bbp_admin_get_settings_sections() {
    2222    return (array) apply_filters( 'bbp_admin_get_settings_sections', array(
    23 
    24         //
    2523        'bbp_settings_main' => array(
    2624            'title'    => __( 'Main Forum Settings', 'bbpress' ),
     
    428426?>
    429427
    430     <p><?php _e( 'Main forum settings for enabling features and setting time limits', 'bbpress' ); ?></p>
     428    <p><?php esc_html_e( 'Main forum settings for enabling features and setting time limits', 'bbpress' ); ?></p>
    431429
    432430<?php
     
    444442
    445443    <input name="_bbp_edit_lock" type="number" min="0" step="1" id="_bbp_edit_lock" value="<?php bbp_form_option( '_bbp_edit_lock', '5' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_edit_lock' ); ?> />
    446     <label for="_bbp_edit_lock"><?php _e( 'minutes', 'bbpress' ); ?></label>
     444    <label for="_bbp_edit_lock"><?php esc_html_e( 'minutes', 'bbpress' ); ?></label>
    447445
    448446<?php
     
    460458
    461459    <input name="_bbp_throttle_time" type="number" min="0" step="1" id="_bbp_throttle_time" value="<?php bbp_form_option( '_bbp_throttle_time', '10' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_throttle_time' ); ?> />
    462     <label for="_bbp_throttle_time"><?php _e( 'seconds', 'bbpress' ); ?></label>
     460    <label for="_bbp_throttle_time"><?php esc_html_e( 'seconds', 'bbpress' ); ?></label>
    463461
    464462<?php
     
    476474
    477475    <input id="_bbp_enable_favorites" name="_bbp_enable_favorites" type="checkbox" id="_bbp_enable_favorites" value="1" <?php checked( bbp_is_favorites_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_favorites' ); ?> />
    478     <label for="_bbp_enable_favorites"><?php _e( 'Allow users to mark topics as favorites', 'bbpress' ); ?></label>
     476    <label for="_bbp_enable_favorites"><?php esc_html_e( 'Allow users to mark topics as favorites', 'bbpress' ); ?></label>
    479477
    480478<?php
     
    492490
    493491    <input id="_bbp_enable_subscriptions" name="_bbp_enable_subscriptions" type="checkbox" id="_bbp_enable_subscriptions" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_subscriptions' ); ?> />
    494     <label for="_bbp_enable_subscriptions"><?php _e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
     492    <label for="_bbp_enable_subscriptions"><?php esc_html_e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
    495493
    496494<?php
     
    508506
    509507    <input id="_bbp_allow_topic_tags" name="_bbp_allow_topic_tags" type="checkbox" id="_bbp_allow_topic_tags" value="1" <?php checked( bbp_allow_topic_tags( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_topic_tags' ); ?> />
    510     <label for="_bbp_allow_topic_tags"><?php _e( 'Allow topics to have tags', 'bbpress' ); ?></label>
     508    <label for="_bbp_allow_topic_tags"><?php esc_html_e( 'Allow topics to have tags', 'bbpress' ); ?></label>
    511509
    512510<?php
     
    538536    </select>
    539537
    540     <label for="_bbp_thread_replies_depth"><?php _e( 'levels deep', 'bbpress' ); ?></label>
     538    <label for="_bbp_thread_replies_depth"><?php esc_html_e( 'levels deep', 'bbpress' ); ?></label>
    541539
    542540<?php
     
    554552
    555553    <input id="_bbp_allow_revisions" name="_bbp_allow_revisions" type="checkbox" id="_bbp_allow_revisions" value="1" <?php checked( bbp_allow_revisions( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_revisions' ); ?> />
    556     <label for="_bbp_allow_revisions"><?php _e( 'Allow topic and reply revision logging', 'bbpress' ); ?></label>
     554    <label for="_bbp_allow_revisions"><?php esc_html_e( 'Allow topic and reply revision logging', 'bbpress' ); ?></label>
    557555
    558556<?php
     
    570568
    571569    <input id="_bbp_allow_anonymous" name="_bbp_allow_anonymous" type="checkbox" id="_bbp_allow_anonymous" value="1" <?php checked( bbp_allow_anonymous( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_anonymous' ); ?> />
    572     <label for="_bbp_allow_anonymous"><?php _e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
     570    <label for="_bbp_allow_anonymous"><?php esc_html_e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
    573571
    574572<?php
     
    586584
    587585    <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> />
    588     <label for="_bbp_allow_global_access"><?php _e( 'Automatically assign default role to new, registered users upon visiting the site.', 'bbpress' ); ?></label>
     586    <label for="_bbp_allow_global_access"><?php esc_html_e( 'Automatically assign default role to new, registered users upon visiting the site.', 'bbpress' ); ?></label>
    589587
    590588<?php
     
    624622
    625623    <input id="_bbp_use_wp_editor" name="_bbp_use_wp_editor" type="checkbox" id="_bbp_use_wp_editor" value="1" <?php checked( bbp_use_wp_editor( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_use_wp_editor' ); ?> />
    626     <label for="_bbp_use_wp_editor"><?php _e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label>
     624    <label for="_bbp_use_wp_editor"><?php esc_html_e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label>
    627625
    628626<?php
     
    637635?>
    638636
    639     <p><?php _e( 'How your forum content is displayed within your existing theme.', 'bbpress' ); ?></p>
     637    <p><?php esc_html_e( 'How your forum content is displayed within your existing theme.', 'bbpress' ); ?></p>
    640638
    641639<?php
     
    661659    // @see bbPress::register_theme_packages()
    662660    foreach ( (array) bbpress()->theme_compat->packages as $id => $theme ) {
    663         $theme_options .= '<option value="' . esc_attr( $id ) . '"' . selected( $theme->id, $current_package, false ) . '>' . sprintf( __( '%1$s - %2$s', 'bbpress' ), esc_html( $theme->name ), esc_html( str_replace( WP_CONTENT_DIR, '', $theme->dir ) ) )  . '</option>';
     661        $theme_options .= '<option value="' . esc_attr( $id ) . '"' . selected( $theme->id, $current_package, false ) . '>' . sprintf( esc_html__( '%1$s - %2$s', 'bbpress' ), esc_html( $theme->name ), esc_html( str_replace( WP_CONTENT_DIR, '', $theme->dir ) ) )  . '</option>';
    664662    }
    665663
     
    667665
    668666        <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" <?php bbp_maybe_admin_setting_disabled( '_bbp_theme_package_id' ); ?>><?php echo $theme_options ?></select>
    669         <label for="_bbp_theme_package_id"><?php _e( 'will serve all bbPress templates', 'bbpress' ); ?></label>
     667        <label for="_bbp_theme_package_id"><?php esc_html_e( 'will serve all bbPress templates', 'bbpress' ); ?></label>
    670668
    671669    <?php else : ?>
    672670
    673         <p><?php _e( 'No template packages available.', 'bbpress' ); ?></p>
     671        <p><?php esc_html_e( 'No template packages available.', 'bbpress' ); ?></p>
    674672
    675673    <?php endif;
     
    687685
    688686    <input id="_bbp_use_autoembed" name="_bbp_use_autoembed" type="checkbox" id="_bbp_use_autoembed" value="1" <?php checked( bbp_use_autoembed( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_use_autoembed' ); ?> />
    689     <label for="_bbp_use_autoembed"><?php _e( 'Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and replies', 'bbpress' ); ?></label>
     687    <label for="_bbp_use_autoembed"><?php esc_html_e( 'Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and replies', 'bbpress' ); ?></label>
    690688
    691689<?php
     
    702700?>
    703701
    704     <p><?php _e( 'How many topics and replies to show per page', 'bbpress' ); ?></p>
     702    <p><?php esc_html_e( 'How many topics and replies to show per page', 'bbpress' ); ?></p>
    705703
    706704<?php
     
    718716
    719717    <input name="_bbp_topics_per_page" type="number" min="1" step="1" id="_bbp_topics_per_page" value="<?php bbp_form_option( '_bbp_topics_per_page', '15' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_topics_per_page' ); ?> />
    720     <label for="_bbp_topics_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
     718    <label for="_bbp_topics_per_page"><?php esc_html_e( 'per page', 'bbpress' ); ?></label>
    721719
    722720<?php
     
    734732
    735733    <input name="_bbp_replies_per_page" type="number" min="1" step="1" id="_bbp_replies_per_page" value="<?php bbp_form_option( '_bbp_replies_per_page', '15' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_replies_per_page' ); ?> />
    736     <label for="_bbp_replies_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
     734    <label for="_bbp_replies_per_page"><?php esc_html_e( 'per page', 'bbpress' ); ?></label>
    737735
    738736<?php
     
    749747?>
    750748
    751     <p><?php _e( 'How many topics and replies to show per RSS page', 'bbpress' ); ?></p>
     749    <p><?php esc_html_e( 'How many topics and replies to show per RSS page', 'bbpress' ); ?></p>
    752750
    753751<?php
     
    765763
    766764    <input name="_bbp_topics_per_rss_page" type="number" min="1" step="1" id="_bbp_topics_per_rss_page" value="<?php bbp_form_option( '_bbp_topics_per_rss_page', '25' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_topics_per_rss_page' ); ?> />
    767     <label for="_bbp_topics_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
     765    <label for="_bbp_topics_per_rss_page"><?php esc_html_e( 'per page', 'bbpress' ); ?></label>
    768766
    769767<?php
     
    781779
    782780    <input name="_bbp_replies_per_rss_page" type="number" min="1" step="1" id="_bbp_replies_per_rss_page" value="<?php bbp_form_option( '_bbp_replies_per_rss_page', '25' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_replies_per_rss_page' ); ?> />
    783     <label for="_bbp_replies_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
     781    <label for="_bbp_replies_per_rss_page"><?php esc_html_e( 'per page', 'bbpress' ); ?></label>
    784782
    785783<?php
     
    799797        flush_rewrite_rules(); ?>
    800798
    801     <p><?php _e( 'Customize your Forums root. Partner with a WordPress Page and use Shortcodes for more flexibility.', 'bbpress' ); ?></p>
     799    <p><?php esc_html_e( 'Customize your Forums root. Partner with a WordPress Page and use Shortcodes for more flexibility.', 'bbpress' ); ?></p>
    802800
    803801<?php
     
    832830
    833831    <input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( bbp_include_root_slug() ); bbp_maybe_admin_setting_disabled( '_bbp_include_root' ); ?> />
    834     <label for="_bbp_include_root"><?php _e( 'Prefix all forum content with the Forum Root slug (Recommended)', 'bbpress' ); ?></label>
     832    <label for="_bbp_include_root"><?php esc_html_e( 'Prefix all forum content with the Forum Root slug (Recommended)', 'bbpress' ); ?></label>
    835833
    836834<?php
     
    882880?>
    883881
    884     <p><?php _e( 'Customize your user profile slugs.', 'bbpress' ); ?></p>
     882    <p><?php esc_html_e( 'Customize your user profile slugs.', 'bbpress' ); ?></p>
    885883
    886884<?php
     
    982980?>
    983981
    984     <p><?php printf( __( 'Custom slugs for single forums, topics, replies, tags, views, and search.', 'bbpress' ), get_admin_url( null, 'options-permalink.php' ) ); ?></p>
     982    <p><?php printf( esc_html__( 'Custom slugs for single forums, topics, replies, tags, views, and search.', 'bbpress' ), get_admin_url( null, 'options-permalink.php' ) ); ?></p>
    985983
    986984<?php
     
    11001098?>
    11011099
    1102     <p><?php _e( 'Forum settings for BuddyPress', 'bbpress' ); ?></p>
     1100    <p><?php esc_html_e( 'Forum settings for BuddyPress', 'bbpress' ); ?></p>
    11031101
    11041102<?php
     
    11161114
    11171115    <input id="_bbp_enable_group_forums" name="_bbp_enable_group_forums" type="checkbox" id="_bbp_enable_group_forums" value="1" <?php checked( bbp_is_group_forums_active( true ) );  bbp_maybe_admin_setting_disabled( '_bbp_enable_group_forums' ); ?> />
    1118     <label for="_bbp_enable_group_forums"><?php _e( 'Allow BuddyPress Groups to have their own forums', 'bbpress' ); ?></label>
     1116    <label for="_bbp_enable_group_forums"><?php esc_html_e( 'Allow BuddyPress Groups to have their own forums', 'bbpress' ); ?></label>
    11191117
    11201118<?php
     
    11411139    ) ); ?>
    11421140
    1143     <label for="_bbp_group_forums_root_id"><?php _e( 'is the parent for all group forums', 'bbpress' ); ?></label>
    1144     <p class="description"><?php _e( 'Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress' ); ?></p>
     1141    <label for="_bbp_group_forums_root_id"><?php esc_html_e( 'is the parent for all group forums', 'bbpress' ); ?></label>
     1142    <p class="description"><?php esc_html_e( 'Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress' ); ?></p>
    11451143
    11461144<?php
     
    11571155?>
    11581156
    1159     <p><?php _e( 'Forum settings for Akismet', 'bbpress' ); ?></p>
     1157    <p><?php esc_html_e( 'Forum settings for Akismet', 'bbpress' ); ?></p>
    11601158
    11611159<?php
     
    11741172
    11751173    <input id="_bbp_enable_akismet" name="_bbp_enable_akismet" type="checkbox" id="_bbp_enable_akismet" value="1" <?php checked( bbp_is_akismet_active( true ) );  bbp_maybe_admin_setting_disabled( '_bbp_enable_akismet' ); ?> />
    1176     <label for="_bbp_enable_akismet"><?php _e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label>
     1174    <label for="_bbp_enable_akismet"><?php esc_html_e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label>
    11771175
    11781176<?php
     
    11971195        <?php screen_icon(); ?>
    11981196
    1199         <h2><?php _e( 'Forums Settings', 'bbpress' ) ?></h2>
     1197        <h2><?php esc_html_e( 'Forums Settings', 'bbpress' ) ?></h2>
    12001198
    12011199        <form action="options.php" method="post">
     
    12251223?>
    12261224
    1227     <p><?php _e( 'Information about your previous forums database so that they can be converted. <strong>Backup your database before proceeding.</strong>', 'bbpress' ); ?></p>
     1225    <p><?php esc_html_e( 'Information about your previous forums database so that they can be converted. <strong>Backup your database before proceeding.</strong>', 'bbpress' ); ?></p>
    12281226
    12291227<?php
     
    12481246        if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) {
    12491247            $file              = preg_replace( '/.php/', '', $file );
    1250             $platform_options .= '<option value="' . $file . '">' . $file . '</option>';
     1248            $platform_options .= '<option value="' . $file . '">' . esc_html( $file ) . '</option>';
    12511249        }
    12521250    }
     
    12551253
    12561254    <select name="_bbp_converter_platform" id="_bbp_converter_platform" /><?php echo $platform_options ?></select>
    1257     <label for="_bbp_converter_platform"><?php _e( 'is the previous forum software', 'bbpress' ); ?></label>
     1255    <label for="_bbp_converter_platform"><?php esc_html_e( 'is the previous forum software', 'bbpress' ); ?></label>
    12581256
    12591257<?php
     
    12691267
    12701268    <input name="_bbp_converter_db_server" type="text" id="_bbp_converter_db_server" value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" class="medium-text" />
    1271     <label for="_bbp_converter_db_server"><?php _e( 'IP or hostname', 'bbpress' ); ?></label>
     1269    <label for="_bbp_converter_db_server"><?php esc_html_e( 'IP or hostname', 'bbpress' ); ?></label>
    12721270
    12731271<?php
     
    12831281
    12841282    <input name="_bbp_converter_db_port" type="text" id="_bbp_converter_db_port" value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" class="small-text" />
    1285     <label for="_bbp_converter_db_port"><?php _e( 'Use default 3306 if unsure', 'bbpress' ); ?></label>
     1283    <label for="_bbp_converter_db_port"><?php esc_html_e( 'Use default 3306 if unsure', 'bbpress' ); ?></label>
    12861284
    12871285<?php
     
    12971295
    12981296    <input name="_bbp_converter_db_user" type="text" id="_bbp_converter_db_user" value="<?php bbp_form_option( '_bbp_converter_db_user' ); ?>" class="medium-text" />
    1299     <label for="_bbp_converter_db_user"><?php _e( 'User for your database connection', 'bbpress' ); ?></label>
     1297    <label for="_bbp_converter_db_user"><?php esc_html_e( 'User for your database connection', 'bbpress' ); ?></label>
    13001298
    13011299<?php
     
    13111309
    13121310    <input name="_bbp_converter_db_pass" type="password" id="_bbp_converter_db_pass" value="<?php bbp_form_option( '_bbp_converter_db_pass' ); ?>" class="medium-text" />
    1313     <label for="_bbp_converter_db_pass"><?php _e( 'Password to access the database', 'bbpress' ); ?></label>
     1311    <label for="_bbp_converter_db_pass"><?php esc_html_e( 'Password to access the database', 'bbpress' ); ?></label>
    13141312
    13151313<?php
     
    13251323
    13261324    <input name="_bbp_converter_db_name" type="text" id="_bbp_converter_db_name" value="<?php bbp_form_option( '_bbp_converter_db_name' ); ?>" class="medium-text" />
    1327     <label for="_bbp_converter_db_name"><?php _e( 'Name of the database with your old forum data', 'bbpress' ); ?></label>
     1325    <label for="_bbp_converter_db_name"><?php esc_html_e( 'Name of the database with your old forum data', 'bbpress' ); ?></label>
    13281326
    13291327<?php
     
    13381336?>
    13391337
    1340     <p><?php _e( 'Some optional parameters to help tune the conversion process.', 'bbpress' ); ?></p>
     1338    <p><?php esc_html_e( 'Some optional parameters to help tune the conversion process.', 'bbpress' ); ?></p>
    13411339
    13421340<?php
     
    13521350
    13531351    <input name="_bbp_converter_db_prefix" type="text" id="_bbp_converter_db_prefix" value="<?php bbp_form_option( '_bbp_converter_db_prefix' ); ?>" class="medium-text" />
    1354     <label for="_bbp_converter_db_prefix"><?php _e( '(If converting from BuddyPress Forums, use "wp_bb_" or your custom prefix)', 'bbpress' ); ?></label>
     1352    <label for="_bbp_converter_db_prefix"><?php esc_html_e( '(If converting from BuddyPress Forums, use "wp_bb_" or your custom prefix)', 'bbpress' ); ?></label>
    13551353
    13561354<?php
     
    13661364
    13671365    <input name="_bbp_converter_rows" type="text" id="_bbp_converter_rows" value="<?php bbp_form_option( '_bbp_converter_rows', '100' ); ?>" class="small-text" />
    1368     <label for="_bbp_converter_rows"><?php _e( 'rows to process at a time', 'bbpress' ); ?></label>
    1369     <p class="description"><?php _e( 'Keep this low if you experience out-of-memory issues.', 'bbpress' ); ?></p>
     1366    <label for="_bbp_converter_rows"><?php esc_html_e( 'rows to process at a time', 'bbpress' ); ?></label>
     1367    <p class="description"><?php esc_html_e( 'Keep this low if you experience out-of-memory issues.', 'bbpress' ); ?></p>
    13701368
    13711369<?php
     
    13811379
    13821380    <input name="_bbp_converter_delay_time" type="text" id="_bbp_converter_delay_time" value="<?php bbp_form_option( '_bbp_converter_delay_time', '1' ); ?>" class="small-text" />
    1383     <label for="_bbp_converter_delay_time"><?php _e( 'second(s) delay between each group of rows', 'bbpress' ); ?></label>
    1384     <p class="description"><?php _e( 'Keep this high to prevent too-many-connection issues.', 'bbpress' ); ?></p>
     1381    <label for="_bbp_converter_delay_time"><?php esc_html_e( 'second(s) delay between each group of rows', 'bbpress' ); ?></label>
     1382    <p class="description"><?php esc_html_e( 'Keep this high to prevent too-many-connection issues.', 'bbpress' ); ?></p>
    13851383
    13861384<?php
     
    13961394
    13971395    <input id="_bbp_converter_restart" name="_bbp_converter_restart" type="checkbox" id="_bbp_converter_restart" value="1" <?php checked( get_option( '_bbp_converter_restart', false ) ); ?> />
    1398     <label for="_bbp_converter_restart"><?php _e( 'Start a fresh conversion from the beginning', 'bbpress' ); ?></label>
    1399     <p class="description"><?php _e( 'You should clean old conversion information before starting over.', 'bbpress' ); ?></p>
     1396    <label for="_bbp_converter_restart"><?php esc_html_e( 'Start a fresh conversion from the beginning', 'bbpress' ); ?></label>
     1397    <p class="description"><?php esc_html_e( 'You should clean old conversion information before starting over.', 'bbpress' ); ?></p>
    14001398
    14011399<?php
     
    14111409
    14121410    <input id="_bbp_converter_clean" name="_bbp_converter_clean" type="checkbox" id="_bbp_converter_clean" value="1" <?php checked( get_option( '_bbp_converter_clean', false ) ); ?> />
    1413     <label for="_bbp_converter_clean"><?php _e( 'Purge all information from a previously attempted import', 'bbpress' ); ?></label>
    1414     <p class="description"><?php _e( 'Use this if an import failed and you want to remove that incomplete data.', 'bbpress' ); ?></p>
     1411    <label for="_bbp_converter_clean"><?php esc_html_e( 'Purge all information from a previously attempted import', 'bbpress' ); ?></label>
     1412    <p class="description"><?php esc_html_e( 'Use this if an import failed and you want to remove that incomplete data.', 'bbpress' ); ?></p>
    14151413
    14161414<?php
     
    14261424
    14271425    <input id="_bbp_converter_convert_users" name="_bbp_converter_convert_users" type="checkbox" id="_bbp_converter_convert_users" value="1" <?php checked( get_option( '_bbp_converter_convert_users', false ) ); ?> />
    1428     <label for="_bbp_converter_convert_users"><?php _e( 'Attempt to import user accounts from previous forums', 'bbpress' ); ?></label>
    1429     <p class="description"><?php _e( 'Non-bbPress passwords cannot be automatically converted. They will be converted as each user logs in.', 'bbpress' ); ?></p>
     1426    <label for="_bbp_converter_convert_users"><?php esc_html_e( 'Attempt to import user accounts from previous forums', 'bbpress' ); ?></label>
     1427    <p class="description"><?php esc_html_e( 'Non-bbPress passwords cannot be automatically converted. They will be converted as each user logs in.', 'bbpress' ); ?></p>
    14301428
    14311429<?php
     
    14481446        <?php screen_icon( 'tools' ); ?>
    14491447
    1450         <h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Import Forums', 'bbpress' ) ); ?></h2>
     1448        <h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( esc_html__( 'Import Forums', 'bbpress' ) ); ?></h2>
    14511449
    14521450        <form action="#" method="post" id="bbp-converter-settings">
     
    16941692        if ( ( $slug != $key ) && ( $slug_check == $this_slug ) ) : ?>
    16951693
    1696             <span class="attention"><?php printf( __( 'Possible %1$s conflict: <strong>%2$s</strong>', 'bbpress' ), $value['context'], $value['name'] ); ?></span>
     1694            <span class="attention"><?php printf( esc_html__( 'Possible %1$s conflict: %2$s', 'bbpress' ), $value['context'], '<strong>' . $value['name'] . '</strong>' ); ?></span>
    16971695
    16981696        <?php endif;
  • trunk/includes/admin/tools.php

    r4899 r4950  
    3434        <h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Repair Forums', 'bbpress' ) ); ?></h2>
    3535
    36         <p><?php _e( 'bbPress keeps track of relationships between forums, topics, replies, and topic tags, and users. Occasionally these relationships become out of sync, most often after an import or migration. Use the tools below to manually recalculate these relationships.', 'bbpress' ); ?></p>
    37         <p class="description"><?php _e( 'Some of these tools create substantial database overhead. Avoid running more than 1 repair job at a time.', 'bbpress' ); ?></p>
     36        <p><?php esc_html_e( 'bbPress keeps track of relationships between forums, topics, replies, and topic tags, and users. Occasionally these relationships become out of sync, most often after an import or migration. Use the tools below to manually recalculate these relationships.', 'bbpress' ); ?></p>
     37        <p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than 1 repair job at a time.', 'bbpress' ); ?></p>
    3838
    3939        <form class="settings" method="post" action="">
     
    4141                <tbody>
    4242                    <tr valign="top">
    43                         <th scope="row"><?php _e( 'Relationships to Repair:', 'bbpress' ) ?></th>
     43                        <th scope="row"><?php esc_html_e( 'Relationships to Repair:', 'bbpress' ) ?></th>
    4444                        <td>
    4545                            <fieldset>
    46                                 <legend class="screen-reader-text"><span><?php _e( 'Repair', 'bbpress' ) ?></span></legend>
     46                                <legend class="screen-reader-text"><span><?php esc_html_e( 'Repair', 'bbpress' ) ?></span></legend>
    4747
    4848                                <?php foreach ( bbp_admin_repair_list() as $item ) : ?>
     
    10951095
    10961096        <h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Reset Forums', 'bbpress' ) ); ?></h2>
    1097         <p><?php _e( 'This will revert your forums back to a brand new installation. This process cannot be undone. <strong>Backup your database before proceeding</strong>.', 'bbpress' ); ?></p>
     1097        <p><?php esc_html_e( 'This will revert your forums back to a brand new installation. This process cannot be undone. <strong>Backup your database before proceeding</strong>.', 'bbpress' ); ?></p>
    10981098
    10991099        <form class="settings" method="post" action="">
     
    11011101                <tbody>
    11021102                    <tr valign="top">
    1103                         <th scope="row"><?php _e( 'The following data will be removed:', 'bbpress' ) ?></th>
     1103                        <th scope="row"><?php esc_html_e( 'The following data will be removed:', 'bbpress' ) ?></th>
    11041104                        <td>
    1105                             <?php _e( 'All Forums',           'bbpress' ); ?><br />
    1106                             <?php _e( 'All Topics',           'bbpress' ); ?><br />
    1107                             <?php _e( 'All Replies',          'bbpress' ); ?><br />
    1108                             <?php _e( 'All Topic Tags',       'bbpress' ); ?><br />
    1109                             <?php _e( 'Related Meta Data',    'bbpress' ); ?><br />
    1110                             <?php _e( 'Forum Settings',       'bbpress' ); ?><br />
    1111                             <?php _e( 'Forum Activity',       'bbpress' ); ?><br />
    1112                             <?php _e( 'Forum User Roles',     'bbpress' ); ?><br />
    1113                             <?php _e( 'Importer Helper Data', 'bbpress' ); ?><br />
     1105                            <?php esc_html_e( 'All Forums',           'bbpress' ); ?><br />
     1106                            <?php esc_html_e( 'All Topics',           'bbpress' ); ?><br />
     1107                            <?php esc_html_e( 'All Replies',          'bbpress' ); ?><br />
     1108                            <?php esc_html_e( 'All Topic Tags',       'bbpress' ); ?><br />
     1109                            <?php esc_html_e( 'Related Meta Data',    'bbpress' ); ?><br />
     1110                            <?php esc_html_e( 'Forum Settings',       'bbpress' ); ?><br />
     1111                            <?php esc_html_e( 'Forum Activity',       'bbpress' ); ?><br />
     1112                            <?php esc_html_e( 'Forum User Roles',     'bbpress' ); ?><br />
     1113                            <?php esc_html_e( 'Importer Helper Data', 'bbpress' ); ?><br />
    11141114                        </td>
    11151115                    </tr>
    11161116                    <tr valign="top">
    1117                         <th scope="row"><?php _e( 'Are you sure you want to do this?', 'bbpress' ) ?></th>
     1117                        <th scope="row"><?php esc_html_e( 'Are you sure you want to do this?', 'bbpress' ) ?></th>
    11181118                        <td>
    11191119                            <fieldset>
    1120                                 <legend class="screen-reader-text"><span><?php _e( "Say it ain't so!", 'bbpress' ) ?></span></legend>
    1121                                 <label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php _e( 'This process cannot be undone.', 'bbpress' ); ?></label>
     1120                                <legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ) ?></span></legend>
     1121                                <label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></label>
    11221122                            </fieldset>
    11231123                        </td>
  • trunk/includes/admin/topics.php

    r4909 r4950  
    569569                return;
    570570
    571             $topic_title = esc_html( bbp_get_topic_title( $topic->ID ) );
     571            $topic_title = bbp_get_topic_title( $topic->ID );
    572572
    573573            switch ( $notice ) {
     
    607607
    608608            <div id="message" class="<?php echo $is_failure == true ? 'error' : 'updated'; ?> fade">
    609                 <p style="line-height: 150%"><?php echo $message; ?></p>
     609                <p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
    610610            </div>
    611611
     
    686686                    $forum_title = bbp_get_forum_title( $forum_id );
    687687                    if ( empty( $forum_title ) ) {
    688                         $forum_title = __( 'No Forum', 'bbpress' );
     688                        $forum_title = esc_html__( 'No Forum', 'bbpress' );
    689689                    }
    690690
     
    693693
    694694                } else {
    695                     _e( '(No Forum)', 'bbpress' );
     695                    esc_html_e( '(No Forum)', 'bbpress' );
    696696                }
    697697
     
    715715            // Freshness
    716716            case 'bbp_topic_created':
    717                 printf( __( '%1$s <br /> %2$s', 'bbpress' ),
     717                printf( '%1$s <br /> %2$s',
    718718                    get_the_date(),
    719719                    esc_attr( get_the_time() )
     
    726726                $last_active = bbp_get_topic_last_active_time( $topic_id, false );
    727727                if ( !empty( $last_active ) ) {
    728                     echo $last_active;
     728                    echo esc_html( $last_active );
    729729                } else {
    730                     _e( 'No Replies', 'bbpress' ); // This should never happen
     730                    esc_html_e( 'No Replies', 'bbpress' ); // This should never happen
    731731                }
    732732
     
    775775        // Show view link if it's not set, the topic is trashed and the user can view trashed topics
    776776        if ( empty( $actions['view'] ) && ( bbp_get_trash_status_id() == $topic->post_status ) && current_user_can( 'view_trash' ) )
    777             $actions['view'] = '<a href="' . bbp_get_topic_permalink( $topic->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
     777            $actions['view'] = '<a href="' . bbp_get_topic_permalink( $topic->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';
    778778
    779779        // Only show the actions if the user is capable of viewing them :)
     
    783783            // Show the 'close' and 'open' link on published and closed posts only
    784784            if ( in_array( $topic->post_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) {
    785                 $close_uri = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ) );
     785                $close_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID );
    786786                if ( bbp_is_topic_open( $topic->ID ) )
    787                     $actions['closed'] = '<a href="' . $close_uri . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . _x( 'Close', 'Close a Topic', 'bbpress' ) . '</a>';
     787                    $actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . _x( 'Close', 'Close a Topic', 'bbpress' ) . '</a>';
    788788                else
    789                     $actions['closed'] = '<a href="' . $close_uri . '" title="' . esc_attr__( 'Open this topic',  'bbpress' ) . '">' . _x( 'Open',  'Open a Topic',  'bbpress' ) . '</a>';
     789                    $actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Open this topic',  'bbpress' ) . '">' . _x( 'Open',  'Open a Topic',  'bbpress' ) . '</a>';
    790790            }
    791791
     
    794794
    795795                // Sticky
    796                 $stick_uri  = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_stick' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_'  . $topic->ID ) );
     796                $stick_uri  = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_stick' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_'  . $topic->ID );
    797797                if ( bbp_is_topic_sticky( $topic->ID ) ) {
    798                     $actions['stick'] = '<a href="' . $stick_uri . '" title="' . esc_attr__( 'Unstick this topic', 'bbpress' ) . '">' . __( 'Unstick', 'bbpress' ) . '</a>';
     798                    $actions['stick'] = '<a href="' . esc_url( $stick_uri ) . '" title="' . esc_attr__( 'Unstick this topic', 'bbpress' ) . '">' . esc_html__( 'Unstick', 'bbpress' ) . '</a>';
    799799                } else {
    800800                    $super_uri        = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_stick', 'super' => '1' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'stick-topic_'  . $topic->ID ) );
    801                     $actions['stick'] = '<a href="' . $stick_uri . '" title="' . esc_attr__( 'Stick this topic to its forum', 'bbpress' ) . '">' . __( 'Stick', 'bbpress' ) . '</a> (<a href="' . $super_uri . '" title="' . esc_attr__( 'Stick this topic to front', 'bbpress' ) . '">' . __( 'to front', 'bbpress' ) . '</a>)';
     801                    $actions['stick'] = '<a href="' . esc_url( $stick_uri ) . '" title="' . esc_attr__( 'Stick this topic to its forum', 'bbpress' ) . '">' . esc_html__( 'Stick', 'bbpress' ) . '</a> (<a href="' . $super_uri . '" title="' . esc_attr__( 'Stick this topic to front', 'bbpress' ) . '">' . esc_html__( 'to front', 'bbpress' ) . '</a>)';
    802802                }
    803803            }
    804804
    805805            // Spam
    806             $spam_uri  = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_spam' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'spam-topic_'  . $topic->ID ) );
     806            $spam_uri  = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_spam' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'spam-topic_'  . $topic->ID );
    807807            if ( bbp_is_topic_spam( $topic->ID ) )
    808                 $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark the topic as not spam', 'bbpress' ) . '">' . __( 'Not spam', 'bbpress' ) . '</a>';
     808                $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the topic as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';
    809809            else
    810                 $actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark this topic as spam',    'bbpress' ) . '">' . __( 'Spam',     'bbpress' ) . '</a>';
     810                $actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark this topic as spam',    'bbpress' ) . '">' . esc_html__( 'Spam',     'bbpress' ) . '</a>';
    811811
    812812        }
     
    816816            if ( bbp_get_trash_status_id() == $topic->post_status ) {
    817817                $post_type_object   = get_post_type_object( bbp_get_topic_post_type() );
    818                 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
     818                $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>";
    819819            } elseif ( EMPTY_TRASH_DAYS ) {
    820                 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
     820                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";
    821821            }
    822822
    823823            if ( bbp_get_trash_status_id() == $topic->post_status || !EMPTY_TRASH_DAYS ) {
    824                 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
     824                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";
    825825            } elseif ( bbp_get_spam_status_id() == $topic->post_status ) {
    826826                unset( $actions['trash'] );
  • trunk/includes/admin/users.php

    r4783 r4950  
    8080            unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
    8181
    82         <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
     82        <h3><?php esc_html_e( 'Forums', 'bbpress' ); ?></h3>
    8383
    8484        <table class="form-table">
    8585            <tbody>
    8686                <tr>
    87                     <th><label for="bbp-forums-role"><?php _e( 'Forum Role', 'bbpress' ); ?></label></th>
     87                    <th><label for="bbp-forums-role"><?php esc_html_e( 'Forum Role', 'bbpress' ); ?></label></th>
    8888                    <td>
    8989
     
    9494                            <?php if ( ! empty( $user_role ) ) : ?>
    9595
    96                                 <option value=""><?php _e( '&mdash; No role for these forums &mdash;', 'bbpress' ); ?></option>
     96                                <option value=""><?php esc_html_e( '&mdash; No role for these forums &mdash;', 'bbpress' ); ?></option>
    9797
    9898                            <?php else : ?>
    9999
    100                                 <option value="" selected="selected"><?php _e( '&mdash; No role for these forums &mdash;', 'bbpress' ); ?></option>
     100                                <option value="" selected="selected"><?php esc_html_e( '&mdash; No role for these forums &mdash;', 'bbpress' ); ?></option>
    101101
    102102                            <?php endif; ?>
     
    136136            unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
    137137
    138         <label class="screen-reader-text" for="bbp-new-role"><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></label>
     138        <label class="screen-reader-text" for="bbp-new-role"><?php esc_html_e( 'Change forum role to&hellip;', 'bbpress' ) ?></label>
    139139        <select name="bbp-new-role" id="bbp-new-role" style="display:inline-block; float:none;">
    140             <option value=''><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></option>
     140            <option value=''><?php esc_html_e( 'Change forum role to&hellip;', 'bbpress' ) ?></option>
    141141            <?php foreach ( $dynamic_roles as $role => $details ) : ?>
    142142                <option value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
Note: See TracChangeset for help on using the changeset viewer.