Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/18/2025 02:56:26 AM (4 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement: stop ignoring WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine sniff.

This commit ensures that all arrays with multiple keys & values are not on single lines.

File:
1 edited

Legend:

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

    r7361 r7374  
    8080    // Topic Tags
    8181    if ( bbp_allow_topic_tags() && isset( $r['topic_tag_count'] ) ) {
    82         $link       = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
     82        $args = array(
     83            'taxonomy'  => bbp_get_topic_tag_tax_id(),
     84            'post_type' => bbp_get_topic_post_type()
     85        );
     86        $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) );
    8387        /* translators: %s: Number of topic tags */
    84         $text       = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count_int'], 'bbpress' ), $r['topic_tag_count'] );
     88        $text = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count_int'], 'bbpress' ), $r['topic_tag_count'] );
     89
    8590        $elements[] = current_user_can( 'manage_topic_tags' )
    8691            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>'
     
    178183                        $text = _n( 'Topic Tag', 'Topic Tags', $r['topic_tag_count_int'], 'bbpress' );
    179184                        if ( current_user_can( 'manage_topic_tags' ) ) {
    180                             $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
     185                            $args = array(
     186                                'taxonomy'  => bbp_get_topic_tag_tax_id(),
     187                                'post_type' => bbp_get_topic_post_type()
     188                            );
     189                            $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) );
    181190                            $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    182191                            $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    272281                        $num  = $r['empty_topic_tag_count'];
    273282                        $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $r['empty_topic_tag_count_int'], 'bbpress' );
    274                         $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
     283                        $args = array(
     284                            'taxonomy'  => bbp_get_topic_tag_tax_id(),
     285                            'post_type' => bbp_get_topic_post_type()
     286                        );
     287                        $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) );
    275288                        $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    276289                        $text = '<a class="waiting" href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    438451        <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' === $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
    439452        <label class="screen-reader-text" for="bbp_open_close_topic"><?php esc_html_e( 'Select whether to open or close the topic.', 'bbpress' ); ?></label>
    440         <?php bbp_form_topic_status_dropdown( array( 'select_id' => 'post_status', 'topic_id' => $post->ID ) ); ?>
     453        <?php bbp_form_topic_status_dropdown(
     454            array(
     455                'select_id' => 'post_status',
     456                'topic_id'  => $post->ID
     457            )
     458        ); ?>
    441459    </p>
    442460
     
    505523        <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' === $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
    506524        <label class="screen-reader-text" for="post_status"><?php esc_html_e( 'Select what status to give the reply.', 'bbpress' ); ?></label>
    507         <?php bbp_form_reply_status_dropdown( array( 'select_id' => 'post_status', 'reply_id' => $post->ID ) ); ?>
     525        <?php bbp_form_reply_status_dropdown(
     526            array(
     527                'select_id' => 'post_status',
     528                'reply_id'  => $post->ID
     529            )
     530        ); ?>
    508531    </p>
    509532
Note: See TracChangeset for help on using the changeset viewer.