Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/16/2025 04:55:52 AM (10 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement:

This commit modifies several PHP files to strictly adhere to the following PHPCS rules:

  • WordPress.WP.I18n.NonSingularStringLiteralText
  • WordPress.WP.PostsPerPage.posts_per_page_posts_per_page
  • WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterOpenParenthesis
  • WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis
  • WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis
  • WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis
  • WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
  • WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore
  • WordPress.WhiteSpace.OperatorSpacing.SpacingAfter
  • WordPress.WhiteSpace.OperatorSpacing.SpacingBefore

This commit does not include changes to the phpcs.xml.dist config file to add these rules yet - this will happen in a separate commit.

Props sirlouen.

In trunk, for 2.7.

See #3614.

File:
1 edited

Legend:

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

    r7006 r7357  
    355355                <strong class="label"><?php esc_html_e( 'Parent:', 'bbpress' ); ?></strong>
    356356                <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum Parent', 'bbpress' ); ?></label>
    357                 <?php bbp_dropdown( array(
    358                         'post_type'          => bbp_get_forum_post_type(),
    359                         'selected'           => $post_parent,
    360                         'numberposts'        => -1,
    361                         'orderby'            => 'title',
    362                         'order'              => 'ASC',
    363                         'walker'             => '',
    364                         'exclude'            => $post->ID,
    365 
    366                         // Output-related
    367                         'select_id'          => 'parent_id',
    368                         'options_only'       => false,
    369                         'show_none'          => esc_html__( '&mdash; No parent &mdash;', 'bbpress' ),
    370                         'disable_categories' => false,
    371                         'disabled'           => ''
    372                 ) ); ?>
     357                <?php
     358                bbp_dropdown(
     359                        array(
     360                                'post_type'          => bbp_get_forum_post_type(),
     361                                'selected'           => $post_parent,
     362                                'numberposts'        => -1,
     363                                'orderby'            => 'title',
     364                                'order'              => 'ASC',
     365                                'walker'             => '',
     366                                'exclude'            => $post->ID,
     367
     368                                // Output-related
     369                                'select_id'          => 'parent_id',
     370                                'options_only'       => false,
     371                                'show_none'          => esc_html__( '&mdash; No parent &mdash;', 'bbpress' ),
     372                                'disable_categories' => false,
     373                                'disabled'           => ''
     374                        )
     375                );
     376                ?>
    373377        </p>
    374378
     
    431435                <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong>
    432436                <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label>
    433                 <?php bbp_dropdown( array(
    434                         'post_type'          => bbp_get_forum_post_type(),
    435                         'selected'           => bbp_get_topic_forum_id( $post->ID ),
    436                         'numberposts'        => -1,
    437                         'orderby'            => 'title',
    438                         'order'              => 'ASC',
    439                         'walker'             => '',
    440                         'exclude'            => '',
     437                <?php
     438                bbp_dropdown(
     439                        array(
     440                                'post_type'          => bbp_get_forum_post_type(),
     441                                'selected'           => bbp_get_topic_forum_id( $post->ID ),
     442                                'numberposts'        => -1,
     443                                'orderby'            => 'title',
     444                                'order'              => 'ASC',
     445                                'walker'             => '',
     446                                'exclude'            => '',
    441447
    442448                        // Output-related
     
    446452                        'disable_categories' => current_user_can( 'edit_forums' ),
    447453                        'disabled'           => ''
    448                 ) ); ?>
     454                        )
     455                );
     456                ?>
    449457        </p>
    450458
     
    495503                        <strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong>
    496504                        <label class="screen-reader-text" for="bbp_forum_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label>
    497                         <?php bbp_dropdown( array(
    498                                 'post_type'          => bbp_get_forum_post_type(),
    499                                 'selected'           => $reply_forum_id,
    500                                 'numberposts'        => -1,
    501                                 'orderby'            => 'title',
    502                                 'order'              => 'ASC',
    503                                 'walker'             => '',
    504                                 'exclude'            => '',
    505 
    506                                 // Output-related
    507                                 'select_id'          => 'bbp_forum_id',
    508                                 'options_only'       => false,
    509                                 'show_none'          => esc_html__( '&mdash; No reply &mdash;', 'bbpress' ),
    510                                 'disable_categories' => current_user_can( 'edit_forums' ),
    511                                 'disabled'           => ''
    512                         ) ); ?>
     505                        <?php
     506                        bbp_dropdown(
     507                                array(
     508                                        'post_type'          => bbp_get_forum_post_type(),
     509                                        'selected'           => $reply_forum_id,
     510                                        'numberposts'        => -1,
     511                                        'orderby'            => 'title',
     512                                        'order'              => 'ASC',
     513                                        'walker'             => '',
     514                                        'exclude'            => '',
     515
     516                                        // Output-related
     517                                        'select_id'          => 'bbp_forum_id',
     518                                        'options_only'       => false,
     519                                        'show_none'          => esc_html__( '&mdash; No reply &mdash;', 'bbpress' ),
     520                                        'disable_categories' => current_user_can( 'edit_forums' ),
     521                                        'disabled'           => ''
     522                                )
     523                        );
     524                        ?>
    513525                </p>
    514526
Note: See TracChangeset for help on using the changeset viewer.