Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/23/2021 08:07:07 PM (4 years ago)
Author:
imath
Message:

BP Messages: introduce a functionality to exit a messages thread

Exiting a messages thread is removing the user from the list of the recipients of the thread. The thread can carry on between the other recipients.

Props Oelita, vapvarun

Fixes #7540

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-template.php

    r13185 r13196  
    21902190
    21912191/**
     2192 * Output the URL to exit the current thread.
     2193 *
     2194 * @since 10.0.0
     2195 */
     2196function bp_the_thread_exit_link() {
     2197    echo esc_url( bp_get_the_thread_exit_link() );
     2198}
     2199    /**
     2200     * Get the URL to exit the current thread.
     2201     *
     2202     * @since 10.0.0
     2203     *
     2204     * @return string URL
     2205     */
     2206    function bp_get_the_thread_exit_link() {
     2207
     2208        /**
     2209         * Filters the URL to exit the current thread.
     2210         *
     2211         * @since 1.0.0
     2212         *
     2213         * @param string $value URL to exit the current thread.
     2214         * @param string $value Text indicating action being executed.
     2215         */
     2216        return apply_filters( 'bp_get_the_thread_exit_link', wp_nonce_url( bp_displayed_user_domain() . bp_get_messages_slug() . '/inbox/exit/' . bp_get_the_thread_id(), 'bp_messages_exit_thread' ) );
     2217    }
     2218
     2219/**
    21922220 * Output the 'Sent x hours ago' string for the current message.
    21932221 *
Note: See TracChangeset for help on using the changeset viewer.