Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/06/2015 11:42:53 PM (9 years ago)
Author:
r-a-y
Message:

Messages: Introduce starring private messages feature.

This commit:

  • Registers the 'star' feature into the BP Messages component and dynamically loads the bp-messages-star.php file if the feature is active. By default, the feature is active, but can be disabled with the following snippet: 'bp_is_messages_star_active', '__return_false' );
  • Adds a 'Starred' box to the messages user subnav
  • Adds an icon to star or unstar a message in a message or message thread loop
  • Adds the 'Add star' and 'Remove star' options to the message thread 'Bulk Actions' dropdown menu
  • Adds accompanying CSS and JS to the bp-legacy template pack.

Fixes #6331.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php

    r9840 r9846  
    6262                    do_action( 'bp_messages_inbox_list_header' ); ?>
    6363
     64                    <?php if ( bp_is_active( 'messages', 'star' ) ) : ?>
     65                        <th scope="col" class="thread-star"><span class="message-action-star"><span class="icon"></span> <span class="screen-reader-text"><?php _e( 'Star', 'buddypress' ); ?></span></span></th>
     66                    <?php endif; ?>
     67
    6468                    <th scope="col" class="thread-options"><?php _e( 'Actions', 'buddypress' ); ?></th>
    6569                </tr>
     
    107111                         */
    108112                        do_action( 'bp_messages_inbox_list_item' ); ?>
     113
     114                        <?php if ( bp_is_active( 'messages', 'star' ) ) : ?>
     115                            <td class="thread-star">
     116                                <?php bp_the_message_star_action_link( array( 'thread_id' => bp_get_message_thread_id() ) ); ?>
     117                            </td>
     118                        <?php endif; ?>
    109119
    110120                        <td class="thread-options">
Note: See TracChangeset for help on using the changeset viewer.