Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2019 01:38:37 PM (5 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/replies/functions.php

    r6923 r7006  
    717717
    718718        // Update counts, etc...
    719         do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author , true, $reply_to );
     719        do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author, true, $reply_to );
    720720
    721721        /** Revisions *********************************************************/
     
    731731
    732732        // Update revision log
    733         if ( ! empty( $_POST['bbp_log_reply_edit'] ) && ( "1" === $_POST['bbp_log_reply_edit'] ) ) {
     733        if ( ! empty( $_POST['bbp_log_reply_edit'] ) && ( '1' === $_POST['bbp_log_reply_edit'] ) ) {
    734734            $revision_id = wp_save_post_revision( $reply_id );
    735735            if ( ! empty( $revision_id ) ) {
     
    822822            set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
    823823        }
    824 
    825824    } else {
    826825        if ( empty( $is_edit ) && ! current_user_can( 'throttle' ) ) {
     
    20802079    // The texts to search for
    20812080    $search     = array(
    2082         "FROM {$table_name} " ,
     2081        "FROM {$table_name} ",
    20832082        "WHERE 1=1  AND {$table_name}.post_parent = {$topic_id}",
    20842083        ") AND {$table_name}.post_parent = {$topic_id}"
     
    20872086    // The texts to replace them with
    20882087    $replace     = array(
    2089         $search[0] . "FORCE INDEX (PRIMARY, post_parent) " ,
     2088        $search[0] . 'FORCE INDEX (PRIMARY, post_parent) ',
    20902089        "WHERE 1=1 AND ({$table_name}.ID = {$topic_id} OR {$table_name}.post_parent = {$topic_id})",
    20912090        ") AND ({$table_name}.ID = {$topic_id} OR {$table_name}.post_parent = {$topic_id})"
     
    21472146        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    21482147        <link><?php self_link(); ?></link>
    2149         <description><?php //?></description>
     2148        <description><?php //?></description><?php // phpcs:ignore ?>
    21502149        <lastBuildDate><?php echo date( 'r' ); ?></lastBuildDate>
    21512150        <generator><?php echo esc_url_raw( 'https://bbpress.org/?v=' . convert_chars( bbp_get_version() ) ); ?></generator>
     
    21902189                    <link><?php bbp_reply_url(); ?></link>
    21912190                    <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
    2192                     <dc:creator><?php the_author() ?></dc:creator>
     2191                    <dc:creator><?php the_author(); ?></dc:creator>
    21932192
    21942193                    <description>
Note: See TracChangeset for help on using the changeset viewer.