Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2019 01:38:37 PM (4 years ago)
Author:
netweb
Message:

Build Tools: Add PHPCS with custom bbPress ruleset

  • This changeset adds an initial bbPress PHPCS ruleset
  • Future iteration of the rules in the ruleset can follow later
  • To run the PHPCS check run `grunt phpcs

Fixes #3294.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/template.php

    r6967 r7006  
    638638            // Default to topic post type name label
    639639            } else {
    640                 $tto    = get_post_type_object( bbp_get_topic_post_type() );
    641                 $title  = $tto->labels->name;
     640                $tto   = get_post_type_object( bbp_get_topic_post_type() );
     641                $title = $tto->labels->name;
    642642            }
    643643        }
     
    14681468
    14691469            // Filter sections
    1470             $sections    = apply_filters( 'bbp_get_topic_author_links', $author_links, $r, $args );
     1470            $sections = apply_filters( 'bbp_get_topic_author_links', $author_links, $r, $args );
    14711471
    14721472            // Assemble sections into author link
     
    20182018        // First link never has view=all
    20192019        $retval = bbp_get_view_all( 'edit_others_replies' )
    2020             ? "<a href='" . esc_url( bbp_remove_view_all( $link ) ) . "'>" . esc_html( $replies ) . "</a>"
     2020            ? "<a href='" . esc_url( bbp_remove_view_all( $link ) ) . "'>" . esc_html( $replies ) . '</a>'
    20212021            : $replies;
    20222022
     
    20332033            // Hidden link
    20342034            $retval .= ! bbp_get_view_all( 'edit_others_replies' )
    2035                 ? " <a href='" . esc_url( bbp_add_view_all( $link, true ) ) . "'>" . esc_html( $extra ) . "</a>"
     2035                ? " <a href='" . esc_url( bbp_add_view_all( $link, true ) ) . "'>" . esc_html( $extra ) . '</a>'
    20362036                : " {$extra}";
    20372037        }
     
    29902990            // Several topics in a forum with several pages
    29912991            } else {
    2992                 $retstr = sprintf( _n( 'Viewing topic %2$s (of %4$s total)', 'Viewing %1$s topics - %2$s through %3$s (of %4$s total)', $total_int, 'bbpress' ), $count_num, $from_num, $to_num, $total );
     2992                $retstr = sprintf( _n( 'Viewing topic %2$s (of %4$s total)', 'Viewing %1$s topics - %2$s through %3$s (of %4$s total)', $total_int, 'bbpress' ), $count_num, $from_num, $to_num, $total );  //phpcs:ignore
    29932993            }
    29942994
     
    32423242        ob_start(); ?>
    32433243
    3244         <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>>
     3244        <select name="<?php echo esc_attr( $r['select_id'] ); ?>" id="<?php echo esc_attr( $r['select_id'] ); ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>>
    32453245
    32463246            <?php foreach ( bbp_get_topic_statuses( $r['topic_id'] ) as $key => $label ) : ?>
Note: See TracChangeset for help on using the changeset viewer.