[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-messages/ -> bp-messages-template.php (summary)

BuddyPress Messages Template Tags.

File Size: 2367 lines (69 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 127 functions

  bp_has_message_threads()
  bp_message_threads()
  bp_message_thread()
  bp_message_thread_id()
  bp_get_message_thread_id()
  bp_message_thread_subject()
  bp_get_message_thread_subject()
  bp_message_thread_excerpt()
  bp_get_message_thread_excerpt()
  bp_message_thread_content()
  bp_get_message_thread_content()
  bp_message_thread_from()
  bp_get_message_thread_from()
  bp_message_thread_to()
  bp_get_message_thread_to()
  bp_message_thread_view_link()
  bp_get_message_thread_view_link()
  bp_message_thread_delete_link()
  bp_get_message_thread_delete_link()
  bp_the_message_thread_mark_unread_url()
  bp_get_the_message_thread_mark_unread_url()
  bp_the_message_thread_mark_read_url()
  bp_get_the_message_thread_mark_read_url()
  bp_message_css_class()
  bp_get_message_css_class()
  bp_message_thread_has_unread()
  bp_message_thread_unread_count()
  bp_get_message_thread_unread_count()
  bp_message_thread_total_count()
  bp_get_message_thread_total_count()
  bp_message_thread_total_and_unread_count()
  bp_get_message_thread_total_and_unread_count()
  bp_message_thread_last_post_date_raw()
  bp_get_message_thread_last_post_date_raw()
  bp_message_thread_last_post_date()
  bp_get_message_thread_last_post_date()
  bp_message_thread_avatar()
  bp_get_message_thread_avatar()
  bp_total_unread_messages_count()
  bp_get_total_unread_messages_count()
  bp_messages_pagination()
  bp_get_messages_pagination()
  bp_messages_pagination_count()
  bp_message_search_form()
  bp_messages_form_action()
  bp_get_messages_form_action()
  bp_messages_username_value()
  bp_get_messages_username_value()
  bp_messages_subject_value()
  bp_get_messages_subject_value()
  bp_messages_content_value()
  bp_get_messages_content_value()
  bp_messages_options()
  bp_messages_bulk_management_dropdown()
  bp_messages_is_active_notice()
  bp_message_is_active_notice()
  bp_get_message_is_active_notice()
  bp_message_notice_id()
  bp_get_message_notice_id()
  bp_message_notice_post_date()
  bp_get_message_notice_post_date()
  bp_message_notice_subject()
  bp_get_message_notice_subject()
  bp_message_notice_text()
  bp_get_message_notice_text()
  bp_message_notice_delete_link()
  bp_get_message_notice_delete_link()
  bp_message_activate_deactivate_link()
  bp_get_message_activate_deactivate_link()
  bp_message_activate_deactivate_text()
  bp_get_message_activate_deactivate_text()
  bp_message_notice_dismiss_link()
  bp_get_message_notice_dismiss_link()
  bp_messages_slug()
  bp_get_messages_slug()
  bp_message_get_notices()
  bp_send_private_message_link()
  bp_get_send_private_message_link()
  bp_send_private_message_button()
  bp_send_message_button()
  bp_get_send_message_button()
  bp_message_loading_image_src()
  bp_get_message_loading_image_src()
  bp_message_get_recipient_tabs()
  bp_message_get_recipient_usernames()
  bp_get_message_get_recipient_usernames()
  bp_thread_has_messages()
  bp_thread_messages_order()
  bp_get_thread_messages_order()
  bp_thread_messages()
  bp_thread_the_message()
  bp_the_thread_id()
  bp_get_the_thread_id()
  bp_the_thread_subject()
  bp_get_the_thread_subject()
  bp_get_the_thread_recipients()
  bp_get_thread_recipients_count()
  bp_get_max_thread_recipients_to_list()
  bp_the_thread_recipients_list()
  bp_get_thread_recipients_list()
  bp_the_thread_message_id()
  bp_get_the_thread_message_id()
  bp_the_thread_message_css_class()
  bp_get_the_thread_message_css_class()
  bp_the_thread_message_alt_class()
  bp_get_the_thread_message_alt_class()
  bp_the_thread_message_sender_id()
  bp_get_the_thread_message_sender_id()
  bp_the_thread_message_sender_avatar()
  bp_get_the_thread_message_sender_avatar_thumb()
  bp_the_thread_message_sender_link()
  bp_get_the_thread_message_sender_link()
  bp_the_thread_message_sender_name()
  bp_get_the_thread_message_sender_name()
  bp_the_thread_delete_link()
  bp_get_the_thread_delete_link()
  bp_the_thread_exit_link()
  bp_get_the_thread_exit_link()
  bp_the_thread_message_time_since()
  bp_get_the_thread_message_time_since()
  bp_the_thread_message_date_sent()
  bp_get_the_thread_message_date_sent()
  bp_the_thread_message_content()
  bp_get_the_thread_message_content()
  bp_messages_embed()
  bp_embed_message_cache()
  bp_embed_message_save_cache()

Functions
Functions that are not part of a class:

bp_has_message_threads( $args = array()   X-Ref
Retrieve private message threads for display in inbox/sentbox/notices.

Similar to WordPress's have_posts() function, this function is responsible
for querying the database and retrieving private messages for display inside
the theme via individual template parts for a member's inbox/sentbox/notices.

return: bool True if there are threads to display, otherwise false.
param: array|string $args {
since: 1.0.0

bp_message_threads()   X-Ref
Check whether there are more threads to iterate over.

return: bool

bp_message_thread()   X-Ref
Set up the current thread inside the loop.

return: BP_Messages_Thread

bp_message_thread_id()   X-Ref
Output the ID of the current thread in the loop.


bp_get_message_thread_id()   X-Ref
Get the ID of the current thread in the loop.

return: int

bp_message_thread_subject()   X-Ref
Output the subject of the current thread in the loop.


bp_get_message_thread_subject()   X-Ref
Get the subject of the current thread in the loop.

return: string

bp_message_thread_excerpt()   X-Ref
Output an excerpt from the current message in the loop.


bp_get_message_thread_excerpt()   X-Ref
Generate an excerpt from the current message in the loop.

return: string

bp_message_thread_content()   X-Ref
Output the thread's last message content.

When viewing your Inbox, the last message is the most recent message in
the thread of which you are *not* the author.

When viewing your Sentbox, last message is the most recent message in
the thread of which you *are* the member.

since: 2.0.0

bp_get_message_thread_content()   X-Ref
Return the thread's last message content.

When viewing your Inbox, the last message is the most recent message in
the thread of which you are *not* the author.

When viewing your Sentbox, last message is the most recent message in
the thread of which you *are* the member.

return: string The raw content of the last message in the thread.
since: 2.0.0

bp_message_thread_from()   X-Ref
Output a link to the page of the current thread's last author.


bp_get_message_thread_from()   X-Ref
Get a link to the page of the current thread's last author.

return: string

bp_message_thread_to()   X-Ref
Output links to the pages of the current thread's recipients.


bp_get_message_thread_to()   X-Ref
Generate HTML links to the pages of the current thread's recipients.

return: string

bp_message_thread_view_link( $thread_id = 0, $user_id = null )   X-Ref
Output the permalink for a particular thread.

param: int $thread_id Optional. ID of the thread. Default: current thread
param: int $user_id   Optional. ID of the user relative to whom the link
since: 2.9.0 Introduced `$user_id` parameter.

bp_get_message_thread_view_link( $thread_id = 0, $user_id = null )   X-Ref
Get the permalink of a particular thread.

return: string
param: int $thread_id Optional. ID of the thread. Default: current
param: int $user_id   Optional. ID of the user relative to whom the link
since: 2.9.0 Introduced `$user_id` parameter.

bp_message_thread_delete_link( $user_id = null )   X-Ref
Output the URL for deleting the current thread.

param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.9.0 Introduced `$user_id` parameter.

bp_get_message_thread_delete_link( $user_id = null )   X-Ref
Generate the URL for deleting the current thread.

return: string
param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.9.0 Introduced `$user_id` parameter.

bp_the_message_thread_mark_unread_url( $user_id = null )   X-Ref
Output the URL used for marking a single message thread as unread.

Since this function directly outputs a URL, it is escaped.

param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.2.0
since: 2.9.0 Introduced `$user_id` parameter.

bp_get_the_message_thread_mark_unread_url( $user_id = null )   X-Ref
Return the URL used for marking a single message thread as unread.

return: string
param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.2.0
since: 2.9.0 Introduced `$user_id` parameter.

bp_the_message_thread_mark_read_url( $user_id = null )   X-Ref
Output the URL used for marking a single message thread as read.

Since this function directly outputs a URL, it is escaped.

param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.2.0
since: 2.9.0 Introduced `$user_id` parameter.

bp_get_the_message_thread_mark_read_url( $user_id = null )   X-Ref
Return the URL used for marking a single message thread as read.

return: string
param: int|null $user_id Optional. ID of the user relative to whom the link
since: 2.2.0
since: 2.9.0 Introduced `$user_id` parameter.

bp_message_css_class()   X-Ref
Output the CSS class for the current thread.


bp_get_message_css_class()   X-Ref
Generate the CSS class for the current thread.

return: string

bp_message_thread_has_unread()   X-Ref
Check whether the current thread has unread items.

return: bool True if there are unread items, otherwise false.

bp_message_thread_unread_count()   X-Ref
Output the current thread's unread count.


bp_get_message_thread_unread_count()   X-Ref
Get the current thread's unread count.

return: int

bp_message_thread_total_count( $thread_id = false )   X-Ref
Output a thread's total message count.

param: int|bool $thread_id Optional. ID of the thread. Defaults to current thread ID.
since: 2.2.0

bp_get_message_thread_total_count( $thread_id = false )   X-Ref
Get the current thread's total message count.

return: int
param: int|bool $thread_id Optional. ID of the thread.
since: 2.2.0

bp_message_thread_total_and_unread_count( $thread_id = false )   X-Ref
Output markup for the current thread's total and unread count.

param: int|bool $thread_id Optional. ID of the thread. Default: current thread ID.
since: 2.2.0

bp_get_message_thread_total_and_unread_count( $thread_id = false )   X-Ref
Get markup for the current thread's total and unread count.

return: string Markup displaying the total and unread count for the thread.
param: int|bool $thread_id Optional. ID of the thread. Default: current thread ID.

bp_message_thread_last_post_date_raw()   X-Ref
Output the unformatted date of the last post in the current thread.


bp_get_message_thread_last_post_date_raw()   X-Ref
Get the unformatted date of the last post in the current thread.

return: string

bp_message_thread_last_post_date()   X-Ref
Output the nicely formatted date of the last post in the current thread.


bp_get_message_thread_last_post_date()   X-Ref
Get the nicely formatted date of the last post in the current thread.

return: string

bp_message_thread_avatar( $args = '' )   X-Ref
Output the avatar for the last sender in the current message thread.

param: array|string $args See {@link bp_get_message_thread_avatar()}.

bp_get_message_thread_avatar( $args = '' )   X-Ref
Return the avatar for the last sender in the current message thread.

return: string User avatar string.
param: array|string $args {

bp_total_unread_messages_count( $user_id = 0 )   X-Ref
Output the unread messages count for the current inbox.

param: int $user_id The user ID.
since: 2.6.x Added the `$user_id` paremeter.

bp_get_total_unread_messages_count( $user_id = 0 )   X-Ref
Get the unread messages count for the current inbox.

return: int $unread_count Total inbox unread count for user.
param: int $user_id The user ID.
since: 2.6.x Added the `$user_id` paremeter.

bp_messages_pagination()   X-Ref
Output the pagination HTML for the current thread loop.


bp_get_messages_pagination()   X-Ref
Get the pagination HTML for the current thread loop.

return: string

bp_messages_pagination_count()   X-Ref
Generate the "Viewing message x to y (of z messages)" string for a loop.


bp_message_search_form()   X-Ref
Output the Private Message search form.

since: 1.6.0

bp_messages_form_action()   X-Ref
Echo the form action for Messages HTML forms.


bp_get_messages_form_action()   X-Ref
Return the form action for Messages HTML forms.

return: string The form action.

bp_messages_username_value()   X-Ref
Output the default username for the recipient box.


bp_get_messages_username_value()   X-Ref
Get the default username for the recipient box.

return: string

bp_messages_subject_value()   X-Ref
Output the default value for the Subject field.


bp_get_messages_subject_value()   X-Ref
Get the default value for the Subject field.

Will get a value out of $_POST['subject'] if available (ie after a
failed submission).

return: string

bp_messages_content_value()   X-Ref
Output the default value for the Compose content field.


bp_get_messages_content_value()   X-Ref
Get the default value fo the Compose content field.

Will get a value out of $_POST['content'] if available (ie after a
failed submission).

return: string

bp_messages_options()   X-Ref
Output the markup for the message type dropdown.


bp_messages_bulk_management_dropdown()   X-Ref
Output the dropdown for bulk management of messages.

since: 2.2.0

bp_messages_is_active_notice()   X-Ref
Return whether or not the notice is currently active.

return: bool
since: 1.6.0

bp_message_is_active_notice()   X-Ref
Output a string for the active notice.

Since 1.6 this function has been deprecated in favor of text in the theme.

since: 1.0.0

bp_get_message_is_active_notice()   X-Ref
Returns a string for the active notice.

Since 1.6 this function has been deprecated in favor of text in the
theme.

return: string
since: 1.0.0

bp_message_notice_id()   X-Ref
Output the ID of the current notice in the loop.


bp_get_message_notice_id()   X-Ref
Get the ID of the current notice in the loop.

return: int

bp_message_notice_post_date()   X-Ref
Output the post date of the current notice in the loop.


bp_get_message_notice_post_date()   X-Ref
Get the post date of the current notice in the loop.

return: string

bp_message_notice_subject( $notice = null )   X-Ref
Output the subject of the current notice in the loop.

param: BP_Messages_Notice $notice The notice object.
since: 5.0.0 The $notice parameter has been added.

bp_get_message_notice_subject( $notice = null )   X-Ref
Get the subject of the current notice in the loop.

return: string
param: BP_Messages_Notice|null $notice The notice object.
since: 5.0.0 The $notice parameter has been added.

bp_message_notice_text( $notice = null )   X-Ref
Output the text of the current notice in the loop.

param: BP_Messages_Notice $notice The notice object.
since: 5.0.0 The $notice parameter has been added.

bp_get_message_notice_text( $notice = null )   X-Ref
Get the text of the current notice in the loop.

return: string
param: BP_Messages_Notice|null $notice The notice object.
since: 5.0.0 The $notice parameter has been added.

bp_message_notice_delete_link()   X-Ref
Output the URL for deleting the current notice.


bp_get_message_notice_delete_link()   X-Ref
Get the URL for deleting the current notice.

return: string Delete URL.

bp_message_activate_deactivate_link()   X-Ref
Output the URL for deactivating the current notice.


bp_get_message_activate_deactivate_link()   X-Ref
Get the URL for deactivating the current notice.

return: string

bp_message_activate_deactivate_text()   X-Ref
Output the Deactivate/Activate text for the notice action link.


bp_get_message_activate_deactivate_text()   X-Ref
Generate the text ('Deactivate' or 'Activate') for the notice action link.

return: string

bp_message_notice_dismiss_link()   X-Ref
Output the URL for dismissing the current notice for the current user.

since: 9.0.0

bp_get_message_notice_dismiss_link()   X-Ref
Get the URL for dismissing the current notice for the current user.

return: string URL for dismissing the current notice for the current user.
since: 9.0.0

bp_messages_slug()   X-Ref
Output the messages component slug.

since: 1.5.0

bp_get_messages_slug()   X-Ref
Return the messages component slug.

return: string
since: 1.5.0

bp_message_get_notices()   X-Ref
Generate markup for currently active notices.


bp_send_private_message_link()   X-Ref
Output the URL for the Private Message link in member profile headers.


bp_get_send_private_message_link()   X-Ref
Generate the URL for the Private Message link in member profile headers.

return: bool|string False on failure, otherwise the URL.

bp_send_private_message_button()   X-Ref
Output the 'Private Message' button for member profile headers.

Explicitly named function to avoid confusion with public messages.

since: 1.2.6

bp_send_message_button( $args = '' )   X-Ref
Output the 'Private Message' button for member profile headers.

param: array|string $args See {@link bp_get_send_message_button()}.
since: 1.2.0
since: 3.0.0 Added `$args` parameter.

bp_get_send_message_button( $args = '' )   X-Ref
Generate the 'Private Message' button for member profile headers.

return: string
param: array|string $args {
since: 1.2.0
since: 3.0.0 Added `$args` parameter.

bp_message_loading_image_src()   X-Ref
Output the URL of the Messages AJAX loader gif.


bp_get_message_loading_image_src()   X-Ref
Get the URL of the Messages AJAX loader gif.

return: string

bp_message_get_recipient_tabs()   X-Ref
Output the markup for the message recipient tabs.


bp_message_get_recipient_usernames()   X-Ref
Output recipient usernames for prefilling the 'To' field on the Compose screen.


bp_get_message_get_recipient_usernames()   X-Ref
Get the recipient usernames for prefilling the 'To' field on the Compose screen.

return: string

bp_thread_has_messages( $args = '' )   X-Ref
Initialize the messages template loop for a specific thread.

return: bool True if there are messages to display, otherwise false.
param: array|string $args {

bp_thread_messages_order()   X-Ref
Output the 'ASC' or 'DESC' messages order string for this loop.


bp_get_thread_messages_order()   X-Ref
Get the 'ASC' or 'DESC' messages order string for this loop.

return: string

bp_thread_messages()   X-Ref
Check whether there are more messages to iterate over.

return: bool

bp_thread_the_message()   X-Ref
Set up the current thread inside the loop.

return: BP_Messages_Message

bp_the_thread_id()   X-Ref
Output the ID of the thread that the current loop belongs to.


bp_get_the_thread_id()   X-Ref
Get the ID of the thread that the current loop belongs to.

return: int

bp_the_thread_subject()   X-Ref
Output the subject of the thread currently being iterated over.


bp_get_the_thread_subject()   X-Ref
Get the subject of the thread currently being iterated over.

return: string

bp_get_the_thread_recipients()   X-Ref
Get a list of thread recipients or a "x recipients" string.

In BuddyPress 2.2.0, this parts of this functionality were moved into the
members/single/messages/single.php template. This function is no longer used
by BuddyPress.

return: string

bp_get_thread_recipients_count()   X-Ref
Get the number of recipients in the current thread.

return: int
since: 2.2.0

bp_get_max_thread_recipients_to_list()   X-Ref
Get the max number of recipients to list in the 'Conversation between...' gloss.

return: int
since: 2.3.0

bp_the_thread_recipients_list()   X-Ref
Output HTML links to recipients in the current thread.

since: 2.2.0

bp_get_thread_recipients_list()   X-Ref
Generate HTML links to the profiles of recipients in the current thread.

return: string
since: 2.2.0

bp_the_thread_message_id()   X-Ref
Echo the ID of the current message in the thread.

since: 1.9.0

bp_get_the_thread_message_id()   X-Ref
Get the ID of the current message in the thread.

return: int
since: 1.9.0

bp_the_thread_message_css_class()   X-Ref
Output the CSS classes for messages within a single thread.

since: 2.1.0

bp_get_the_thread_message_css_class()   X-Ref
Generate the CSS classes for messages within a single thread.

return: string
since: 2.1.0

bp_the_thread_message_alt_class()   X-Ref
Output the CSS class used for message zebra striping.


bp_get_the_thread_message_alt_class()   X-Ref
Get the CSS class used for message zebra striping.

return: string

bp_the_thread_message_sender_id()   X-Ref
Output the ID for message sender within a single thread.

since: 2.1.0

bp_get_the_thread_message_sender_id()   X-Ref
Return the ID for message sender within a single thread.

return: int
since: 2.1.0

bp_the_thread_message_sender_avatar( $args = '' )   X-Ref
Output the avatar for the current message sender.

param: array|string $args See {@link bp_get_the_thread_message_sender_avatar_thumb()}

bp_get_the_thread_message_sender_avatar_thumb( $args = '' )   X-Ref
Get the avatar for the current message sender.

return: string <img> tag containing the avatar.
param: array|string $args {

bp_the_thread_message_sender_link()   X-Ref
Output a link to the sender of the current message.

since: 1.1.0

bp_get_the_thread_message_sender_link()   X-Ref
Get a link to the sender of the current message.

return: string
since: 1.1.0

bp_the_thread_message_sender_name()   X-Ref
Output the display name of the sender of the current message.

since: 1.1.0

bp_get_the_thread_message_sender_name()   X-Ref
Get the display name of the sender of the current message.

return: string
since: 1.1.0

bp_the_thread_delete_link()   X-Ref
Output the URL for deleting the current thread.

since: 1.5.0

bp_get_the_thread_delete_link()   X-Ref
Get the URL for deleting the current thread.

return: string URL
since: 1.5.0

bp_the_thread_exit_link()   X-Ref
Output the URL to exit the current thread.

since: 10.0.0

bp_get_the_thread_exit_link()   X-Ref
Get the URL to exit the current thread.

return: string URL
since: 10.0.0

bp_the_thread_message_time_since()   X-Ref
Output the 'Sent x hours ago' string for the current message.

since: 1.1.0

bp_get_the_thread_message_time_since()   X-Ref
Generate the 'Sent x hours ago' string for the current message.

return: string
since: 1.1.0

bp_the_thread_message_date_sent()   X-Ref
Output the timestamp for the current message.

since: 2.1.0

bp_get_the_thread_message_date_sent()   X-Ref
Generate the 'Sent x hours ago' string for the current message.

return: int
since: 2.1.0

bp_the_thread_message_content()   X-Ref
Output the content of the current message in the loop.

since: 1.1.0

bp_get_the_thread_message_content()   X-Ref
Get the content of the current message in the loop.

return: string
since: 1.1.0

bp_messages_embed()   X-Ref
Enable oEmbed support for Messages.

since: 1.5.0

bp_embed_message_cache( $cache, $id, $cachekey )   X-Ref
Fetch a private message item's cached embeds.

Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}.

return: mixed The cached embeds for this message item.
param: string $cache    An empty string passed by BP_Embed::parse_oembed() for
param: int    $id       The ID of the message item.
param: string $cachekey The cache key generated in BP_Embed::parse_oembed().
since: 2.2.0

bp_embed_message_save_cache( $cache, $cachekey, $id )   X-Ref
Set a private message item's embed cache.

Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}.

param: string $cache    An empty string passed by BP_Embed::parse_oembed() for
param: string $cachekey The cache key generated in BP_Embed::parse_oembed().
param: int    $id       The ID of the message item.
since: 2.2.0



Generated: Thu Nov 21 01:00:57 2024 Cross-referenced by PHPXref 0.7.1