Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/16/2025 04:55:52 AM (3 weeks 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/common/functions.php

    r7315 r7357  
    591591    // Parse arguments against default values
    592592    $r = bbp_parse_args( $args, array(
    593         'bbp_anonymous_name'    => ! empty( $_POST['bbp_anonymous_name']    ) ? $_POST['bbp_anonymous_name']    : false,
    594         'bbp_anonymous_email'   => ! empty( $_POST['bbp_anonymous_email']   ) ? $_POST['bbp_anonymous_email']   : false,
     593        'bbp_anonymous_name'    => ! empty( $_POST['bbp_anonymous_name']    ) ? $_POST['bbp_anonymous_name'] : false,
     594        'bbp_anonymous_email'   => ! empty( $_POST['bbp_anonymous_email']   ) ? $_POST['bbp_anonymous_email'] : false,
    595595        'bbp_anonymous_website' => ! empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
    596596    ), 'filter_anonymous_post_data' );
     
    742742
    743743            // Get the meta SQL
    744             $clauses = get_meta_sql( array( array(
    745                 'key'   => '_bbp_anonymous_email',
    746                 'value' => $email,
    747             ) ), 'post', $bbp_db->posts, 'ID' );
     744            $clauses = get_meta_sql(
     745                array(
     746                    array(
     747                        'key'   => '_bbp_anonymous_email',
     748                        'value' => $email,
     749                    )
     750                ),
     751                'post',
     752                $bbp_db->posts,
     753                'ID'
     754            );
    748755
    749756            // Set clauses
     
    23872394
    23882395                            // Restrict to specific forum ID
    2389                             $meta_query = array( array(
    2390                                 'key'     => '_bbp_forum_id',
    2391                                 'value'   => bbp_get_forum_id(),
    2392                                 'type'    => 'NUMERIC',
    2393                                 'compare' => '='
    2394                             ) );
     2396                            $meta_query = array(
     2397                                array(
     2398                                    'key'     => '_bbp_forum_id',
     2399                                    'value'   => bbp_get_forum_id(),
     2400                                    'type'    => 'NUMERIC',
     2401                                    'compare' => '='
     2402                                )
     2403                            );
    23952404                        }
    23962405
Note: See TracChangeset for help on using the changeset viewer.