Changeset 10711 for trunk/src/bp-members/bp-members-template.php
- Timestamp:
- 04/15/2016 04:59:34 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-template.php
r10690 r10711 293 293 * global, enabling the use of BuddyPress templates and template functions to 294 294 * display a list of members. 295 * 296 * @since 1.2.0 295 297 * 296 298 * @global object $members_template {@link BP_Members_Template} … … 439 441 * Set up the current member inside the loop. 440 442 * 443 * @since 1.2.0 444 * 441 445 * @return object 442 446 */ … … 449 453 * Check whether there are more members to iterate over. 450 454 * 455 * @since 1.2.0 456 * 451 457 * @return bool 452 458 */ … … 458 464 /** 459 465 * Output the members pagination count. 466 * 467 * @since 1.2.0 460 468 */ 461 469 function bp_members_pagination_count() { … … 464 472 /** 465 473 * Generate the members pagination count. 474 * 475 * @since 1.5.0 466 476 * 467 477 * @return string … … 516 526 /** 517 527 * Output the members pagination links. 528 * 529 * @since 1.2.0 518 530 */ 519 531 function bp_members_pagination_links() { … … 523 535 * Fetch the members pagination links. 524 536 * 537 * @since 1.2.0 538 * 525 539 * @return string 526 540 */ … … 541 555 * Output the ID of the current member in the loop. 542 556 * 557 * @since 1.2.0 558 * 543 559 * @uses bp_get_member_user_id() 544 560 */ … … 548 564 /** 549 565 * Get the ID of the current member in the loop. 566 * 567 * @since 1.2.0 550 568 * 551 569 * @return string Member ID. … … 581 599 * 582 600 * @param array $classes Array of custom classes. 583 *584 601 * @return string Row class of the member 585 602 */ … … 592 609 $classes[] = ( $pos_in_loop % 2 ) ? 'even' : 'odd'; 593 610 594 // If we've only one member in the loop, don't bother with odd and even.611 // If we've only one member in the loop, don't bother with odd and even. 595 612 } else { 596 613 $classes[] = 'bp-single-member'; … … 639 656 /** 640 657 * Output nicename of current member in the loop. 658 * 659 * @since 1.2.5 641 660 */ 642 661 function bp_member_user_nicename() { … … 646 665 * Get the nicename of the current member in the loop. 647 666 * 667 * @since 1.2.5 668 * 648 669 * @return string Members nicename. 649 670 */ … … 663 684 /** 664 685 * Output login for current member in the loop. 686 * 687 * @since 1.2.5 665 688 */ 666 689 function bp_member_user_login() { … … 670 693 * Get the login of the current member in the loop. 671 694 * 695 * @since 1.2.5 696 * 672 697 * @return string Member's login. 673 698 */ … … 687 712 /** 688 713 * Output the email address for the current member in the loop. 714 * 715 * @since 1.2.5 689 716 */ 690 717 function bp_member_user_email() { … … 694 721 * Get the email address of the current member in the loop. 695 722 * 723 * @since 1.2.5 724 * 696 725 * @return string Member's email address. 697 726 */ … … 712 741 * Check whether the current member in the loop is the logged-in user. 713 742 * 743 * @since 1.2.5 744 * 714 745 * @return bool 715 746 */ … … 730 761 * Output a member's avatar. 731 762 * 763 * @since 1.2.0 764 * 732 765 * @see bp_get_member_avatar() for description of arguments. 733 766 * … … 747 780 /** 748 781 * Get a member's avatar. 782 * 783 * @since 1.2.0 749 784 * 750 785 * @see bp_core_fetch_avatar() For a description of arguments and … … 794 829 /** 795 830 * Output the permalink for the current member in the loop. 831 * 832 * @since 1.2.0 796 833 */ 797 834 function bp_member_permalink() { … … 801 838 * Get the permalink for the current member in the loop. 802 839 * 840 * @since 1.2.0 841 * 803 842 * @return string 804 843 */ … … 818 857 /** 819 858 * Alias of {@link bp_member_permalink()}. 859 * 860 * @since 1.2.0 820 861 */ 821 862 function bp_member_link() { echo bp_get_member_permalink(); } … … 823 864 /** 824 865 * Alias of {@link bp_get_member_permalink()}. 866 * 867 * @since 1.2.0 825 868 */ 826 869 function bp_get_member_link() { return bp_get_member_permalink(); } … … 828 871 /** 829 872 * Output display name of current member in the loop. 873 * 874 * @since 1.2.0 830 875 */ 831 876 function bp_member_name() { … … 847 892 * WP users table, in the following order of preference: display_name, 848 893 * user_nicename, user_login. 894 * 895 * @since 1.2.0 849 896 * 850 897 * @return string The user's fullname for display. … … 888 935 * Output the current member's last active time. 889 936 * 937 * @since 1.2.0 938 * 890 939 * @param array $args See {@link bp_get_member_last_active()}. 891 940 */ … … 895 944 /** 896 945 * Return the current member's last active time. 946 * 947 * @since 1.2.0 897 948 * 898 949 * @param array $args { … … 926 977 : bp_core_time_since( $members_template->member->last_activity ); 927 978 928 // Member has never logged in or been active.979 // Member has never logged in or been active. 929 980 } else { 930 981 $last_activity = __( 'Never active', 'buddypress' ); … … 945 996 * Output the latest update of the current member in the loop. 946 997 * 998 * @since 1.2.0 999 * 947 1000 * @param array|string $args Array of arguments for latest update. 948 1001 */ … … 952 1005 /** 953 1006 * Get the latest update from the current member in the loop. 1007 * 1008 * @since 1.2.0 954 1009 * 955 1010 * @param array|string $args { … … 1007 1062 * Output a piece of user profile data. 1008 1063 * 1064 * @since 1.2.0 1065 * 1009 1066 * @see bp_get_member_profile_data() for a description of params. 1010 1067 * … … 1020 1077 * to fetch profile data cached in the template global. It is also safe 1021 1078 * to use outside of the loop. 1079 * 1080 * @since 1.2.0 1022 1081 * 1023 1082 * @param array|string $args { … … 1088 1147 /** 1089 1148 * Output the 'registered [x days ago]' string for the current member. 1149 * 1150 * @since 1.2.0 1090 1151 */ 1091 1152 function bp_member_registered() { … … 1095 1156 * Get the 'registered [x days ago]' string for the current member. 1096 1157 * 1158 * @since 1.2.0 1159 * 1097 1160 * @return string 1098 1161 */ … … 1114 1177 /** 1115 1178 * Output a random piece of profile data for the current member in the loop. 1179 * 1180 * @since 1.2.0 1116 1181 */ 1117 1182 function bp_member_random_profile_data() { … … 1127 1192 /** 1128 1193 * Output hidden input for preserving member search params on form submit. 1194 * 1195 * @since 1.2.0 1129 1196 */ 1130 1197 function bp_member_hidden_fields() { … … 1146 1213 /** 1147 1214 * Output the Members directory search form. 1215 * 1216 * @since 1.0.0 1148 1217 */ 1149 1218 function bp_directory_members_search_form() { … … 1174 1243 /** 1175 1244 * Output the total member count. 1245 * 1246 * @since 1.2.0 1176 1247 */ 1177 1248 function bp_total_site_member_count() { … … 1181 1252 * Get the total site member count. 1182 1253 * 1254 * @since 1.2.0 1255 * 1183 1256 * @return int 1184 1257 */ … … 1208 1281 * The function will also analyze the current component the user is in, to 1209 1282 * determine whether or not to highlight a particular nav item. 1283 * 1284 * @since 1.1.0 1210 1285 * 1211 1286 * @todo Move to a back-compat file? … … 1253 1328 /** 1254 1329 * Render the navigation markup for the displayed user. 1330 * 1331 * @since 1.1.0 1255 1332 */ 1256 1333 function bp_get_displayed_user_nav() { … … 1306 1383 * Output the logged-in user's avatar. 1307 1384 * 1385 * @since 1.1.0 1386 * 1308 1387 * @see bp_get_loggedin_user_avatar() for a description of params. 1309 1388 * … … 1315 1394 /** 1316 1395 * Get the logged-in user's avatar. 1396 * 1397 * @since 1.1.0 1317 1398 * 1318 1399 * @see bp_core_fetch_avatar() For a description of arguments and … … 1355 1436 * Output the displayed user's avatar. 1356 1437 * 1438 * @since 1.1.0 1439 * 1357 1440 * @see bp_get_displayed_user_avatar() for a description of params. 1358 1441 * … … 1364 1447 /** 1365 1448 * Get the displayed user's avatar. 1449 * 1450 * @since 1.1.0 1366 1451 * 1367 1452 * @see bp_core_fetch_avatar() For a description of arguments and … … 1403 1488 /** 1404 1489 * Output the email address of the displayed user. 1490 * 1491 * @since 1.5.0 1405 1492 */ 1406 1493 function bp_displayed_user_email() { … … 1409 1496 /** 1410 1497 * Get the email address of the displayed user. 1498 * 1499 * @since 1.5.0 1411 1500 * 1412 1501 * @return string … … 1434 1523 * Output the "active [x days ago]" string for a user. 1435 1524 * 1525 * @since 1.0.0 1526 * 1436 1527 * @see bp_get_last_activity() for a description of parameters. 1437 1528 * … … 1451 1542 /** 1452 1543 * Get the "active [x days ago]" string for a user. 1544 * 1545 * @since 1.5.0 1453 1546 * 1454 1547 * @param int $user_id ID of the user. Default: displayed user ID. … … 1474 1567 /** 1475 1568 * Output the calculated first name of the displayed or logged-in user. 1569 * 1570 * @since 1.2.0 1476 1571 */ 1477 1572 function bp_user_firstname() { … … 1482 1577 * 1483 1578 * Simply takes all the characters before the first space in a name. 1579 * 1580 * @since 1.2.0 1484 1581 * 1485 1582 * @param string|bool $name Full name to use when generating first name. … … 1513 1610 /** 1514 1611 * Output the link for the logged-in user's profile. 1612 * 1613 * @since 1.2.4 1515 1614 */ 1516 1615 function bp_loggedin_user_link() { … … 1520 1619 * Get the link for the logged-in user's profile. 1521 1620 * 1621 * @since 1.0.0 1622 * 1522 1623 * @return string 1523 1624 */ … … 1536 1637 /** 1537 1638 * Output the link for the displayed user's profile. 1639 * 1640 * @since 1.2.4 1538 1641 */ 1539 1642 function bp_displayed_user_link() { … … 1543 1646 * Get the link for the displayed user's profile. 1544 1647 * 1648 * @since 1.0.0 1649 * 1545 1650 * @return string 1546 1651 */ … … 1566 1671 /** 1567 1672 * Alias of {@link bp_displayed_user_id()}. 1673 * 1674 * @since 1.0.0 1568 1675 */ 1569 1676 function bp_current_user_id() { return bp_displayed_user_id(); } … … 1571 1678 /** 1572 1679 * Generate the link for the displayed user's profile. 1680 * 1681 * @since 1.0.0 1573 1682 * 1574 1683 * @return string … … 1590 1699 * Generate the link for the logged-in user's profile. 1591 1700 * 1701 * @since 1.0.0 1702 * 1592 1703 * @return string 1593 1704 */ … … 1607 1718 /** 1608 1719 * Output the displayed user's display name. 1720 * 1721 * @since 1.0.0 1609 1722 */ 1610 1723 function bp_displayed_user_fullname() { … … 1614 1727 * Get the displayed user's display name. 1615 1728 * 1729 * @since 1.2.0 1730 * 1616 1731 * @return string 1617 1732 */ … … 1631 1746 /** 1632 1747 * Alias of {@link bp_get_displayed_user_fullname()}. 1748 * 1749 * @since 1.0.0 1633 1750 */ 1634 1751 function bp_user_fullname() { echo bp_get_displayed_user_fullname(); } … … 1637 1754 /** 1638 1755 * Output the logged-in user's display name. 1756 * 1757 * @since 1.0.0 1639 1758 */ 1640 1759 function bp_loggedin_user_fullname() { … … 1644 1763 * Get the logged-in user's display name. 1645 1764 * 1765 * @since 1.0.0 1766 * 1646 1767 * @return string 1647 1768 */ … … 1661 1782 /** 1662 1783 * Output the username of the displayed user. 1784 * 1785 * @since 1.2.0 1663 1786 */ 1664 1787 function bp_displayed_user_username() { … … 1667 1790 /** 1668 1791 * Get the username of the displayed user. 1792 * 1793 * @since 1.2.0 1669 1794 * 1670 1795 * @return string … … 1691 1816 /** 1692 1817 * Output the username of the logged-in user. 1818 * 1819 * @since 1.2.0 1693 1820 */ 1694 1821 function bp_loggedin_user_username() { … … 1697 1824 /** 1698 1825 * Get the username of the logged-in user. 1826 * 1827 * @since 1.2.0 1699 1828 * 1700 1829 * @return string … … 1738 1867 $message = sprintf( __( 'Viewing members of the type: %s', 'buddypress' ), '<strong>' . $type_object->labels['singular_name'] . '</strong>' ); 1739 1868 1869 /** 1870 * Filters the current member type message. 1871 * 1872 * @since 2.3.0 1873 * 1874 * @param string $message Message to filter. 1875 */ 1740 1876 return apply_filters( 'bp_get_current_member_type_message', $message ); 1741 1877 } … … 1764 1900 /** 1765 1901 * Output the URL to the signup page. 1902 * 1903 * @since 1.0.0 1766 1904 */ 1767 1905 function bp_signup_page() { … … 1770 1908 /** 1771 1909 * Get the URL to the signup page. 1910 * 1911 * @since 1.1.0 1772 1912 * 1773 1913 * @return string … … 1797 1937 * @uses bp_get_activate_slug() To make sure there is a slug assigned to the page. 1798 1938 * @uses bp_locate_template() To make sure a template exists to provide output. 1939 * 1799 1940 * @return boolean True if page and template exist, false if not. 1800 1941 */ … … 1810 1951 /** 1811 1952 * Output the URL of the activation page. 1953 * 1954 * @since 1.0.0 1812 1955 */ 1813 1956 function bp_activation_page() { … … 1816 1959 /** 1817 1960 * Get the URL of the activation page. 1961 * 1962 * @since 1.2.0 1818 1963 * 1819 1964 * @return string … … 1838 1983 /** 1839 1984 * Output the username submitted during signup. 1985 * 1986 * @since 1.1.0 1840 1987 */ 1841 1988 function bp_signup_username_value() { … … 1844 1991 /** 1845 1992 * Get the username submitted during signup. 1993 * 1994 * @since 1.1.0 1846 1995 * 1847 1996 * @todo This should be properly escaped. … … 1866 2015 /** 1867 2016 * Output the user email address submitted during signup. 2017 * 2018 * @since 1.1.0 1868 2019 */ 1869 2020 function bp_signup_email_value() { … … 1872 2023 /** 1873 2024 * Get the email address submitted during signup. 2025 * 2026 * @since 1.1.0 1874 2027 * 1875 2028 * @todo This should be properly escaped. … … 1894 2047 /** 1895 2048 * Output the 'signup_with_blog' value submitted during signup. 2049 * 2050 * @since 1.1.0 1896 2051 */ 1897 2052 function bp_signup_with_blog_value() { … … 1900 2055 /** 1901 2056 * Get the 'signup_with_blog' value submitted during signup. 2057 * 2058 * @since 1.1.0 1902 2059 * 1903 2060 * @return string … … 1920 2077 /** 1921 2078 * Output the 'signup_blog_url' value submitted at signup. 2079 * 2080 * @since 1.1.0 1922 2081 */ 1923 2082 function bp_signup_blog_url_value() { … … 1926 2085 /** 1927 2086 * Get the 'signup_blog_url' value submitted at signup. 2087 * 2088 * @since 1.1.0 1928 2089 * 1929 2090 * @todo Should be properly escaped. … … 1982 2143 /** 1983 2144 * Output the 'signup_blog_titl' value submitted at signup. 2145 * 2146 * @since 1.1.0 1984 2147 */ 1985 2148 function bp_signup_blog_title_value() { … … 1988 2151 /** 1989 2152 * Get the 'signup_blog_title' value submitted at signup. 2153 * 2154 * @since 1.1.0 1990 2155 * 1991 2156 * @todo Should be properly escaped. … … 2010 2175 /** 2011 2176 * Output the 'signup_blog_privacy' value submitted at signup. 2177 * 2178 * @since 1.1.0 2012 2179 */ 2013 2180 function bp_signup_blog_privacy_value() { … … 2016 2183 /** 2017 2184 * Get the 'signup_blog_privacy' value submitted at signup. 2185 * 2186 * @since 1.1.0 2018 2187 * 2019 2188 * @todo Should be properly escaped. … … 2038 2207 /** 2039 2208 * Output the avatar dir used during signup. 2209 * 2210 * @since 1.1.0 2040 2211 */ 2041 2212 function bp_signup_avatar_dir_value() { … … 2044 2215 /** 2045 2216 * Get the avatar dir used during signup. 2217 * 2218 * @since 1.1.0 2046 2219 * 2047 2220 * @return string … … 2074 2247 /** 2075 2248 * Output the current signup step. 2249 * 2250 * @since 1.1.0 2076 2251 */ 2077 2252 function bp_current_signup_step() { … … 2081 2256 * Get the current signup step. 2082 2257 * 2258 * @since 1.1.0 2259 * 2083 2260 * @return string 2084 2261 */ … … 2090 2267 * Output the user avatar during signup. 2091 2268 * 2269 * @since 1.1.0 2270 * 2092 2271 * @see bp_get_signup_avatar() for description of arguments. 2093 2272 * … … 2099 2278 /** 2100 2279 * Get the user avatar during signup. 2280 * 2281 * @since 1.1.0 2101 2282 * 2102 2283 * @see bp_core_fetch_avatar() for description of arguments. … … 2136 2317 ) ); 2137 2318 2138 // No avatar DIR was found.2319 // No avatar DIR was found. 2139 2320 } else { 2140 2321 … … 2173 2354 * Output whether signup is allowed. 2174 2355 * 2356 * @since 1.1.0 2357 * 2175 2358 * @todo Remove this function. Echoing a bool is pointless. 2176 2359 */ … … 2180 2363 /** 2181 2364 * Is user signup allowed? 2365 * 2366 * @since 1.1.0 2182 2367 * 2183 2368 * @return bool … … 2229 2414 * Output a link to a members component subpage. 2230 2415 * 2416 * @since 1.5.0 2417 * 2231 2418 * @see bp_get_members_component_link() for description of parameters. 2232 2419 * … … 2241 2428 /** 2242 2429 * Generate a link to a members component subpage. 2430 * 2431 * @since 1.5.0 2243 2432 * 2244 2433 * @param string $component ID of the component (eg 'friends').
Note: See TracChangeset
for help on using the changeset viewer.