Plugin Directory

Changeset 3109477

Timestamp:
06/28/2024 10:20:12 PM (6 weeks ago)
Author:
johnjamesjacoby
Message:

bbPress: merge improvements from 2.6 dev branch into trunk.

Location:
bbpress/trunk
Files:
1 added
30 edited

Legend:

Unmodified
Added
Removed
  • bbpress/trunk/bbpress.php

    r3109424 r3109477  
    66 * bbPress is forum software with a twist from the creators of WordPress.
    77 *
    8  * $Id: bbpress.php 7215 2021-10-15 14:25:11Z johnjamesjacoby $
     8 * $Id: bbpress.php 72Z johnjamesjacoby $
    99 *
    1010 * @package bbPress
     
    1818 * Author:            The bbPress Contributors
    1919 * Author URI:        https://bbpress.org
     20
     21
    2022 * Text Domain:       bbpress
    2123 * Domain Path:       /languages/
    22  * License:           GPLv2 or later (license.txt)
    2324 * Requires PHP:      5.6.20
    2425 * Requires at least: 6.0
    2526 * Tested up to:      6.5
    26  * Version:           2.7.0-alpha
     27 * Version:           2.7.0-alpha
    2728 */
    2829
  • bbpress/trunk/includes/admin/assets/css/admin.css

    r2476819 r3109477  
    11
    2 /* Kludge for too-wide forums dropdown */
     2/* Kludge for too-wide */
    33#poststuff #bbp_forum_attributes select#parent_id,
     4
    45#poststuff #bbp_topic_attributes select#parent_id,
    56#poststuff #bbp_reply_attributes select#bbp_forum_id,
    6 #poststuff #bbp_reply_attributes select#bbp_reply_to {
     7#poststuff #bbp_reply_attributes select#bbp_reply_to,
     8#poststuff #bbp_reply_attributes input#bbp_forum_id,
     9#poststuff #bbp_reply_attributes input#bbp_topic_id,
     10#poststuff #bbp_author_metabox input#bbp_author_id,
     11#poststuff #bbp_author_metabox input#bbp_author_ip_address {
    712    max-width: 170px;
    813}
     
    316321}
    317322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
    318352.column-bbp_forum_topic_count,
    319353.column-bbp_forum_reply_count,
  • bbpress/trunk/includes/admin/classes/class-bbp-admin.php

    r2476819 r3109477  
    8282     */
    8383    public $notices = array();
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
    84106
    85107    /** Functions *************************************************************/
  • bbpress/trunk/includes/admin/classes/class-bbp-converter-base.php

    r2276672 r3109477  
    10471047     * @param string $password
    10481048     */
    1049     public function callback_pass( $username, $password ) {
     1049    public function callback_pass( $username = '', $password = '' ) {
     1050
     1051        // Get user – Bail if not found
    10501052        $user = $this->get_row( $this->wpdb->prepare( "SELECT * FROM {$this->wpdb->users} WHERE user_login = %s AND user_pass = '' LIMIT 1", $username ) );
    1051         if ( ! empty( $user ) ) {
    1052             $usermeta = $this->get_row( $this->wpdb->prepare( "SELECT * FROM {$this->wpdb->usermeta} WHERE meta_key = %s AND user_id = %d LIMIT 1", '_bbp_password', $user->ID ) );
    1053 
    1054             if ( ! empty( $usermeta ) ) {
    1055                 if ( $this->authenticate_pass( $password, $usermeta->meta_value ) ) {
    1056                     $this->query( $this->wpdb->prepare( "UPDATE {$this->wpdb->users} SET user_pass = %s WHERE ID = %d", wp_hash_password( $password ), $user->ID ) );
    1057                     $this->query( $this->wpdb->prepare( "DELETE FROM {$this->wpdb->usermeta} WHERE meta_key = %s AND user_id = %d", '_bbp_password', $user->ID ) );
    1058 
    1059                     // Clean the cache for this user since their password was
    1060                     // upgraded from the old platform to the new.
    1061                     clean_user_cache( $user->ID );
    1062                 }
    1063             }
    1064         }
     1053        if ( empty( $user ) ) {
     1054            return;
     1055        }
     1056
     1057        // Get usermeta – Bail if not found
     1058        $usermeta = $this->get_row( $this->wpdb->prepare( "SELECT * FROM {$this->wpdb->usermeta} WHERE meta_key = %s AND user_id = %d LIMIT 1", '_bbp_password', $user->ID ) );
     1059        if ( empty( $usermeta ) ) {
     1060            return;
     1061        }
     1062
     1063        // Bail if auth fails
     1064        if ( ! $this->authenticate_pass( $password, $usermeta->meta_value ) ) {
     1065            return;
     1066        }
     1067
     1068        // Hash the password
     1069        $new_pass = wp_hash_password( $password );
     1070
     1071        // Update
     1072        $this->query( $this->wpdb->prepare( "UPDATE {$this->wpdb->users} SET user_pass = %s WHERE ID = %d", $new_pass, $user->ID ) );
     1073
     1074        // Clean up
     1075        unset( $new_pass );
     1076        $this->query( $this->wpdb->prepare( "DELETE FROM {$this->wpdb->usermeta} WHERE meta_key = %s AND user_id = %d", '_bbp_password', $user->ID ) );
     1077        $this->query( $this->wpdb->prepare( "DELETE FROM {$this->wpdb->usermeta} WHERE meta_key = %s AND user_id = %d", '_bbp_class',    $user->ID ) );
     1078
     1079        // Clean the cache for this user since their password was
     1080        // upgraded from the old platform to the new.
     1081        clean_user_cache( $user->ID );
    10651082    }
    10661083
  • bbpress/trunk/includes/admin/classes/class-bbp-converter-db.php

    r2190832 r3109477  
    3131     */
    3232    public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
    33         register_shutdown_function( array( $this, '__destruct' ) );
    3433
    3534        if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
  • bbpress/trunk/includes/admin/tools/repair.php

    r2413629 r3109477  
    498498    $result      = esc_html__( 'Failed!', 'bbpress' );
    499499
    500     $sql_select  = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
     500    $sql_type    = bbp_get_topic_post_type();
     501    $sql_status  = "'" . implode( "','", bbp_get_public_topic_statuses() ) . "'";
     502    $sql_select  = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$sql_type}' AND `post_status` IN ({$sql_status}) GROUP BY `post_author`";
    501503    $insert_rows = $bbp_db->get_results( $sql_select );
    502504
     
    542544
    543545    // Define variables
    544     $bbp_db    = bbp_db();
     546    $bbp_db    = bbp_db();
    545547    $statement   = esc_html__( 'Counting the number of topics to which each user has replied… %s', 'bbpress' );
    546548    $result      = esc_html__( 'Failed!', 'bbpress' );
    547549
    548     $sql_select  = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
     550    $sql_type    = bbp_get_reply_post_type();
     551    $sql_status  = "'" . implode( "','", bbp_get_public_reply_statuses() ) . "'";
     552    $sql_select  = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$sql_type}' AND `post_status` IN ({$sql_status}) GROUP BY `post_author`";
    549553    $insert_rows = $bbp_db->get_results( $sql_select );
    550554
     
    602606    }
    603607
    604     $topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
    605 
     608    $sql_type   = bbp_get_topic_post_type();
     609    $sql_status = "'" . implode( "','", bbp_get_public_topic_statuses() ) . "'";
     610    $sql_select = "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$sql_type}' AND `post_status` IN ({$sql_status})";
     611
     612    $topics = $bbp_db->get_col( $sql_select );
    606613    if ( is_wp_error( $topics ) ) {
    607614        return array( 2, sprintf( $statement, $result ) );
     
    668675    }
    669676
    670     $topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
     677    $sql_type    = bbp_get_topic_post_type();
     678    $sql_status  = "'" . implode( "','", bbp_get_public_topic_statuses() ) . "'";
     679    $sql_select  = "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$sql_type}' AND `post_status` IN ({$sql_status})";
     680
     681    $topics = $bbp_db->get_col( $sql_select );
    671682    if ( is_wp_error( $topics ) ) {
    672683        return array( 2, sprintf( $statement, $result ) );
     
    733744    }
    734745
    735     $forums = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_forum_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
     746    $sql_type    = bbp_get_forum_post_type();
     747    $sql_status  = "'" . implode( "','", bbp_get_public_forum_statuses() ) . "'";
     748    $sql_select  = "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$sql_type}' AND `post_status` IN ({$sql_status})";
     749
     750    $forums = $bbp_db->get_col( $sql_select );
    736751    if ( is_wp_error( $forums ) ) {
    737752        return array( 2, sprintf( $statement, $result ) );
  • bbpress/trunk/includes/common/functions.php

    r2413629 r3109477  
    186186
    187187    return $data;
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
    188215}
    189216
     
    278305 *
    279306 * @since 2.0.0 bbPress (r2769)
    280  * @since 2.6.0 bbPress (r6055) Introduced the `count_pending_topics` and
    281  *                               `count_pending_replies` arguments.
     307 * @since 2.6.0 bbPress (r6055)  Added:
     308 *                               `count_pending_topics`
     309 *                               `count_pending_replies`
     310 * @since 2.6.10 bbPress (r7235) Renamed:
     311 *                                `count_trashed_topics`  to `count_trash_topics`
     312 *                                `count_trashed_replies` to `count_trash_replies`
     313 *                                `count_spammed_topics`  to `count_spam_topics`
     314 *                                `count_spammed_replies` to `count_spam_replies`
     315 *                               Added:
     316 *                                `count_hidden_topics`
     317 *                                `count_hidden_replies`
    282318 *
    283319 * @param array $args Optional. The function supports these arguments (all
    284  *                     default to true):
    285  *  - count_users: Count users?
    286  *  - count_forums: Count forums?
    287  *  - count_topics: Count topics? If set to false, private, spammed and trashed
    288  *                   topics are also not counted.
    289  *  - count_pending_topics: Count pending topics? (only counted if the current
     320 *                    default to true):
     321 *
     322 *  - count_users:           Count users?
     323 *  - count_forums:          Count forums?
     324 *  - count_topics:          Count topics? If set to false, private, spam and
     325 *                           trash topics are also not counted.
     326 *  - count_pending_topics:  Count pending topics? (only counted if the current
    290327 *                           user has edit_others_topics cap)
    291  *  - count_private_topics: Count private topics? (only counted if the current
     328 *  - count_private_topics: Count private topics? (only counted if the current
    292329 *                           user has read_private_topics cap)
    293  *  - count_spammed_topics: Count spammed topics? (only counted if the current
     330 *  - count_hidden_topics:   Count hidden topics? (only counted if the current
     331 *                           user has read_hidden_topics cap)
     332 *  - count_spam_topics:     Count spam topics? (only counted if the current
    294333 *                           user has edit_others_topics cap)
    295  *  - count_trashed_topics: Count trashed topics? (only counted if the current
     334 *  - count_trash topics? (only counted if the current
    296335 *                           user has view_trash cap)
    297  *  - count_replies: Count replies? If set to false, private, spammed and
    298  *                   trashed replies are also not counted.
     336 *  - count_replies: and
     337 *                    replies are also not counted.
    299338 *  - count_pending_replies: Count pending replies? (only counted if the current
    300339 *                           user has edit_others_replies cap)
    301340 *  - count_private_replies: Count private replies? (only counted if the current
    302341 *                           user has read_private_replies cap)
    303  *  - count_spammed_replies: Count spammed replies? (only counted if the current
     342 *  - count_hidden_replies:  Count hidden replies? (only counted if the current
     343 *                           user has read_hidden_replies cap)
     344 *  - count_spam_replies:    Count spam replies? (only counted if the current
    304345 *                           user has edit_others_replies cap)
    305  *  - count_trashed_replies: Count trashed replies? (only counted if the current
     346 *  - count_trash replies? (only counted if the current
    306347 *                           user has view_trash cap)
    307  *  - count_tags: Count tags? If set to false, empty tags are also not counted
    308  *  - count_empty_tags: Count empty tags?
    309  * @return object Walked forum tree
     348 *  - count_tags:            Count tags? If set to false, empty tags are also
     349 *                           not counted
     350 *  - count_empty_tags:      Count empty tags?
     351 *
     352 * @return array Array of statistics
    310353 */
    311354function bbp_get_statistics( $args = array() ) {
     
    324367        'count_pending_topics'  => true,
    325368        'count_private_topics'  => true,
    326         'count_spammed_topics'  => true,
    327         'count_trashed_topics'  => true,
     369        'count_spam_topics'     => true,
     370        'count_trash_topics'    => true,
     371        'count_hidden_topics'   => true,
    328372
    329373        // Replies
     
    331375        'count_pending_replies' => true,
    332376        'count_private_replies' => true,
    333         'count_spammed_replies' => true,
    334         'count_trashed_replies' => true,
     377        'count_spam_replies'    => true,
     378        'count_trash_replies'   => true,
     379        'count_hidden_replies'  => true,
    335380
    336381        // Topic tags
     
    346391    $hidden_topic_title = $hidden_reply_title = '';
    347392
     393
     394
     395
     396
     397
     398
     399
     400
     401
    348402    // Users
    349403    $user_count = ! empty( $r['count_users'] )
     
    353407    // Forums
    354408    $forum_count = ! empty( $r['count_forums'] )
    355         ? wp_count_posts( bbp_get_forum_post_type() )->publish
     409        ? wp_count_posts( bbp_get_forum_post_type() )->
    356410        : 0;
    357411
    358     // Post statuses
    359     $pending = bbp_get_pending_status_id();
    360     $private = bbp_get_private_status_id();
    361     $spam    = bbp_get_spam_status_id();
    362     $trash   = bbp_get_trash_status_id();
    363     $closed  = bbp_get_closed_status_id();
     412    // Default capabilities
     413    $caps = array(
     414        'view_trash'           => false,
     415        'read_private_topics'  => false,
     416        'edit_others_topics'   => false,
     417        'read_private_replies' => false,
     418        'edit_others_replies'  => false,
     419        'edit_topic_tags'      => false
     420    );
     421
     422    // Get capabilities
     423    foreach ( $caps as $key => $cap ) {
     424        $caps[ $key ] = current_user_can( $cap );
     425    }
    364426
    365427    // Topics
    366428    if ( ! empty( $r['count_topics'] ) ) {
     429
     430
    367431        $all_topics  = wp_count_posts( bbp_get_topic_post_type() );
    368432
    369433        // Published (publish + closed)
    370         $topic_count = $all_topics->publish + $all_topics->{$closed};
    371 
    372         if ( current_user_can( 'read_private_topics' ) || current_user_can( 'edit_others_topics' ) || current_user_can( 'view_trash' ) ) {
    373 
    374             // Declare empty arrays
    375             $topics = $topic_titles = array();
    376 
    377             // Pending
    378             $topics['pending'] = ( ! empty( $r['count_pending_topics'] ) && current_user_can( 'edit_others_topics' ) )
    379                 ? (int) $all_topics->{$pending}
    380                 : 0;
    381 
    382             // Private
    383             $topics['private'] = ( ! empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) )
    384                 ? (int) $all_topics->{$private}
    385                 : 0;
    386 
    387             // Spam
    388             $topics['spammed'] = ( ! empty( $r['count_spammed_topics'] ) && current_user_can( 'edit_others_topics'  ) )
    389                 ? (int) $all_topics->{$spam}
    390                 : 0;
    391 
    392             // Trash
    393             $topics['trashed'] = ( ! empty( $r['count_trashed_topics'] ) && current_user_can( 'view_trash' ) )
    394                 ? (int) $all_topics->{$trash}
    395                 : 0;
    396 
    397             // Total hidden (pending + private + spam + trash)
    398             $topic_count_hidden = $topics['pending'] + $topics['private'] + $topics['spammed'] + $topics['trashed'];
    399 
    400             // Generate the hidden topic count's title attribute
    401             $topic_titles[] = ! empty( $topics['pending'] )
    402                 ? sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $topics['pending'] ) )
    403                 : '';
    404 
    405             $topic_titles[] = ! empty( $topics['private'] )
    406                 ? sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $topics['private'] ) )
    407                 : '';
    408 
    409             $topic_titles[] = ! empty( $topics['spammed'] )
    410                 ? sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['spammed'] ) )
    411                 : '';
    412 
    413             $topic_titles[] = ! empty( $topics['trashed'] )
    414                 ? sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['trashed'] ) )
    415                 : '';
    416 
    417             // Compile the hidden topic title
    418             $hidden_topic_title = implode( ' | ', array_filter( $topic_titles ) );
    419         }
     434        $topic_count = $all_topics->{$publish} + $all_topics->{$closed};
     435
     436        // Declare empty arrays
     437        $topics = $topic_titles = array_fill_keys( bbp_get_non_public_topic_statuses(), '' );
     438
     439        // Pending
     440        if ( ! empty( $r['count_pending_topics'] ) && ! empty( $caps['edit_others_topics'] ) ) {
     441            $topics[ $pending ]       = bbp_number_not_negative( $all_topics->{$pending} );
     442            $topic_titles[ $pending ] = sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $topics[ $pending ] ) );
     443        }
     444
     445        // Private
     446        if ( ! empty( $r['count_private_topics'] ) && ! empty( $caps['read_private_topics'] ) ) {
     447            $topics[ $private ]       = bbp_number_not_negative( $all_topics->{$private} );
     448            $topic_titles[ $private ] = sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $topics[ $private ] ) );
     449        }
     450
     451        // Hidden
     452        if ( ! empty( $r['count_hidden_topics'] ) && ! empty( $caps['read_hidden_topics'] ) ) {
     453            $topics[ $hidden ]       = bbp_number_not_negative( $all_topics->{$hidden} );
     454            $topic_titles[ $hidden ] = sprintf( esc_html__( 'Hidden: %s', 'bbpress' ), bbp_number_format_i18n( $topics[ $hidden ] ) );
     455        }
     456
     457        // Spam
     458        if ( ! empty( $r['count_spam_topics'] ) && ! empty( $caps['edit_others_topics'] ) ) {
     459            $topics[ $spam ]       = bbp_number_not_negative( $all_topics->{$spam} );
     460            $topic_titles[ $spam ] = sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $topics[ $spam ] ) );
     461        }
     462
     463        // Trash
     464        if ( ! empty( $r['count_trash_topics'] ) && ! empty( $caps['view_trash'] ) ) {
     465            $topics[ $trash ]       = bbp_number_not_negative( $all_topics->{$trash} );
     466            $topic_titles[ $trash ] = sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $topics[ $trash ] ) );
     467        }
     468
     469        // Total hidden (pending, private, hidden, spam, trash)
     470        $topic_count_hidden = array_sum( array_filter( $topics ) );
     471
     472        // Compile the hidden topic title
     473        $hidden_topic_title = implode( ' | ', array_filter( $topic_titles ) );
    420474    }
    421475
     
    423477    if ( ! empty( $r['count_replies'] ) ) {
    424478
     479
    425480        $all_replies = wp_count_posts( bbp_get_reply_post_type() );
    426481
    427482        // Published
    428         $reply_count = $all_replies->publish;
    429 
    430         if ( current_user_can( 'read_private_replies' ) || current_user_can( 'edit_others_replies' ) || current_user_can( 'view_trash' ) ) {
    431 
    432             // Declare empty arrays
    433             $replies = $reply_titles = array();
    434 
    435             // Pending
    436             $replies['pending'] = ( ! empty( $r['count_pending_replies'] ) && current_user_can( 'edit_others_replies' ) )
    437                 ? (int) $all_replies->{$pending}
    438                 : 0;
    439 
    440             // Private
    441             $replies['private'] = ( ! empty( $r['count_private_replies'] ) && current_user_can( 'read_private_replies' ) )
    442                 ? (int) $all_replies->{$private}
    443                 : 0;
    444 
    445             // Spam
    446             $replies['spammed'] = ( ! empty( $r['count_spammed_replies'] ) && current_user_can( 'edit_others_replies'  ) )
    447                 ? (int) $all_replies->{$spam}
    448                 : 0;
    449 
    450             // Trash
    451             $replies['trashed'] = ( ! empty( $r['count_trashed_replies'] ) && current_user_can( 'view_trash' ) )
    452                 ? (int) $all_replies->{$trash}
    453                 : 0;
    454 
    455             // Total hidden (pending + private + spam + trash)
    456             $reply_count_hidden = $replies['pending'] + $replies['private'] + $replies['spammed'] + $replies['trashed'];
    457 
    458             // Generate the hidden topic count's title attribute
    459             $reply_titles[] = ! empty( $replies['pending'] )
    460                 ? sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $replies['pending'] ) )
    461                 : '';
    462             $reply_titles[] = ! empty( $replies['private'] )
    463                 ? sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $replies['private'] ) )
    464                 : '';
    465 
    466             $reply_titles[] = ! empty( $replies['spammed'] )
    467                 ? sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['spammed'] ) )
    468                 : '';
    469 
    470             $reply_titles[] = ! empty( $replies['trashed'] )
    471                 ? sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['trashed'] ) )
    472                 : '';
    473 
    474             // Compile the hidden replies title
    475             $hidden_reply_title = implode( ' | ', array_filter( $reply_titles ) );
    476         }
     483        $reply_count = $all_replies->{$publish};
     484
     485        // Declare empty arrays
     486        $replies = $reply_titles = array_fill_keys( bbp_get_non_public_reply_statuses(), '' );
     487
     488        // Pending
     489        if ( ! empty( $r['count_pending_replies'] ) && ! empty( $caps['edit_others_replies'] ) ) {
     490            $replies[ $pending ]      = bbp_number_not_negative( $all_replies->{$pending} );
     491            $reply_titles[ $pending ] = sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $replies[ $pending ] ) );
     492        }
     493
     494        // Private
     495        if ( ! empty( $r['count_private_replies'] ) && ! empty( $caps['read_private_replies'] ) ) {
     496            $replies[ $private ]      = bbp_number_not_negative( $all_replies->{$private} );
     497            $reply_titles[ $private ] = sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $replies[ $private ] ) );
     498        }
     499
     500        // Hidden
     501        if ( ! empty( $r['count_hidden_replies'] ) && ! empty( $caps['read_hidden_replies'] ) ) {
     502            $replies[ $hidden ]      = bbp_number_not_negative( $all_replies->{$hidden} );
     503            $reply_titles[ $hidden ] = sprintf( esc_html__( 'Hidden: %s', 'bbpress' ), bbp_number_format_i18n( $replies[ $hidden ] ) );
     504        }
     505
     506        // Spam
     507        if ( ! empty( $r['count_spam_replies'] ) && ! empty( $caps['edit_others_replies'] ) ) {
     508            $replies[ $spam ]      = bbp_number_not_negative( $all_replies->{$spam} );
     509            $reply_titles[ $spam ] = sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $replies[ $spam ] ) );
     510        }
     511
     512        // Trash
     513        if ( ! empty( $r['count_trash_replies'] ) && ! empty( $caps['view_trash'] ) ) {
     514            $replies[ $trash ]      = bbp_number_not_negative( $all_replies->{$trash} );
     515            $reply_titles[ $trash ] = sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $replies[ $trash ] ) );
     516        }
     517
     518        // Total hidden (pending, private, hidden, spam, trash)
     519        $reply_count_hidden = array_sum( array_filter( $replies ) );
     520
     521        // Compile the hidden replies title
     522        $hidden_reply_title = implode( ' | ', $reply_titles );
    477523    }
    478524
     
    480526    if ( ! empty( $r['count_tags'] ) && bbp_allow_topic_tags() ) {
    481527
     528
     529
     530
    482531        // Get the count
    483         $topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id(), array( 'hide_empty' => true ) );
     532        $topic_tag_count = wp_count_terms( , array( 'hide_empty' => true ) );
    484533
    485534        // Empty tags
    486         if ( ! empty( $r['count_empty_tags'] ) && current_user_can( 'edit_topic_tags' ) ) {
    487             $empty_topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id() ) - $topic_tag_count;
     535        if ( ! empty( $r['count_empty_tags'] ) && ( 'edit_topic_tags' ) ) {
     536            $empty_topic_tag_count = wp_count_terms( ) - $topic_tag_count;
    488537        }
    489538    }
    490539
    491540    // Tally the tallies
    492     $counts = array_filter( array_map( 'absint', compact(
     541    $counts = array_map( 'absint', compact(
    493542        'user_count',
    494543        'forum_count',
     
    499548        'topic_tag_count',
    500549        'empty_topic_tag_count'
    501     ) ) );
     550    ) );
    502551
    503552    // Define return value
    504553    $statistics = array();
    505554
    506     // Loop through and store the integer and i18n formatted counts.
     555    // Loop through and store the integer and i18n formatted counts
    507556    foreach ( $counts as $key => $count ) {
    508         $statistics[ $key ]         = bbp_number_format_i18n( $count );
    509         $statistics[ "{$key}_int" ] = $count;
    510     }
    511 
    512     // Add the hidden (topic/reply) count title attribute strings because we
    513     // don't need to run the math functions on these (see above)
     557        $( $count );
     558        $statistics[ ;
     559   
     560    }
     561
     562    //
    514563    $statistics['hidden_topic_title'] = $hidden_topic_title;
    515564    $statistics['hidden_reply_title'] = $hidden_reply_title;
     
    10911140
    10921141    // Strip tags from text and setup mail data
    1093     $blog_name         = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     1142    $ ), ENT_QUOTES );
    10941143    $topic_title       = wp_specialchars_decode( strip_tags( bbp_get_topic_title( $topic_id ) ), ENT_QUOTES );
    10951144    $reply_author_name = wp_specialchars_decode( strip_tags( $reply_author_name ), ENT_QUOTES );
     
    11211170
    11221171    // For plugins to filter titles per reply/topic/user
    1123     $subject = apply_filters( 'bbp_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $reply_id, $topic_id );
     1172    $subject = apply_filters( 'bbp_subscription_mail_title', '[' . $e . '] ' . $topic_title, $reply_id, $topic_id );
    11241173    if ( empty( $subject ) ) {
    11251174        return;
     
    12581307
    12591308    // Strip tags from text and setup mail data
    1260     $blog_name         = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     1309    $ ), ENT_QUOTES );
    12611310    $topic_title       = wp_specialchars_decode( strip_tags( bbp_get_topic_title( $topic_id ) ), ENT_QUOTES );
    12621311    $topic_author_name = wp_specialchars_decode( strip_tags( $topic_author_name ), ENT_QUOTES );
     
    12881337
    12891338    // For plugins to filter titles per reply/topic/user
    1290     $subject = apply_filters( 'bbp_forum_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $topic_id, $forum_id, $user_id );
     1339    $subject = apply_filters( 'bbp_forum_subscription_mail_title', '[' . $e . '] ' . $topic_title, $topic_id, $forum_id, $user_id );
    12911340    if ( empty( $subject ) ) {
    12921341        return;
     
    24712520                $the_query = bbp_get_view_query_args( $view );
    24722521
    2473                 // Output the feed
    2474                 bbp_display_topics_feed_rss2( $the_query );
     2522                // Output the feed if view exists
     2523                if ( ! empty( $the_query ) ) {
     2524                    bbp_display_topics_feed_rss2( $the_query );
     2525                }
    24752526            }
    24762527        }
  • bbpress/trunk/includes/common/template.php

    r2632704 r3109477  
    7171
    7272/**
    73  * Add our custom head action to wp_head
     73 * Add our custom
    7474 *
    7575 * @since 2.0.0 bbPress (r2464)
     
    10961096    // Filter & return
    10971097    return (array) apply_filters( 'bbp_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
     1098
     1099
     1100
     1101
     1102
     1103
     1104
     1105
     1106
     1107
     1108
     1109
     1110
     1111
     1112
     1113
     1114
     1115
     1116
     1117
     1118
     1119
     1120
     1121
     1122
     1123
    10981124}
    10991125
  • bbpress/trunk/includes/core/actions.php

    r2313912 r3109477  
    130130add_action( 'bbp_init', 'bbp_topic_content_autoembed', 8 );
    131131
     132
     133
     134
     135
    132136/**
    133137 * bbp_ready - attached to end 'bbp_init' above
     
    138142 */
    139143add_action( 'bbp_ready',  'bbp_setup_akismet',    2  ); // Spam prevention for topics and replies
     144
     145
    140146add_action( 'bp_include', 'bbp_setup_buddypress', 10 ); // Social network integration
    141147
  • bbpress/trunk/includes/core/capabilities.php

    r2190832 r3109477  
    286286function bbp_add_forums_roles( $wp_roles = null ) {
    287287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
    288298    // Get the dynamic roles
    289299    $bbp_roles = bbp_get_dynamic_roles();
  • bbpress/trunk/includes/core/filters.php

    r2413629 r3109477  
    5252// Fix post author id for anonymous posts (set it back to 0) when the post status is changed
    5353add_filter( 'wp_insert_post_data', 'bbp_fix_post_author', 30, 2 );
     54
     55
     56
    5457
    5558// Force comments_status on bbPress post types
  • bbpress/trunk/includes/extend/akismet.php

    r2636925 r3109477  
    2121 */
    2222class BBP_Akismet {
     23
     24
     25
     26
     27
     28
     29
     30
     31
    2332
    2433    /**
  • bbpress/trunk/includes/forums/functions.php

    r2612664 r3109477  
    23022302    }
    23032303
    2304     // Get query post types array .
    2305     $post_types = (array) $posts_query->get( 'post_type' );
     2304    // Bail to prevent unintended wp-admin post_row overrides
     2305    if ( is_admin() && isset( $_REQUEST['post_status'] ) ) {
     2306        return;
     2307    }
     2308
     2309    // Get query post types as an array.
     2310    $post_types = array_filter( (array) $posts_query->get( 'post_type' ) );
    23062311
    23072312    // Forums
    2308     if ( bbp_get_forum_post_type() === implode( '', $post_types ) ) {
    2309 
    2310         // Prevent accidental wp-admin post_row override
    2311         if ( is_admin() && isset( $_REQUEST['post_status'] ) ) {
    2312             return;
    2313         }
     2313    if ( in_array( bbp_get_forum_post_type(), $post_types, true ) ) {
    23142314
    23152315        /** Default ***********************************************************/
     
    23192319
    23202320        // Get forums to exclude
    2321         $hidden_ids = bbp_exclude_forum_ids( 'array' );
    2322 
    2323         // Bail if no forums to exclude
    2324         if ( empty( $hidden_ids ) ) {
    2325             return;
    2326         }
    2327 
    2328         // Get any existing meta queries
    2329         $not_in = $posts_query->get( 'post__not_in', array() );
    2330 
    2331         // Add our meta query to existing
    2332         $not_in = array_unique( array_merge( $not_in, $hidden_ids ) );
    2333 
    2334         // Set the meta_query var
    2335         $posts_query->set( 'post__not_in', $not_in );
     2321        $_ids = bbp_exclude_forum_ids( 'array' );
     2322
     2323        //
     2324        if ( _ids ) ) {
     2325
     2326       
     2327            $not_in = $posts_query->get( 'post__not_in', array() );
     2328
     2329       
     2330            $not_in = array_unique( array_merge( $not_in, $forum_ids ) );
     2331
     2332       
     2333            $posts_query->set( 'post__not_in', $not_in );
     2334       
     2335   
    23362336
    23372337    // Some other post type besides Forums, Topics, or Replies
    2338     } elseif ( ! array_diff( $post_types, bbp_get_post_types() ) ) {
     2338    if ( ! array_diff( $post_types, bbp_get_post_types() ) ) {
    23392339
    23402340        // Get forums to exclude
    23412341        $forum_ids = bbp_exclude_forum_ids( 'meta_query' );
    23422342
    2343         // Bail if no forums to exclude
    2344         if ( empty( $forum_ids ) ) {
    2345             return;
    2346         }
    2347 
    2348         // Get any existing meta queries
    2349         $meta_query   = (array) $posts_query->get( 'meta_query', array() );
    2350 
    2351         // Add our meta query to existing
    2352         $meta_query[] = $forum_ids;
    2353 
    2354         // Set the meta_query var
    2355         $posts_query->set( 'meta_query', $meta_query );
     2343        // Excluding some forums
     2344        if ( ! empty( $forum_ids ) ) {
     2345
     2346            // Get any existing meta queries
     2347            $meta_query   = (array) $posts_query->get( 'meta_query', array() );
     2348
     2349            // Add our meta query to existing
     2350            $meta_query[] = $forum_ids;
     2351
     2352            // Set the new meta_query val
     2353            $posts_query->set( 'meta_query', $meta_query );
     2354        }
    23562355    }
    23572356}
  • bbpress/trunk/includes/forums/template.php

    r2276672 r3109477  
    17631763     *
    17641764     * @param int $forum_id Optional. Forum id
    1765      *                        id and forum id
     1765     *
    17661766     * @return string Author of forum
    17671767     */
  • bbpress/trunk/includes/replies/functions.php

    r2612664 r3109477  
    641641    /** Reply Status **********************************************************/
    642642
     643
     644
     645
    643646    // Use existing post_status
    644647    $reply_status = $reply->post_status;
     
    647650    if ( bbp_is_reply_public( $reply_id ) && ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    648651        $reply_status = bbp_get_pending_status_id();
     652
     653
     654
     655
     656
     657
     658
     659
     660
     661
     662
     663
    649664    }
    650665
     
    20602075 *
    20612076 * @param string $where
     2077
    20622078 * @return string
    20632079 */
     
    24122428    ), 'list_replies' );
    24132429
    2414     // Get replies to loop through in $_replies
    2415     echo '<ul>' . $r['walker']->paged_walk( $bbp->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ) . '</ul>';
    2416 
    2417     $bbp->max_num_pages            = $r['walker']->max_pages;
     2430    // Allowed styles (supported by BBP_Walker_Reply)
     2431    $allowed = array( 'div', 'ol', 'ul' );
     2432
     2433    // Get style
     2434    $style = in_array( $r['style'], $allowed, true )
     2435        ? $r['style']
     2436        : 'ul';
     2437
     2438    // Walk the replies
     2439    $walked_html = $r['walker']->paged_walk(
     2440        $bbp->reply_query->posts,
     2441        $r['max_depth'],
     2442        $r['page'],
     2443        $r['per_page'],
     2444        $r
     2445    );
     2446
     2447    // Override the "max_num_pages" setting
     2448    $bbp->max_num_pages = $r['walker']->max_pages;
     2449
     2450    // No longer in reply loop
    24182451    $bbp->reply_query->in_the_loop = false;
     2452
     2453
     2454
    24192455}
    24202456
  • bbpress/trunk/includes/replies/template.php

    r2476819 r3109477  
    403403     *
    404404     * @param int $reply_id Optional. Reply id
    405      *                        and reply id
     405     *
    406406     * @return string Permanent link to reply
    407407     */
     
    466466        $has_slug   = ! empty( $topic ) ? $topic->post_name : '';
    467467        $pretty     = bbp_use_pretty_urls();
    468         $published  = ! bbp_is_topic_pending( $topic_id );
     468        $published  = ( $topic_id );
    469469
    470470        // Don't include pagination if on first page
     
    800800 *
    801801 * @param int $reply_id Optional. Reply id
    802  * @return string reply revisions
     802 * @return reply revisions
    803803 */
    804804function bbp_get_reply_revisions( $reply_id = 0 ) {
     
    14581458     *
    14591459     * @param int $reply_id Optional. Reply id
    1460      *                        id and reply id
     1460     *
    14611461     * @return int The forum id of the reply
    14621462     */
  • bbpress/trunk/includes/search/template.php

    r2476819 r3109477  
    4747    }
    4848
    49     // What are the default allowed statuses (based on user caps)
    50     if ( bbp_get_view_all() ) {
    51 
    52         // Default view=all statuses
    53         $post_statuses = array_keys( bbp_get_topic_statuses() );
    54 
    55         // Add support for private status
    56         if ( current_user_can( 'read_private_topics' ) ) {
    57             $post_statuses[] = bbp_get_private_status_id();
    58         }
    59 
    60         // Join post statuses together
    61         $default['post_status'] = $post_statuses;
    62 
    63     // Lean on the 'perm' query var value of 'readable' to provide statuses
    64     } else {
    65         $default['perm'] = 'readable';
    66     }
     49    // Default public statuses (topics coincidentally cover all post types)
     50    $post_statuses = array_keys( bbp_get_public_topic_statuses() );
     51
     52    // Add support for private status
     53    if ( current_user_can( 'read_private_topics' ) ) {
     54        $post_statuses[] = bbp_get_private_status_id();
     55    }
     56
     57    // Add support for hidden status
     58    if ( current_user_can( 'read_hidden_topics' ) ) {
     59        $post_statuses[] = bbp_get_hidden_status_id();
     60    }
     61
     62    // Join post statuses together
     63    $default['post_status'] = $post_statuses;
    6764
    6865    /** Setup *****************************************************************/
  • bbpress/trunk/includes/topics/functions.php

    r2612664 r3109477  
    580580
    581581    // Maybe force into pending
    582     if ( bbp_is_topic_public( $topic->ID ) && ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
     582    if ( bbp_is_topic_public( $topic ) && ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    583583        $topic_status = bbp_get_pending_status_id();
    584584
     
    587587
    588588        // Allow capable users to explicitly override the status
    589         if ( current_user_can( 'moderate', $forum_id ) ) {
     589        if ( current_user_can( 'moderate', $_id ) ) {
    590590            $topic_status = sanitize_key( $_POST['bbp_topic_status'] );
    591591
  • bbpress/trunk/includes/topics/template.php

    r2476819 r3109477  
    809809
    810810        // If pretty permalinks are enabled, make our pagination pretty
    811         $base = ! empty( $has_slug ) && bbp_use_pretty_urls() && ! bbp_is_topic_pending( $r['topic_id'] )
     811        $base = ! empty( $has_slug ) && bbp_use_pretty_urls() && ( $r['topic_id'] )
    812812            ? trailingslashit( get_permalink( $r['topic_id'] ) ) . user_trailingslashit( bbp_get_paged_slug() . '/%#%/' )
    813813            : add_query_arg( 'paged', '%#%', get_permalink( $r['topic_id'] ) );
     
    964964 *
    965965 * @param int $topic_id Optional. Topic id
    966  * @return string Topic revisions
     966 * @return Topic revisions
    967967 */
    968968function bbp_get_topic_revisions( $topic_id = 0 ) {
  • bbpress/trunk/includes/users/functions.php

    r2319217 r3109477  
    955955 *
    956956 * @since 2.1.0 bbPress (r3813)
     957
    957958 */
    958959function bbp_user_maybe_convert_pass() {
    959960
    960     // Sanitize username
    961     $username = ! empty( $_POST['log'] )
    962         ? sanitize_user( $_POST['log'] )
     961    // Sanitize
     962    $ = ! empty( $_POST['log'] )
     963        ? sanitize_user( )
    963964        : '';
    964965
    965     // Bail if no username
    966     if ( empty( $username ) ) {
    967         return;
    968     }
    969 
    970     // Bail if no user password to convert
    971     $bbp_db = bbp_db();
    972     $query  = $bbp_db->prepare( "SELECT * FROM {$bbp_db->users} INNER JOIN {$bbp_db->usermeta} ON user_id = ID WHERE meta_key = %s AND user_login = %s LIMIT 1", '_bbp_class', $username );
    973     $row    = $bbp_db->get_row( $query );
    974     if ( empty( $row ) || is_wp_error( $row ) ) {
     966    // Sanitize password
     967    $pass = ! empty( $_POST['pwd'] )
     968        ? trim( $_POST['pwd'] )
     969        : '';
     970
     971    // Bail if no username or password
     972    if ( empty( $login ) || empty( $pass ) ) {
     973        return;
     974    }
     975
     976    // Get user by login...
     977    $user = get_user_by( 'login', $login );
     978
     979    // ...or get user by email
     980    if ( empty( $user ) && strpos( $login, '@' ) ) {
     981        $user = get_user_by( 'email', $login );
     982    }
     983
     984    // Bail if no user
     985    if ( empty( $user ) ) {
     986        return;
     987    }
     988
     989    // Get converter class from usermeta
     990    $class = get_user_meta( $user->ID, '_bbp_class', true );
     991
     992    // Bail if no converter class in meta
     993    if ( empty( $class ) || ! is_string( $class ) ) {
    975994        return;
    976995    }
     
    979998    bbp_setup_converter();
    980999
    981     // Try to convert the old password for this user
    982     $converter = bbp_new_converter( $row->meta_value );
    983 
    984     // Try to call the conversion method
     1000    // Try to instantiate the converter class
     1001    $converter = bbp_new_converter( $class );
     1002
     1003    // Bail if no converter
     1004    if ( empty( $converter ) ) {
     1005        return;
     1006    }
     1007
     1008    // Try to call the password conversion callback method
    9851009    if ( ( $converter instanceof BBP_Converter_Base ) && method_exists( $converter, 'callback_pass' ) ) {
    986         $converter->callback_pass( $username, $_POST['pwd'] );
    987     }
    988 }
     1010        $converter->callback_pass( $ );
     1011    }
     1012}
  • bbpress/trunk/readme.txt

    r3109424 r3109477  
    77License:           GNU General Public License v2 or later
    88Tags:              forum, forums, discussion, support
    9 Requires PHP:      5.6.40
     9Requires PHP:      5.6.0
    1010Requires at least: 6.0
    1111Tested up to:      6.5
  • bbpress/trunk/templates/default/bbpress/content-archive-topic.php

    r2190832 r3109477  
    1515<div id="bbpress-forums" class="bbpress-wrapper">
    1616
    17     <?php if ( bbp_allow_search() ) : ?>
    18 
    19         <div class="bbp-search-form">
    20 
    21             <?php bbp_get_template_part( 'form', 'search' ); ?>
    22 
    23         </div>
    24 
    25     <?php endif; ?>
     17    <?php bbp_get_template_part( 'form', 'search' ); ?>
    2618
    2719    <?php bbp_breadcrumb(); ?>
  • bbpress/trunk/templates/default/bbpress/content-search.php

    r2235773 r3109477  
    1515<div id="bbpress-forums" class="bbpress-wrapper">
    1616
     17
     18
    1719    <?php bbp_breadcrumb(); ?>
    1820
     
    2931        <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    3032
    31     <?php elseif ( bbp_get_search_terms() ) : ?>
     33    <?php else : ?>
    3234
    3335        <?php bbp_get_template_part( 'feedback',   'no-search' ); ?>
    34 
    35     <?php else : ?>
    36 
    37         <?php bbp_get_template_part( 'form', 'search' ); ?>
    3836
    3937    <?php endif; ?>
  • bbpress/trunk/templates/default/bbpress/content-statistics.php

    r2276672 r3109477  
    1414$stats = bbp_get_statistics(); ?>
    1515
    16 <dl role="main">
     16<dl role="main">
    1717
    1818    <?php do_action( 'bbp_before_statistics' ); ?>
  • bbpress/trunk/templates/default/bbpress/feedback-no-search.php

    r2190832 r3109477  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 ?>
     13?>
    1414
    1515<div class="bbp-template-notice">
     
    1818    </ul>
    1919</div>
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
  • bbpress/trunk/templates/default/bbpress/form-forum.php

    r2276672 r3109477  
    8585                    <?php do_action( 'bbp_theme_after_forum_form_content' ); ?>
    8686
    87                     <?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
    88 
    89                         <p class="form-allowed-tags">
    90                             <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'bbpress' ); ?></label><br />
    91                             <code><?php bbp_allowed_tags(); ?></code>
    92                         </p>
    93 
    94                     <?php endif; ?>
     87                    <?php bbp_get_template_part( 'form', 'allowed-tags' ); ?>
    9588
    9689                    <?php if ( bbp_allow_forum_mods() && current_user_can( 'assign_moderators' ) ) : ?>
  • bbpress/trunk/templates/default/bbpress/form-reply.php

    r2276672 r3109477  
    7474                    <?php do_action( 'bbp_theme_after_reply_form_content' ); ?>
    7575
    76                     <?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
    77 
    78                         <p class="form-allowed-tags">
    79                             <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'bbpress' ); ?></label><br />
    80                             <code><?php bbp_allowed_tags(); ?></code>
    81                         </p>
    82 
    83                     <?php endif; ?>
     76                    <?php bbp_get_template_part( 'form', 'allowed-tags' ); ?>
    8477
    8578                    <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?>
  • bbpress/trunk/templates/default/bbpress/form-topic.php

    r2190832 r3109477  
    9595                    <?php do_action( 'bbp_theme_after_topic_form_content' ); ?>
    9696
    97                     <?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
    98 
    99                         <p class="form-allowed-tags">
    100                             <label><?php printf( esc_html__( 'You may use these %s tags and attributes:', 'bbpress' ), '<abbr title="HyperText Markup Language">HTML</abbr>' ); ?></label><br />
    101                             <code><?php bbp_allowed_tags(); ?></code>
    102                         </p>
    103 
    104                     <?php endif; ?>
     97                    <?php bbp_get_template_part( 'form', 'allowed-tags' ); ?>
    10598
    10699                    <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?>
  • bbpress/trunk/templates/default/bbpress/form-user-passwords.php

    r2476819 r3109477  
    1313// Filters the display of the password fields
    1414if ( apply_filters( 'show_password_fields', true, bbpress()->displayed_user ) ) : ?>
    15 
    16 <script type="text/javascript">
    17     document.body.className = document.body.className.replace( 'no-js', 'js' );
    18 </script>
    1915
    2016<div id="password" class="user-pass1-wrap">
  • bbpress/trunk/templates/default/css/bbpress.css

    r2476819 r3109477  
    1010
    1111.hidden,
    12 .no-js .hide-if-no-js,
    13 .js .hide-if-js {
     12.no-js .hide-if-no-js,
     13.js .hide-if-js {
    1414    display: none;
    1515}
    1616
    17 /* Hide visually but not from screen readers */
     17/* Hide visually */
    1818.screen-reader-text,
    1919.screen-reader-text span,
Note: See TracChangeset for help on using the changeset viewer.