Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/16/2025 04:55:52 AM (4 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/core/template-loader.php

    r7343 r7357  
    3333
    3434    // User favorites
    35     elseif ( bbp_is_favorites()        && ( $new_template = bbp_get_favorites_template()        ) ) :
     35    elseif ( bbp_is_favorites() && ( $new_template = bbp_get_favorites_template()        ) ) :
    3636
    3737    // User favorites
    38     elseif ( bbp_is_subscriptions()    && ( $new_template = bbp_get_subscriptions_template()    ) ) :
     38    elseif ( bbp_is_subscriptions() && ( $new_template = bbp_get_subscriptions_template()    ) ) :
    3939
    4040    // Viewing a user
    41     elseif ( bbp_is_single_user()      && ( $new_template = bbp_get_single_user_template()      ) ) :
     41    elseif ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template()      ) ) :
    4242
    4343    // Single View
    44     elseif ( bbp_is_single_view()      && ( $new_template = bbp_get_single_view_template()      ) ) :
     44    elseif ( bbp_is_single_view() && ( $new_template = bbp_get_single_view_template()      ) ) :
    4545
    4646    // Search
    47     elseif ( bbp_is_search()           && ( $new_template = bbp_get_search_template()           ) ) :
     47    elseif ( bbp_is_search() && ( $new_template = bbp_get_search_template()           ) ) :
    4848
    4949    // Forum edit
    50     elseif ( bbp_is_forum_edit()       && ( $new_template = bbp_get_forum_edit_template()       ) ) :
     50    elseif ( bbp_is_forum_edit() && ( $new_template = bbp_get_forum_edit_template()       ) ) :
    5151
    5252    // Single Forum
    53     elseif ( bbp_is_single_forum()     && ( $new_template = bbp_get_single_forum_template()     ) ) :
     53    elseif ( bbp_is_single_forum() && ( $new_template = bbp_get_single_forum_template()     ) ) :
    5454
    5555    // Forum Archive
    56     elseif ( bbp_is_forum_archive()    && ( $new_template = bbp_get_forum_archive_template()    ) ) :
     56    elseif ( bbp_is_forum_archive() && ( $new_template = bbp_get_forum_archive_template()    ) ) :
    5757
    5858    // Topic merge
    59     elseif ( bbp_is_topic_merge()      && ( $new_template = bbp_get_topic_merge_template()      ) ) :
     59    elseif ( bbp_is_topic_merge() && ( $new_template = bbp_get_topic_merge_template()      ) ) :
    6060
    6161    // Topic split
    62     elseif ( bbp_is_topic_split()      && ( $new_template = bbp_get_topic_split_template()      ) ) :
     62    elseif ( bbp_is_topic_split() && ( $new_template = bbp_get_topic_split_template()      ) ) :
    6363
    6464    // Topic edit
    65     elseif ( bbp_is_topic_edit()       && ( $new_template = bbp_get_topic_edit_template()       ) ) :
     65    elseif ( bbp_is_topic_edit() && ( $new_template = bbp_get_topic_edit_template()       ) ) :
    6666
    6767    // Single Topic
    68     elseif ( bbp_is_single_topic()     && ( $new_template = bbp_get_single_topic_template()     ) ) :
     68    elseif ( bbp_is_single_topic() && ( $new_template = bbp_get_single_topic_template()     ) ) :
    6969
    7070    // Topic Archive
    71     elseif ( bbp_is_topic_archive()    && ( $new_template = bbp_get_topic_archive_template()    ) ) :
     71    elseif ( bbp_is_topic_archive() && ( $new_template = bbp_get_topic_archive_template()    ) ) :
    7272
    7373    // Reply move
    74     elseif ( bbp_is_reply_move()       && ( $new_template = bbp_get_reply_move_template()       ) ) :
     74    elseif ( bbp_is_reply_move() && ( $new_template = bbp_get_reply_move_template()       ) ) :
    7575
    7676    // Editing a reply
    77     elseif ( bbp_is_reply_edit()       && ( $new_template = bbp_get_reply_edit_template()       ) ) :
     77    elseif ( bbp_is_reply_edit() && ( $new_template = bbp_get_reply_edit_template()       ) ) :
    7878
    7979    // Single Reply
    80     elseif ( bbp_is_single_reply()     && ( $new_template = bbp_get_single_reply_template()     ) ) :
     80    elseif ( bbp_is_single_reply() && ( $new_template = bbp_get_single_reply_template()     ) ) :
    8181
    8282    // Editing a topic tag
    83     elseif ( bbp_is_topic_tag_edit()   && ( $new_template = bbp_get_topic_tag_edit_template()   ) ) :
     83    elseif ( bbp_is_topic_tag_edit() && ( $new_template = bbp_get_topic_tag_edit_template()   ) ) :
    8484
    8585    // Viewing a topic tag
    86     elseif ( bbp_is_topic_tag()        && ( $new_template = bbp_get_topic_tag_template()        ) ) :
     86    elseif ( bbp_is_topic_tag() && ( $new_template = bbp_get_topic_tag_template()        ) ) :
    8787    endif;
    8888
Note: See TracChangeset for help on using the changeset viewer.