bp_get_the_message_thread_mark_unread_url

Return the URL used for marking a single message thread as unread.

Description

(string) bp_get_the_message_thread_mark_unread_url(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bp_get_the_message_thread_mark_unread_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-messages/bp-messages-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_the_message_thread_mark_unread_url(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-messages/bp-messages-template.php  
  1. function bp_get_the_message_thread_mark_unread_url() { 
  2.  
  3. // Get the message ID. 
  4.  
  5. // Get the args to add to the URL. 
  6. $args = array( 
  7. 'action' => 'unread',  
  8. 'message_id' => $id 
  9. ); 
  10.  
  11. // Base unread URL. 
  12.  
  13. // Add the args to the URL. 
  14. $url = add_query_arg( $args, $url ); 
  15.  
  16. // Add the nonce. 
  17. $url = wp_nonce_url( $url, 'bp_message_thread_mark_unread_' . $id ); 
  18.  
  19. /** 
  20. * Filters the URL used for marking a single message thread as unread. 
  21. * @since 2.2.0 
  22. * @param string $url URL used for marking a single message thread as unread. 
  23. */