Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/26/2021 12:53:27 AM (3 years ago)
Author:
espellcaste
Message:

Making PHPDoc Improvements to the BP Messages (component) files.

Also, adding several minor PHP changes.

See #8553

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/actions/bulk-manage.php

    r11925 r13096  
    11<?php
    22/**
    3  * Messages: Bulk-manage action handler
     3 * Messages: Bulk-manage action handler.
    44 *
    55 * @package BuddyPress
     
    2525    $nonce    = ! empty( $_POST['messages_bulk_nonce'] ) ? $_POST['messages_bulk_nonce'] : '';
    2626    $messages = ! empty( $_POST['message_ids'] ) ? $_POST['message_ids'] : '';
    27 
    2827    $messages = wp_parse_id_list( $messages );
    2928
    3029    // Bail if no action or no IDs.
    31     if ( ( ! in_array( $action, array( 'delete', 'read', 'unread' ) ) ) || empty( $messages ) || empty( $nonce ) ) {
     30    if ( ( ! in_array( $action, array( 'delete', 'read', 'unread' ), true ) ) || empty( $messages ) || empty( $nonce ) ) {
    3231        bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' );
    3332    }
     
    4847    // Delete, mark as read or unread depending on the user 'action'.
    4948    switch ( $action ) {
    50         case 'delete' :
     49        case 'delete':
    5150            foreach ( $messages as $message ) {
    5251                messages_delete_thread( $message );
    5352            }
    5453            bp_core_add_message( __( 'Messages deleted.', 'buddypress' ) );
    55         break;
     54            break;
    5655
    57         case 'read' :
     56        case 'read':
    5857            foreach ( $messages as $message ) {
    5958                messages_mark_thread_read( $message );
    6059            }
    6160            bp_core_add_message( __( 'Messages marked as read', 'buddypress' ) );
    62         break;
     61            break;
    6362
    64         case 'unread' :
     63        case 'unread':
    6564            foreach ( $messages as $message ) {
    6665                messages_mark_thread_unread( $message );
    6766            }
    6867            bp_core_add_message( __( 'Messages marked as unread.', 'buddypress' ) );
    69         break;
     68            break;
    7069    }
    7170
Note: See TracChangeset for help on using the changeset viewer.