Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/25/2015 12:02:25 AM (11 years ago)
Author:
tw2113
Message:

Standardizing our @since tags for the Messages component.

See #6576.

File:
1 edited

Legend:

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

    r10060 r10139  
    11<?php
    2 
    32/**
    43 * BuddyPress Messages Template Tags.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    290289                         * Fires when at the end of threads to iterate over.
    291290                         *
    292                          * @since BuddyPress (1.5.0)
     291                         * @since 1.5.0
    293292                         */
    294293                        do_action( 'messages_box_loop_end' );
     
    352351                         * Fires if at the start of the message thread loop.
    353352                         *
    354                          * @since BuddyPress (1.5.0)
     353                         * @since 1.5.0
    355354                         */
    356355                        do_action( 'messages_box_loop_start' );
     
    366365 * the theme via individual template parts for a member's inbox/sentbox/notices.
    367366 *
    368  * @since BuddyPress (1.0.0)
     367 * @since 1.0.0
    369368 *
    370369 * @global BP_Messages_Box_Template $messages_template
     
    430429         * Filters if there are any message threads to display in inbox/sentbox/notices.
    431430         *
    432          * @since BuddyPress (1.1.0)
     431         * @since 1.1.0
    433432         *
    434433         * @param bool                     $value             Whether or not the message has threads.
     
    476475                 * Filters the ID of the current thread in the loop.
    477476                 *
    478                  * @since BuddyPress (1.0.0)
     477                 * @since 1.0.0
    479478                 *
    480479                 * @param int $thread_id ID of the current thread in the loop.
     
    500499                 * Filters the subject of the current thread in the loop.
    501500                 *
    502                  * @since BuddyPress (1.1.0)
     501                 * @since 1.1.0
    503502                 *
    504503                 * @param string $value Subject of the current thread in the loop.
     
    524523                 * Filters the excerpt of the current thread in the loop.
    525524                 *
    526                  * @since BuddyPress (1.0.0)
     525                 * @since 1.0.0
    527526                 *
    528527                 * @param string $value Excerpt of the current thread in the loop.
     
    540539 * the thread of which you *are* the member.
    541540 *
    542  * @since BuddyPress (2.0.0)
     541 * @since 2.0.0
    543542 */
    544543function bp_message_thread_content() {
     
    554553         * the thread of which you *are* the member.
    555554         *
    556          * @since BuddyPress (2.0.0)
     555         * @since 2.0.0
    557556         * @return string The raw content of the last message in the thread.
    558557         */
     
    563562                 * Filters the content of the last message in the thread.
    564563                 *
    565                  * @since BuddyPress (2.0.0)
     564                 * @since 2.0.0
    566565                 *
    567566                 * @param string $last_message_content Content of the last message in the thread.
     
    587586                 * Filters the link to the page of the current thread's last author.
    588587                 *
    589                  * @since BuddyPress (1.0.0)
     588                 * @since 1.0.0
    590589                 *
    591590                 * @param string $value Link to the page of the current thread's last author.
     
    611610                 * Filters the HTML links to the pages of the current thread's recipients.
    612611                 *
    613                  * @since BuddyPress (1.0.0)
     612                 * @since 1.0.0
    614613                 *
    615614                 * @param string $value HTML links to the pages of the current thread's recipients.
     
    646645                 * Filters the permalink of a particular thread.
    647646                 *
    648                  * @since BuddyPress (1.0.0)
     647                 * @since 1.0.0
    649648                 *
    650649                 * @param string $value permalink of a particular thread.
     
    670669                 * Filters the URL for deleting the current thread.
    671670                 *
    672                  * @since BuddyPress (1.0.0)
     671                 * @since 1.0.0
    673672                 *
    674673                 * @param string $value URL for deleting the current thread.
     
    683682 * Since this function directly outputs a URL, it is escaped.
    684683 *
    685  * @since BuddyPress (2.2.0)
     684 * @since 2.2.0
    686685 */
    687686function bp_the_message_thread_mark_unread_url() {
     
    691690         * Return the URL used for marking a single message thread as unread.
    692691         *
    693          * @since BuddyPress (2.2.0)
     692         * @since 2.2.0
    694693         *
    695694         * @return string
     
    718717                 * Filters the URL used for marking a single message thread as unread.
    719718                 *
    720                  * @since BuddyPress (2.2.0)
     719                 * @since 2.2.0
    721720                 *
    722721                 * @param string $url URL used for marking a single message thread as unread.
     
    730729 * Since this function directly outputs a URL, it is escaped.
    731730 *
    732  * @since BuddyPress (2.2.0)
     731 * @since 2.2.0
    733732 */
    734733function bp_the_message_thread_mark_read_url() {
     
    738737         * Return the URL used for marking a single message thread as read.
    739738         *
    740          * @since BuddyPress (2.2.0)
     739         * @since 2.2.0
    741740         *
    742741         * @return string
     
    765764                 * Filters the URL used for marking a single message thread as read.
    766765                 *
    767                  * @since BuddyPress (2.2.0)
     766                 * @since 2.2.0
    768767                 *
    769768                 * @param string $url URL used for marking a single message thread as read.
     
    795794                 * Filters the CSS class for the current thread.
    796795                 *
    797                  * @since BuddyPress (1.2.10)
     796                 * @since 1.2.10
    798797                 *
    799798                 * @param string $class Class string to be added to the list of classes.
     
    817816         * Filters whether or not a message thread has unread items.
    818817         *
    819          * @since BuddyPress (2.1.0)
     818         * @since 2.1.0
    820819         *
    821820         * @param bool $retval Whether or not a message thread has unread items.
     
    845844                 * Filters the current thread's unread count.
    846845                 *
    847                  * @since BuddyPress (1.0.0)
     846                 * @since 1.0.0
    848847                 *
    849848                 * @param int $count Current thread unread count.
     
    855854 * Output a thread's total message count.
    856855 *
    857  * @since BuddyPress (2.2.0)
     856 * @since 2.2.0
    858857 *
    859858 * @param int|bool $thread_id Optional. ID of the thread. Defaults to current thread ID.
     
    865864         * Get the current thread's total message count.
    866865         *
    867          * @since BuddyPress (2.2.0)
     866         * @since 2.2.0
    868867         *
    869868         * @param int|bool $thread_id Optional. ID of the thread.
     
    889888                 * Filters the current thread's total message count.
    890889                 *
    891                  * @since BuddyPress (2.2.0)
     890                 * @since 2.2.0
    892891                 *
    893892                 * @param int $count Current thread total message count.
     
    899898 * Output markup for the current thread's total and unread count.
    900899 *
    901  * @since BuddyPress (2.2.0)
     900 * @since 2.2.0
    902901 *
    903902 * @param int|bool $thread_id Optional. ID of the thread. Default: current thread ID.
     
    945944                 * Filters the unformatted date of the last post in the current thread.
    946945                 *
    947                  * @since BuddyPress (2.1.0)
     946                 * @since 2.1.0
    948947                 *
    949948                 * @param string $last_message_date Unformatted date of the last post in the current thread.
     
    968967                 * Filters the nicely formatted date of the last post in the current thread.
    969968                 *
    970                  * @since BuddyPress (2.1.0)
     969                 * @since 2.1.0
    971970                 *
    972971                 * @param string $value Formatted date of the last post in the current thread.
     
    10221021                 * Filters the avatar for the last sender in the current message thread.
    10231022                 *
    1024                  * @since BuddyPress (1.0.0)
     1023                 * @since 1.0.0
    10251024                 *
    10261025                 * @param string $value User avatar string.
     
    10531052                 * Filters the unread messages count for the current inbox.
    10541053                 *
    1055                  * @since BuddyPress (1.0.0)
     1054                 * @since 1.0.0
    10561055                 *
    10571056                 * @param int $value Unread messages count for the current inbox.
     
    10771076                 * Filters the pagination HTML for the current thread loop.
    10781077                 *
    1079                  * @since BuddyPress (1.0.0)
     1078                 * @since 1.0.0
    10801079                 *
    10811080                 * @param int $pag_links Pagination HTML for the current thread loop.
     
    11101109 *
    11111110 * @todo  Move markup to template part in: /members/single/messages/search.php
    1112  * @since BuddyPress (1.6.0)
     1111 * @since 1.6.0
    11131112 */
    11141113function bp_message_search_form() {
     
    11391138         * Filters the private message component search form.
    11401139         *
    1141          * @since BuddyPress (2.2.0)
     1140         * @since 2.2.0
    11421141         *
    11431142         * @param string $search_form_html HTML markup for the message search form.
     
    11621161                 * Filters the form action for Messages HTML forms.
    11631162                 *
    1164                  * @since BuddyPress (1.0.0)
     1163                 * @since 1.0.0
    11651164                 *
    11661165                 * @param string $value The form action.
     
    11891188                         * cookie or 'r' $_GET parameter is set.
    11901189                         *
    1191                          * @since BuddyPress (1.0.0)
     1190                         * @since 1.0.0
    11921191                         *
    11931192                         * @param string $value Default user name.
     
    12241223                 * Filters the default value for the subject field.
    12251224                 *
    1226                  * @since BuddyPress (1.0.0)
     1225                 * @since 1.0.0
    12271226                 *
    12281227                 * @param string $subject The default value for the subject field.
     
    12551254                 * Filters the default value for the content field.
    12561255                 *
    1257                  * @since BuddyPress (1.0.0)
     1256                 * @since 1.0.0
    12581257                 *
    12591258                 * @param string $content The default value for the content field.
     
    12941293 * Output the dropdown for bulk management of messages.
    12951294 *
    1296  * @since BuddyPress (2.2.0)
     1295 * @since 2.2.0
    12971296 */
    12981297function bp_messages_bulk_management_dropdown() {
     
    13081307                         * Action to add additional options to the messages bulk management dropdown.
    13091308                         *
    1310                          * @since BuddyPress (2.3.0)
     1309                         * @since 2.3.0
    13111310                         */
    13121311                        do_action( 'bp_messages_bulk_management_dropdown' );
     
    13201319 * Return whether or not the notice is currently active.
    13211320 *
    1322  * @since BuddyPress (1.6.0)
     1321 * @since 1.6.0
    13231322 */
    13241323function bp_messages_is_active_notice() {
     
    13321331         * Filters whether or not the notice is currently active.
    13331332         *
    1334          * @since BuddyPress (2.1.0)
     1333         * @since 2.1.0
    13351334         *
    13361335         * @param bool $retval Whether or not the notice is currently active.
     
    13441343 * Since 1.6 this function has been deprecated in favor of text in the theme.
    13451344 *
    1346  * @since BuddyPress (1.0.0)
    1347  * @deprecated BuddyPress (1.6.0)
     1345 * @since 1.0.0
     1346 * @deprecated 1.6.0
    13481347 * @uses bp_get_message_is_active_notice()
    13491348 */
     
    13571356         * theme.
    13581357         *
    1359          * @since BuddyPress (1.0.0)
    1360          * @deprecated BuddyPress (1.6.0)
     1358         * @since 1.0.0
     1359         * @deprecated 1.6.0
    13611360         * @uses bp_messages_is_active_notice()
    13621361         */
     
    13871386                 * Filters the ID of the current notice in the loop.
    13881387                 *
    1389                  * @since BuddyPress (1.5.0)
     1388                 * @since 1.5.0
    13901389                 *
    13911390                 * @param int $id ID of the current notice in the loop.
     
    14111410                 * Filters the post date of the current notice in the loop.
    14121411                 *
    1413                  * @since BuddyPress (1.0.0)
     1412                 * @since 1.0.0
    14141413                 *
    14151414                 * @param string $value Formatted post date of the current notice in the loop.
     
    14351434                 * Filters the subject of the current notice in the loop.
    14361435                 *
    1437                  * @since BuddyPress (1.0.0)
     1436                 * @since 1.0.0
    14381437                 *
    14391438                 * @param string $subject Subject of the current notice in the loop.
     
    14591458                 * Filters the text of the current notice in the loop.
    14601459                 *
    1461                  * @since BuddyPress (1.0.0)
     1460                 * @since 1.0.0
    14621461                 *
    14631462                 * @param string $message Text for the current notice in the loop.
     
    14831482                 * Filters the URL for deleting the current notice.
    14841483                 *
    1485                  * @since BuddyPress (1.0.0)
     1484                 * @since 1.0.0
    14861485                 *
    14871486                 * @param string $value URL for deleting the current notice.
     
    15141513                 * Filters the URL for deactivating the current notice.
    15151514                 *
    1516                  * @since BuddyPress (1.0.0)
     1515                 * @since 1.0.0
    15171516                 *
    15181517                 * @param string $link URL for deactivating the current notice.
     
    15441543                 * Filters the "Deactivate" or "Activate" text for notice action links.
    15451544                 *
    1546                  * @since BuddyPress (1.0.0)
     1545                 * @since 1.0.0
    15471546                 *
    15481547                 * @param string $text Text used for notice action links.
     
    15541553 * Output the messages component slug.
    15551554 *
    1556  * @since BuddyPress (1.5.0)
     1555 * @since 1.5.0
    15571556 *
    15581557 * @uses bp_get_messages_slug()
     
    15641563         * Return the messages component slug.
    15651564         *
    1566          * @since BuddyPress (1.5.0)
     1565         * @since 1.5.0
    15671566         *
    15681567         * @return string
     
    15731572                 * Filters the messages component slug.
    15741573                 *
    1575                  * @since BuddyPress (1.5.0)
     1574                 * @since 1.5.0
    15761575                 *
    15771576                 * @param string $slug Messages component slug.
     
    16311630                 * Filters the URL for the Private Message link in member profile headers.
    16321631                 *
    1633                  * @since BuddyPress (1.2.10)
     1632                 * @since 1.2.10
    16341633                 *
    16351634                 * @param string $value URL for the Private Message link in member profile headers.
     
    16431642 * Explicitly named function to avoid confusion with public messages.
    16441643 *
    1645  * @since BuddyPress (1.2.6)
     1644 * @since 1.2.6
    16461645 *
    16471646 * @uses bp_get_send_message_button()
     
    16701669                         * Filters the "Private Message" button for member profile headers.
    16711670                         *
    1672                          * @since BuddyPress (1.8.0)
     1671                         * @since 1.8.0
    16731672                         *
    16741673                         * @param array $value See {@link BP_Button}.
     
    17041703                 * Filters the URL of the Messages AJAX loader gif.
    17051704                 *
    1706                  * @since BuddyPress (1.0.0)
     1705                 * @since 1.0.0
    17071706                 *
    17081707                 * @param string $value URL of the Messages AJAX loader gif.
     
    17571756                 * Filters the recipients usernames for prefilling the 'To' field on the Compose screen.
    17581757                 *
    1759                  * @since BuddyPress (1.0.0)
     1758                 * @since 1.0.0
    17601759                 *
    17611760                 * @param string $recipients Recipients usernames for 'To' field prefilling.
     
    19121911                         * Fires when at the end of messages to iterate over.
    19131912                         *
    1914                          * @since BuddyPress (1.1.0)
     1913                         * @since 1.1.0
    19151914                         */
    19161915                        do_action( 'thread_loop_end' );
     
    19421941                         * Fires if at the start of the message loop.
    19431942                         *
    1944                          * @since BuddyPress (1.1.0)
     1943                         * @since 1.1.0
    19451944                         */
    19461945                        do_action( 'thread_loop_start' );
     
    20402039                 * Filters the ID of the thread that the current loop belongs to.
    20412040                 *
    2042                  * @since BuddyPress (1.1.0)
     2041                 * @since 1.1.0
    20432042                 *
    20442043                 * @param int $thread_id ID of the thread.
     
    20642063                 * Filters the subject of the thread currently being iterated over.
    20652064                 *
    2066                  * @since BuddyPress (1.1.0)
     2065                 * @since 1.1.0
    20672066                 *
    20682067                 * @return string $last_message_subject Subject of the thread currently being iterated over.
     
    20932092 * Get the number of recipients in the current thread.
    20942093 *
    2095  * @since BuddyPress (2.2.0)
     2094 * @since 2.2.0
    20962095 *
    20972096 * @return int
     
    21052104 * Get the max number of recipients to list in the 'Conversation between...' gloss.
    21062105 *
    2107  * @since BuddyPress (2.3.0)
     2106 * @since 2.3.0
    21082107 *
    21092108 * @return int
     
    21132112         * Filters the max number of recipients to list in the 'Conversation between...' gloss.
    21142113         *
    2115          * @since BuddyPress (2.3.0)
     2114         * @since 2.3.0
    21162115         *
    21172116         * @param int $count Recipient count. Default: 5.
     
    21232122 * Output HTML links to recipients in the current thread.
    21242123 *
    2125  * @since BuddyPress (2.2.0)
     2124 * @since 2.2.0
    21262125 */
    21272126function bp_the_thread_recipients_list() {
     
    21312130         * Generate HTML links to the profiles of recipients in the current thread.
    21322131         *
    2133          * @since BuddyPress (2.2.0)
     2132         * @since 2.2.0
    21342133         *
    21352134         * @return string
     
    21552154                 * Filters the HTML links to the profiles of recipients in the current thread.
    21562155                 *
    2157                  * @since BuddyPress (2.2.0)
     2156                 * @since 2.2.0
    21582157                 *
    21592158                 * @param string $value Comma-separated list of recipient HTML links for current thread.
     
    21652164 * Echo the ID of the current message in the thread.
    21662165 *
    2167  * @since BuddyPress (1.9.0)
     2166 * @since 1.9.0
    21682167 */
    21692168function bp_the_thread_message_id() {
     
    21732172         * Get the ID of the current message in the thread.
    21742173         *
    2175          * @since BuddyPress (1.9.0)
     2174         * @since 1.9.0
    21762175         *
    21772176         * @return int
     
    21872186                 * Filters the ID of the current message in the thread.
    21882187                 *
    2189                  * @since BuddyPress (1.9.0)
     2188                 * @since 1.9.0
    21902189                 *
    21912190                 * @param int $thread_message_id ID of the current message in the thread.
     
    21972196 * Output the CSS classes for messages within a single thread.
    21982197 *
    2199  * @since BuddyPress (2.1.0)
     2198 * @since 2.1.0
    22002199 */
    22012200function bp_the_thread_message_css_class() {
     
    22052204         * Generate the CSS classes for messages within a single thread.
    22062205         *
    2207          * @since BuddyPress (2.1.0)
     2206         * @since 2.1.0
    22082207         *
    22092208         * @return string
     
    22282227                 * Filters the CSS classes for messages within a single thread.
    22292228                 *
    2230                  * @since BuddyPress (2.1.0)
     2229                 * @since 2.1.0
    22312230                 *
    22322231                 * @param array $classes Array of classes to add to the HTML class attribute.
     
    22602259                 * Filters the CSS class used for message zebra striping.
    22612260                 *
    2262                  * @since BuddyPress (1.1.0)
     2261                 * @since 1.1.0
    22632262                 *
    22642263                 * @param string $class Class determined to be next for zebra striping effect.
     
    22702269 * Output the ID for message sender within a single thread.
    22712270 *
    2272  * @since BuddyPress (2.1.0)
     2271 * @since 2.1.0
    22732272 */
    22742273function bp_the_thread_message_sender_id() {
     
    22782277         * Return the ID for message sender within a single thread.
    22792278         *
    2280          * @since BuddyPress (2.1.0)
     2279         * @since 2.1.0
    22812280         *
    22822281         * @return string
     
    22922291                 * Filters the ID for message sender within a single thread.
    22932292                 *
    2294                  * @since BuddyPress (2.1.0)
     2293                 * @since 2.1.0
    22952294                 *
    22962295                 * @param int $user_id ID of the message sender.
     
    23322331                 * Filters the avatar for the current message sender.
    23332332                 *
    2334                  * @since BuddyPress (1.1.0)
     2333                 * @since 1.1.0
    23352334                 *
    23362335                 * @param string $value <img> tag containing the avatar value.
     
    23622361                 * Filters the link to the sender of the current message.
    23632362                 *
    2364                  * @since BuddyPress (1.1.0)
     2363                 * @since 1.1.0
    23652364                 *
    23662365                 * @param string $value Link to the sender of the current message.
     
    23922391                 * Filters the display name of the sender of the current message.
    23932392                 *
    2394                  * @since BuddyPress (1.1.0)
     2393                 * @since 1.1.0
    23952394                 *
    23962395                 * @param string $display_name Display name of the sender of the current message.
     
    24152414                 * Filters the URL for deleting the current thread.
    24162415                 *
    2417                  * @since BuddyPress (1.0.0)
     2416                 * @since 1.0.0
    24182417                 *
    24192418                 * @param string $value URL for deleting the current thread.
     
    24392438                 * Filters the 'Sent x hours ago' string for the current message.
    24402439                 *
    2441                  * @since BuddyPress (1.1.0)
     2440                 * @since 1.1.0
    24422441                 *
    24432442                 * @param string $value Default text of 'Sent x hours ago'.
     
    24492448 * Output the timestamp for the current message.
    24502449 *
    2451  * @since BuddyPress (2.1.0)
     2450 * @since 2.1.0
    24522451 */
    24532452function bp_the_thread_message_date_sent() {
     
    24572456         * Generate the 'Sent x hours ago' string for the current message.
    24582457         *
    2459          * @since BuddyPress (2.1.0)
     2458         * @since 2.1.0
    24602459         *
    24612460         * @uses strtotime() To convert the message string into a usable timestamp.
     
    24692468                 * Filters the date sent value for the current message as a timestamp.
    24702469                 *
    2471                  * @since BuddyPress (2.1.0)
     2470                 * @since 2.1.0
    24722471                 *
    24732472                 * @param string $value Timestamp of the date sent value for the current message.
     
    24932492                 * Filters the content of the current message in the loop.
    24942493                 *
    2495                  * @since BuddyPress (1.1.0)
     2494                 * @since 1.1.0
    24962495                 *
    24972496                 * @param string $message The content of the current message in the loop.
     
    25052504 * Enable oEmbed support for Messages.
    25062505 *
    2507  * @since BuddyPress (1.5.0)
     2506 * @since 1.5.0
    25082507 *
    25092508 * @see BP_Embed
     
    25212520 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}.
    25222521 *
    2523  * @since BuddyPress (2.2.0)
     2522 * @since 2.2.0
    25242523 *
    25252524 * @param string $cache    An empty string passed by BP_Embed::parse_oembed() for
     
    25392538 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}.
    25402539 *
    2541  * @since BuddyPress (2.2.0)
     2540 * @since 2.2.0
    25422541 *
    25432542 * @param string $cache    An empty string passed by BP_Embed::parse_oembed() for
Note: See TracChangeset for help on using the changeset viewer.