Changeset 10139 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 09/25/2015 12:02:25 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-messages/bp-messages-template.php (modified) (93 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r10060 r10139 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Messages Template Tags. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 290 289 * Fires when at the end of threads to iterate over. 291 290 * 292 * @since BuddyPress (1.5.0)291 * @since 1.5.0 293 292 */ 294 293 do_action( 'messages_box_loop_end' ); … … 352 351 * Fires if at the start of the message thread loop. 353 352 * 354 * @since BuddyPress (1.5.0)353 * @since 1.5.0 355 354 */ 356 355 do_action( 'messages_box_loop_start' ); … … 366 365 * the theme via individual template parts for a member's inbox/sentbox/notices. 367 366 * 368 * @since BuddyPress (1.0.0)367 * @since 1.0.0 369 368 * 370 369 * @global BP_Messages_Box_Template $messages_template … … 430 429 * Filters if there are any message threads to display in inbox/sentbox/notices. 431 430 * 432 * @since BuddyPress (1.1.0)431 * @since 1.1.0 433 432 * 434 433 * @param bool $value Whether or not the message has threads. … … 476 475 * Filters the ID of the current thread in the loop. 477 476 * 478 * @since BuddyPress (1.0.0)477 * @since 1.0.0 479 478 * 480 479 * @param int $thread_id ID of the current thread in the loop. … … 500 499 * Filters the subject of the current thread in the loop. 501 500 * 502 * @since BuddyPress (1.1.0)501 * @since 1.1.0 503 502 * 504 503 * @param string $value Subject of the current thread in the loop. … … 524 523 * Filters the excerpt of the current thread in the loop. 525 524 * 526 * @since BuddyPress (1.0.0)525 * @since 1.0.0 527 526 * 528 527 * @param string $value Excerpt of the current thread in the loop. … … 540 539 * the thread of which you *are* the member. 541 540 * 542 * @since BuddyPress (2.0.0)541 * @since 2.0.0 543 542 */ 544 543 function bp_message_thread_content() { … … 554 553 * the thread of which you *are* the member. 555 554 * 556 * @since BuddyPress (2.0.0)555 * @since 2.0.0 557 556 * @return string The raw content of the last message in the thread. 558 557 */ … … 563 562 * Filters the content of the last message in the thread. 564 563 * 565 * @since BuddyPress (2.0.0)564 * @since 2.0.0 566 565 * 567 566 * @param string $last_message_content Content of the last message in the thread. … … 587 586 * Filters the link to the page of the current thread's last author. 588 587 * 589 * @since BuddyPress (1.0.0)588 * @since 1.0.0 590 589 * 591 590 * @param string $value Link to the page of the current thread's last author. … … 611 610 * Filters the HTML links to the pages of the current thread's recipients. 612 611 * 613 * @since BuddyPress (1.0.0)612 * @since 1.0.0 614 613 * 615 614 * @param string $value HTML links to the pages of the current thread's recipients. … … 646 645 * Filters the permalink of a particular thread. 647 646 * 648 * @since BuddyPress (1.0.0)647 * @since 1.0.0 649 648 * 650 649 * @param string $value permalink of a particular thread. … … 670 669 * Filters the URL for deleting the current thread. 671 670 * 672 * @since BuddyPress (1.0.0)671 * @since 1.0.0 673 672 * 674 673 * @param string $value URL for deleting the current thread. … … 683 682 * Since this function directly outputs a URL, it is escaped. 684 683 * 685 * @since BuddyPress (2.2.0)684 * @since 2.2.0 686 685 */ 687 686 function bp_the_message_thread_mark_unread_url() { … … 691 690 * Return the URL used for marking a single message thread as unread. 692 691 * 693 * @since BuddyPress (2.2.0)692 * @since 2.2.0 694 693 * 695 694 * @return string … … 718 717 * Filters the URL used for marking a single message thread as unread. 719 718 * 720 * @since BuddyPress (2.2.0)719 * @since 2.2.0 721 720 * 722 721 * @param string $url URL used for marking a single message thread as unread. … … 730 729 * Since this function directly outputs a URL, it is escaped. 731 730 * 732 * @since BuddyPress (2.2.0)731 * @since 2.2.0 733 732 */ 734 733 function bp_the_message_thread_mark_read_url() { … … 738 737 * Return the URL used for marking a single message thread as read. 739 738 * 740 * @since BuddyPress (2.2.0)739 * @since 2.2.0 741 740 * 742 741 * @return string … … 765 764 * Filters the URL used for marking a single message thread as read. 766 765 * 767 * @since BuddyPress (2.2.0)766 * @since 2.2.0 768 767 * 769 768 * @param string $url URL used for marking a single message thread as read. … … 795 794 * Filters the CSS class for the current thread. 796 795 * 797 * @since BuddyPress (1.2.10)796 * @since 1.2.10 798 797 * 799 798 * @param string $class Class string to be added to the list of classes. … … 817 816 * Filters whether or not a message thread has unread items. 818 817 * 819 * @since BuddyPress (2.1.0)818 * @since 2.1.0 820 819 * 821 820 * @param bool $retval Whether or not a message thread has unread items. … … 845 844 * Filters the current thread's unread count. 846 845 * 847 * @since BuddyPress (1.0.0)846 * @since 1.0.0 848 847 * 849 848 * @param int $count Current thread unread count. … … 855 854 * Output a thread's total message count. 856 855 * 857 * @since BuddyPress (2.2.0)856 * @since 2.2.0 858 857 * 859 858 * @param int|bool $thread_id Optional. ID of the thread. Defaults to current thread ID. … … 865 864 * Get the current thread's total message count. 866 865 * 867 * @since BuddyPress (2.2.0)866 * @since 2.2.0 868 867 * 869 868 * @param int|bool $thread_id Optional. ID of the thread. … … 889 888 * Filters the current thread's total message count. 890 889 * 891 * @since BuddyPress (2.2.0)890 * @since 2.2.0 892 891 * 893 892 * @param int $count Current thread total message count. … … 899 898 * Output markup for the current thread's total and unread count. 900 899 * 901 * @since BuddyPress (2.2.0)900 * @since 2.2.0 902 901 * 903 902 * @param int|bool $thread_id Optional. ID of the thread. Default: current thread ID. … … 945 944 * Filters the unformatted date of the last post in the current thread. 946 945 * 947 * @since BuddyPress (2.1.0)946 * @since 2.1.0 948 947 * 949 948 * @param string $last_message_date Unformatted date of the last post in the current thread. … … 968 967 * Filters the nicely formatted date of the last post in the current thread. 969 968 * 970 * @since BuddyPress (2.1.0)969 * @since 2.1.0 971 970 * 972 971 * @param string $value Formatted date of the last post in the current thread. … … 1022 1021 * Filters the avatar for the last sender in the current message thread. 1023 1022 * 1024 * @since BuddyPress (1.0.0)1023 * @since 1.0.0 1025 1024 * 1026 1025 * @param string $value User avatar string. … … 1053 1052 * Filters the unread messages count for the current inbox. 1054 1053 * 1055 * @since BuddyPress (1.0.0)1054 * @since 1.0.0 1056 1055 * 1057 1056 * @param int $value Unread messages count for the current inbox. … … 1077 1076 * Filters the pagination HTML for the current thread loop. 1078 1077 * 1079 * @since BuddyPress (1.0.0)1078 * @since 1.0.0 1080 1079 * 1081 1080 * @param int $pag_links Pagination HTML for the current thread loop. … … 1110 1109 * 1111 1110 * @todo Move markup to template part in: /members/single/messages/search.php 1112 * @since BuddyPress (1.6.0)1111 * @since 1.6.0 1113 1112 */ 1114 1113 function bp_message_search_form() { … … 1139 1138 * Filters the private message component search form. 1140 1139 * 1141 * @since BuddyPress (2.2.0)1140 * @since 2.2.0 1142 1141 * 1143 1142 * @param string $search_form_html HTML markup for the message search form. … … 1162 1161 * Filters the form action for Messages HTML forms. 1163 1162 * 1164 * @since BuddyPress (1.0.0)1163 * @since 1.0.0 1165 1164 * 1166 1165 * @param string $value The form action. … … 1189 1188 * cookie or 'r' $_GET parameter is set. 1190 1189 * 1191 * @since BuddyPress (1.0.0)1190 * @since 1.0.0 1192 1191 * 1193 1192 * @param string $value Default user name. … … 1224 1223 * Filters the default value for the subject field. 1225 1224 * 1226 * @since BuddyPress (1.0.0)1225 * @since 1.0.0 1227 1226 * 1228 1227 * @param string $subject The default value for the subject field. … … 1255 1254 * Filters the default value for the content field. 1256 1255 * 1257 * @since BuddyPress (1.0.0)1256 * @since 1.0.0 1258 1257 * 1259 1258 * @param string $content The default value for the content field. … … 1294 1293 * Output the dropdown for bulk management of messages. 1295 1294 * 1296 * @since BuddyPress (2.2.0)1295 * @since 2.2.0 1297 1296 */ 1298 1297 function bp_messages_bulk_management_dropdown() { … … 1308 1307 * Action to add additional options to the messages bulk management dropdown. 1309 1308 * 1310 * @since BuddyPress (2.3.0)1309 * @since 2.3.0 1311 1310 */ 1312 1311 do_action( 'bp_messages_bulk_management_dropdown' ); … … 1320 1319 * Return whether or not the notice is currently active. 1321 1320 * 1322 * @since BuddyPress (1.6.0)1321 * @since 1.6.0 1323 1322 */ 1324 1323 function bp_messages_is_active_notice() { … … 1332 1331 * Filters whether or not the notice is currently active. 1333 1332 * 1334 * @since BuddyPress (2.1.0)1333 * @since 2.1.0 1335 1334 * 1336 1335 * @param bool $retval Whether or not the notice is currently active. … … 1344 1343 * Since 1.6 this function has been deprecated in favor of text in the theme. 1345 1344 * 1346 * @since BuddyPress (1.0.0)1347 * @deprecated BuddyPress (1.6.0)1345 * @since 1.0.0 1346 * @deprecated 1.6.0 1348 1347 * @uses bp_get_message_is_active_notice() 1349 1348 */ … … 1357 1356 * theme. 1358 1357 * 1359 * @since BuddyPress (1.0.0)1360 * @deprecated BuddyPress (1.6.0)1358 * @since 1.0.0 1359 * @deprecated 1.6.0 1361 1360 * @uses bp_messages_is_active_notice() 1362 1361 */ … … 1387 1386 * Filters the ID of the current notice in the loop. 1388 1387 * 1389 * @since BuddyPress (1.5.0)1388 * @since 1.5.0 1390 1389 * 1391 1390 * @param int $id ID of the current notice in the loop. … … 1411 1410 * Filters the post date of the current notice in the loop. 1412 1411 * 1413 * @since BuddyPress (1.0.0)1412 * @since 1.0.0 1414 1413 * 1415 1414 * @param string $value Formatted post date of the current notice in the loop. … … 1435 1434 * Filters the subject of the current notice in the loop. 1436 1435 * 1437 * @since BuddyPress (1.0.0)1436 * @since 1.0.0 1438 1437 * 1439 1438 * @param string $subject Subject of the current notice in the loop. … … 1459 1458 * Filters the text of the current notice in the loop. 1460 1459 * 1461 * @since BuddyPress (1.0.0)1460 * @since 1.0.0 1462 1461 * 1463 1462 * @param string $message Text for the current notice in the loop. … … 1483 1482 * Filters the URL for deleting the current notice. 1484 1483 * 1485 * @since BuddyPress (1.0.0)1484 * @since 1.0.0 1486 1485 * 1487 1486 * @param string $value URL for deleting the current notice. … … 1514 1513 * Filters the URL for deactivating the current notice. 1515 1514 * 1516 * @since BuddyPress (1.0.0)1515 * @since 1.0.0 1517 1516 * 1518 1517 * @param string $link URL for deactivating the current notice. … … 1544 1543 * Filters the "Deactivate" or "Activate" text for notice action links. 1545 1544 * 1546 * @since BuddyPress (1.0.0)1545 * @since 1.0.0 1547 1546 * 1548 1547 * @param string $text Text used for notice action links. … … 1554 1553 * Output the messages component slug. 1555 1554 * 1556 * @since BuddyPress (1.5.0)1555 * @since 1.5.0 1557 1556 * 1558 1557 * @uses bp_get_messages_slug() … … 1564 1563 * Return the messages component slug. 1565 1564 * 1566 * @since BuddyPress (1.5.0)1565 * @since 1.5.0 1567 1566 * 1568 1567 * @return string … … 1573 1572 * Filters the messages component slug. 1574 1573 * 1575 * @since BuddyPress (1.5.0)1574 * @since 1.5.0 1576 1575 * 1577 1576 * @param string $slug Messages component slug. … … 1631 1630 * Filters the URL for the Private Message link in member profile headers. 1632 1631 * 1633 * @since BuddyPress (1.2.10)1632 * @since 1.2.10 1634 1633 * 1635 1634 * @param string $value URL for the Private Message link in member profile headers. … … 1643 1642 * Explicitly named function to avoid confusion with public messages. 1644 1643 * 1645 * @since BuddyPress (1.2.6)1644 * @since 1.2.6 1646 1645 * 1647 1646 * @uses bp_get_send_message_button() … … 1670 1669 * Filters the "Private Message" button for member profile headers. 1671 1670 * 1672 * @since BuddyPress (1.8.0)1671 * @since 1.8.0 1673 1672 * 1674 1673 * @param array $value See {@link BP_Button}. … … 1704 1703 * Filters the URL of the Messages AJAX loader gif. 1705 1704 * 1706 * @since BuddyPress (1.0.0)1705 * @since 1.0.0 1707 1706 * 1708 1707 * @param string $value URL of the Messages AJAX loader gif. … … 1757 1756 * Filters the recipients usernames for prefilling the 'To' field on the Compose screen. 1758 1757 * 1759 * @since BuddyPress (1.0.0)1758 * @since 1.0.0 1760 1759 * 1761 1760 * @param string $recipients Recipients usernames for 'To' field prefilling. … … 1912 1911 * Fires when at the end of messages to iterate over. 1913 1912 * 1914 * @since BuddyPress (1.1.0)1913 * @since 1.1.0 1915 1914 */ 1916 1915 do_action( 'thread_loop_end' ); … … 1942 1941 * Fires if at the start of the message loop. 1943 1942 * 1944 * @since BuddyPress (1.1.0)1943 * @since 1.1.0 1945 1944 */ 1946 1945 do_action( 'thread_loop_start' ); … … 2040 2039 * Filters the ID of the thread that the current loop belongs to. 2041 2040 * 2042 * @since BuddyPress (1.1.0)2041 * @since 1.1.0 2043 2042 * 2044 2043 * @param int $thread_id ID of the thread. … … 2064 2063 * Filters the subject of the thread currently being iterated over. 2065 2064 * 2066 * @since BuddyPress (1.1.0)2065 * @since 1.1.0 2067 2066 * 2068 2067 * @return string $last_message_subject Subject of the thread currently being iterated over. … … 2093 2092 * Get the number of recipients in the current thread. 2094 2093 * 2095 * @since BuddyPress (2.2.0)2094 * @since 2.2.0 2096 2095 * 2097 2096 * @return int … … 2105 2104 * Get the max number of recipients to list in the 'Conversation between...' gloss. 2106 2105 * 2107 * @since BuddyPress (2.3.0)2106 * @since 2.3.0 2108 2107 * 2109 2108 * @return int … … 2113 2112 * Filters the max number of recipients to list in the 'Conversation between...' gloss. 2114 2113 * 2115 * @since BuddyPress (2.3.0)2114 * @since 2.3.0 2116 2115 * 2117 2116 * @param int $count Recipient count. Default: 5. … … 2123 2122 * Output HTML links to recipients in the current thread. 2124 2123 * 2125 * @since BuddyPress (2.2.0)2124 * @since 2.2.0 2126 2125 */ 2127 2126 function bp_the_thread_recipients_list() { … … 2131 2130 * Generate HTML links to the profiles of recipients in the current thread. 2132 2131 * 2133 * @since BuddyPress (2.2.0)2132 * @since 2.2.0 2134 2133 * 2135 2134 * @return string … … 2155 2154 * Filters the HTML links to the profiles of recipients in the current thread. 2156 2155 * 2157 * @since BuddyPress (2.2.0)2156 * @since 2.2.0 2158 2157 * 2159 2158 * @param string $value Comma-separated list of recipient HTML links for current thread. … … 2165 2164 * Echo the ID of the current message in the thread. 2166 2165 * 2167 * @since BuddyPress (1.9.0)2166 * @since 1.9.0 2168 2167 */ 2169 2168 function bp_the_thread_message_id() { … … 2173 2172 * Get the ID of the current message in the thread. 2174 2173 * 2175 * @since BuddyPress (1.9.0)2174 * @since 1.9.0 2176 2175 * 2177 2176 * @return int … … 2187 2186 * Filters the ID of the current message in the thread. 2188 2187 * 2189 * @since BuddyPress (1.9.0)2188 * @since 1.9.0 2190 2189 * 2191 2190 * @param int $thread_message_id ID of the current message in the thread. … … 2197 2196 * Output the CSS classes for messages within a single thread. 2198 2197 * 2199 * @since BuddyPress (2.1.0)2198 * @since 2.1.0 2200 2199 */ 2201 2200 function bp_the_thread_message_css_class() { … … 2205 2204 * Generate the CSS classes for messages within a single thread. 2206 2205 * 2207 * @since BuddyPress (2.1.0)2206 * @since 2.1.0 2208 2207 * 2209 2208 * @return string … … 2228 2227 * Filters the CSS classes for messages within a single thread. 2229 2228 * 2230 * @since BuddyPress (2.1.0)2229 * @since 2.1.0 2231 2230 * 2232 2231 * @param array $classes Array of classes to add to the HTML class attribute. … … 2260 2259 * Filters the CSS class used for message zebra striping. 2261 2260 * 2262 * @since BuddyPress (1.1.0)2261 * @since 1.1.0 2263 2262 * 2264 2263 * @param string $class Class determined to be next for zebra striping effect. … … 2270 2269 * Output the ID for message sender within a single thread. 2271 2270 * 2272 * @since BuddyPress (2.1.0)2271 * @since 2.1.0 2273 2272 */ 2274 2273 function bp_the_thread_message_sender_id() { … … 2278 2277 * Return the ID for message sender within a single thread. 2279 2278 * 2280 * @since BuddyPress (2.1.0)2279 * @since 2.1.0 2281 2280 * 2282 2281 * @return string … … 2292 2291 * Filters the ID for message sender within a single thread. 2293 2292 * 2294 * @since BuddyPress (2.1.0)2293 * @since 2.1.0 2295 2294 * 2296 2295 * @param int $user_id ID of the message sender. … … 2332 2331 * Filters the avatar for the current message sender. 2333 2332 * 2334 * @since BuddyPress (1.1.0)2333 * @since 1.1.0 2335 2334 * 2336 2335 * @param string $value <img> tag containing the avatar value. … … 2362 2361 * Filters the link to the sender of the current message. 2363 2362 * 2364 * @since BuddyPress (1.1.0)2363 * @since 1.1.0 2365 2364 * 2366 2365 * @param string $value Link to the sender of the current message. … … 2392 2391 * Filters the display name of the sender of the current message. 2393 2392 * 2394 * @since BuddyPress (1.1.0)2393 * @since 1.1.0 2395 2394 * 2396 2395 * @param string $display_name Display name of the sender of the current message. … … 2415 2414 * Filters the URL for deleting the current thread. 2416 2415 * 2417 * @since BuddyPress (1.0.0)2416 * @since 1.0.0 2418 2417 * 2419 2418 * @param string $value URL for deleting the current thread. … … 2439 2438 * Filters the 'Sent x hours ago' string for the current message. 2440 2439 * 2441 * @since BuddyPress (1.1.0)2440 * @since 1.1.0 2442 2441 * 2443 2442 * @param string $value Default text of 'Sent x hours ago'. … … 2449 2448 * Output the timestamp for the current message. 2450 2449 * 2451 * @since BuddyPress (2.1.0)2450 * @since 2.1.0 2452 2451 */ 2453 2452 function bp_the_thread_message_date_sent() { … … 2457 2456 * Generate the 'Sent x hours ago' string for the current message. 2458 2457 * 2459 * @since BuddyPress (2.1.0)2458 * @since 2.1.0 2460 2459 * 2461 2460 * @uses strtotime() To convert the message string into a usable timestamp. … … 2469 2468 * Filters the date sent value for the current message as a timestamp. 2470 2469 * 2471 * @since BuddyPress (2.1.0)2470 * @since 2.1.0 2472 2471 * 2473 2472 * @param string $value Timestamp of the date sent value for the current message. … … 2493 2492 * Filters the content of the current message in the loop. 2494 2493 * 2495 * @since BuddyPress (1.1.0)2494 * @since 1.1.0 2496 2495 * 2497 2496 * @param string $message The content of the current message in the loop. … … 2505 2504 * Enable oEmbed support for Messages. 2506 2505 * 2507 * @since BuddyPress (1.5.0)2506 * @since 1.5.0 2508 2507 * 2509 2508 * @see BP_Embed … … 2521 2520 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}. 2522 2521 * 2523 * @since BuddyPress (2.2.0)2522 * @since 2.2.0 2524 2523 * 2525 2524 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for … … 2539 2538 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_messages_embed()}. 2540 2539 * 2541 * @since BuddyPress (2.2.0)2540 * @since 2.2.0 2542 2541 * 2543 2542 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for
Note: See TracChangeset
for help on using the changeset viewer.