Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/01/2024 10:25:18 PM (14 months ago)
Author:
espellcaste
Message:

WPCS: Part IV: miscellaneous fixes for some of the files of the core component.

Follow-up to [13883], [13886], and [13887]

See #9164 and #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-optouts-list-table.php

    r13882 r13888  
    131131             * @param string $url_base Current URL base for view.
    132132             */
    133             do_action( 'bp_optouts_list_table_get_views', $url_base ); ?>
     133            do_action( 'bp_optouts_list_table_get_views', $url_base );
     134            ?>
    134135        </ul>
    135     <?php
     136        <?php
    136137    }
    137138
     
    146147     * @param array $which Current table nav item.
    147148     */
    148     public function extra_tablenav( $which ) {
    149         return;
    150     }
     149    public function extra_tablenav( $which ) {}
    151150
    152151    /**
     
    224223        $style = '';
    225224        foreach ( $this->items as $optout ) {
    226             $style = 'alt' == $style ? '' : 'alt';
     225            $style = 'alt' === $style ? '' : 'alt';
    227226
    228227            // Escapes are made into `self::single_row()`.
     
    265264     */
    266265    public function column_cb( $optout = null ) {
    267     ?>
     266        ?>
    268267        <label class="screen-reader-text" for="optout_<?php echo intval( $optout->id ); ?>">
    269268            <?php
     
    272271            ?>
    273272        </label>
    274         <input type="checkbox" id="optout_<?php echo intval( $optout->id ) ?>" name="optout_ids[]" value="<?php echo esc_attr( $optout->id ) ?>" />
     273        <input type="checkbox" id="optout_<?php echo intval( $optout->id ); ?>" name="optout_ids[]" value="<?php echo esc_attr( $optout->id ); ?>" />
    275274        <?php
    276275    }
     
    281280     * @since 8.0.0
    282281     *
    283      * @param BP_Optout $optout BP_Optout object.
     282     * @param BP_Optout|null $optout BP_Optout object.
    284283     */
    285284    public function column_email_address( $optout = null ) {
     
    295294
    296295        // Delete link.
    297         $delete_link = add_query_arg(
     296        $delete_link       = add_query_arg(
    298297            array(
    299298                'page'      => 'bp-optouts',
     
    325324     * @since 8.0.0
    326325     *
    327      * @param BP_Optout $optout BP_Optout object.
     326     * @param BP_Optout|null $optout BP_Optout object.
    328327     */
    329328    public function column_username( $optout = null ) {
     
    347346                    'height' => true,
    348347                    'width'  => true,
    349                 )
     348                ),
    350349            )
    351350        );
     
    358357     * @since 8.0.0
    359358     *
    360      * @param BP_Optout $optout BP_Optout object.
     359     * @param BP_Optout|null $optout BP_Optout object.
    361360     */
    362361    public function column_user_registered( $optout = null ) {
     
    367366        }
    368367
    369         echo esc_html( mysql2date( 'Y/m/d g:i:s a', $inviter->user_registered  ) );
     368        echo esc_html( mysql2date( 'Y/m/d g:i:s a', $inviter->user_registered ) );
    370369    }
    371370
     
    375374     * @since 8.0.0
    376375     *
    377      * @param BP_Optout $optout BP_Optout object.
     376     * @param BP_Optout|null $optout BP_Optout object.
    378377     */
    379378    public function column_email_type( $optout = null ) {
     
    386385     * @since 8.0.0
    387386     *
    388      * @param BP_Optout $optout BP_Optout object.
     387     * @param BP_Optout|null $optout BP_Optout object.
    389388     */
    390389    public function column_email_type_description( $optout = null ) {
     
    394393            echo esc_html( $type_term->description );
    395394        }
    396 
    397395    }
    398396
     
    402400     * @since 8.0.0
    403401     *
    404      * @param BP_Optout $optout BP_Optout object.
     402     * @param BP_Optout|null $optout BP_Optout object.
    405403     */
    406404    public function column_optout_date_modified( $optout = null ) {
     
    413411     * @since 8.0.0
    414412     *
    415      * @param BP_Optout $optout      BP_Optout object.
    416      * @param string    $column_name The column name.
     413     * @param BP_Optout|null $optout      BP_Optout object.
     414     * @param string         $column_name The column name.
    417415     * @return string
    418416     */
    419     function column_default( $optout = null, $column_name = '' ) {
     417    public function column_default( $optout = null, $column_name = '' ) {
    420418
    421419        /**
     
    424422         * @since 8.0.0
    425423         *
    426          * @param string    $column_name The column name.
    427          * @param BP_Optout $optout      BP_Optout object.
     424         * @param string         $column_name The column name.
     425         * @param BP_Optout|null $optout      BP_Optout object or null.
    428426         */
    429427        return apply_filters( 'bp_optouts_management_custom_column', '', $column_name, $optout );
Note: See TracChangeset for help on using the changeset viewer.