- Timestamp:
- 03/18/2018 09:56:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r11856 r11899 3 3 * Common template tags 4 4 * 5 * @since 1.0.05 * @since 3.0.0 6 6 */ 7 7 … … 12 12 * Fire specific hooks at various places of templates 13 13 * 14 * @since 1.0.014 * @since 3.0.0 15 15 * 16 16 * @param array $pieces The list of terms of the hook to join. … … 34 34 * Fire plugin hooks in the plugins.php template (Groups and Members single items) 35 35 * 36 * @since 1.0.036 * @since 3.0.0 37 37 * 38 38 * @param string The suffix of the hook. … … 58 58 * once we'll need other friends template tags. 59 59 * 60 * @since 1.0.060 * @since 3.0.0 61 61 * 62 62 * @param string The suffix of the hook. … … 79 79 * Add classes to style the template notice/feedback message 80 80 * 81 * @since 1.0.081 * @since 3.0.0 82 82 */ 83 83 function bp_nouveau_template_message_classes() { … … 95 95 * Get the template notice/feedback message type 96 96 * 97 * @since 1.0.097 * @since 3.0.0 98 98 * 99 99 * @return string The type of the notice. Defaults to error. … … 115 115 * Checks if a template notice/feedback message is set 116 116 * 117 * @since 1.0.0117 * @since 3.0.0 118 118 * 119 119 * @return bool True if a template notice is set. False otherwise. … … 137 137 * 138 138 * 139 * @since 1.0.0139 * @since 3.0.0 140 140 * 141 141 * @return bool True if a template notice needs a dismiss button. False otherwise. … … 163 163 * Currently template_notices(BP) will take $type = 'clear' if button set to true. 164 164 * 165 * @since 1.0.0165 * @since 3.0.0 166 166 */ 167 167 function bp_nouveau_dismiss_button_type() { … … 179 179 * Displays a template notice/feedback message. 180 180 * 181 * @since 1.0.0181 * @since 3.0.0 182 182 */ 183 183 function bp_nouveau_template_message() { … … 188 188 * Get the template notice/feedback message and make sure core filter is applied. 189 189 * 190 * @since 1.0.0190 * @since 3.0.0 191 191 * 192 192 * @return string HTML Output. … … 222 222 * Template tag to display feedback notices to users, if there are to display 223 223 * 224 * @since 1.0.0224 * @since 3.0.0 225 225 */ 226 226 function bp_nouveau_template_notices() { … … 254 254 * Fires after the display of any template_notices feedback messages. 255 255 * 256 * @since 1.1.0256 * @since 3.0.0 257 257 */ 258 258 do_action( 'bp_core_render_message' ); … … 262 262 * Fires towards the top of template pages for notice display. 263 263 * 264 * @since 1.0.0264 * @since 3.0.0 265 265 */ 266 266 do_action( 'template_notices' ); … … 270 270 * Displays a feedback message to the user. 271 271 * 272 * @since 1.0.0272 * @since 3.0.0 273 273 * 274 274 * @param string $feedback_id The ID of the message to display … … 296 296 * Filter here if you wish to use a different templates than the notice one. 297 297 * 298 * @since 1.0.0298 * @since 3.0.0 299 299 * 300 300 * @param string path to your template part. … … 314 314 * Template tag to wrap the before component loop 315 315 * 316 * @since 1.0.0316 * @since 3.0.0 317 317 */ 318 318 function bp_nouveau_before_loop() { … … 334 334 * Template tag to wrap the after component loop 335 335 * 336 * @since 1.0.0336 * @since 3.0.0 337 337 */ 338 338 function bp_nouveau_after_loop() { … … 356 356 * @param string $position 357 357 * 358 * @since 1.0.0358 * @since 3.0.0 359 359 */ 360 360 function bp_nouveau_pagination( $position ) { … … 439 439 * Fires after the component directory list. 440 440 * 441 * @since 1.1.0441 * @since 3.0.0 442 442 */ 443 443 do_action( $bottom_hook ); … … 474 474 * Fires before the component directory list. 475 475 * 476 * @since 1.1.0476 * @since 3.0.0 477 477 */ 478 478 do_action( $top_hook ); … … 483 483 * Display the component's loop classes 484 484 * 485 * @since 1.0.0485 * @since 3.0.0 486 486 * 487 487 * @return string CSS class attributes (escaped). … … 494 494 * Get the component's loop classes 495 495 * 496 * @since 1.0.0496 * @since 3.0.0 497 497 * 498 498 * @return string space separated value of classes. … … 562 562 * NB: you can also directly add classes into the template parts. 563 563 * 564 * @since 1.0.0564 * @since 3.0.0 565 565 * 566 566 * @param array $classes The list of classes. … … 576 576 * Checks if the layout preferences is set to grid (2 or more columns). 577 577 * 578 * @since 1.0.0578 * @since 3.0.0 579 579 * 580 580 * @return bool True if loop is displayed in grid mod. False otherwise. … … 590 590 * Returns the number of columns of the layout preferences. 591 591 * 592 * @since 1.0.0592 * @since 3.0.0 593 593 * 594 594 * @return int The number of columns. … … 607 607 * Filter number of columns for this grid. 608 608 * 609 * @since 1.0.0609 * @since 3.0.0 610 610 * 611 611 * @param int $columns The number of columns. … … 618 618 * Checks if activity, members, groups, blogs has the vert nav layout selected 619 619 * 620 * @since 1.0.0620 * @since 3.0.0 621 621 * 622 622 * @return bool. … … 632 632 * Get the full size avatar args. 633 633 * 634 * @since 1.0.0634 * @since 3.0.0 635 635 * 636 636 * @return array The avatar arguments. … … 662 662 * Init the Navigation Loop and check it has items. 663 663 * 664 * @since 1.0.0664 * @since 3.0.0 665 665 * 666 666 * @param array $args { … … 756 756 * Use the $n param to check for your custom object. 757 757 * 758 * @since 1.0.0758 * @since 3.0.0 759 759 * 760 760 * @param array $nav The list of item navigations generated by the BP_Core_Nav API. … … 785 785 * Checks there are still nav items to display. 786 786 * 787 * @since 1.0.0787 * @since 3.0.0 788 788 * 789 789 * @return bool True if there are still items to display. False otherwise. … … 805 805 * Sets the current nav item and prepare the navigation loop to iterate to next one. 806 806 * 807 * @since 1.0.0807 * @since 3.0.0 808 808 */ 809 809 function bp_nouveau_nav_item() { … … 817 817 * Displays the nav item ID. 818 818 * 819 * @since 1.0.0819 * @since 3.0.0 820 820 */ 821 821 function bp_nouveau_nav_id() { … … 826 826 * Retrieve the ID attribute of the current nav item. 827 827 * 828 * @since 1.0.0828 * @since 3.0.0 829 829 * 830 830 * @return string the ID attribute. … … 845 845 * Filter to edit the ID attribute of the nav. 846 846 * 847 * @since 1.0.0847 * @since 3.0.0 848 848 * 849 849 * @param string $id The ID attribute of the nav. … … 857 857 * Displays the nav item classes. 858 858 * 859 * @since 1.0.0859 * @since 3.0.0 860 860 */ 861 861 function bp_nouveau_nav_classes() { … … 866 866 * Retrieve a space separated list of classes for the current nav item. 867 867 * 868 * @since 1.0.0868 * @since 3.0.0 869 869 * 870 870 * @return string List of classes. … … 909 909 * NB: you can also directly add classes into the template parts. 910 910 * 911 * @since 1.0.0911 * @since 3.0.0 912 912 * 913 913 * @param string $value A space separated list of classes. … … 927 927 * Displays the nav item scope. 928 928 * 929 * @since 1.0.0929 * @since 3.0.0 930 930 */ 931 931 function bp_nouveau_nav_scope() { … … 936 936 * Retrieve the specific scope for the current nav item. 937 937 * 938 * @since 1.0.0938 * @since 3.0.0 939 939 * 940 940 * @return string the specific scope of the nav. … … 955 955 * Filter to add your own scope. 956 956 * 957 * @since 1.0.0957 * @since 3.0.0 958 958 * 959 959 * @param array $scope Contains the key and the value for your scope. … … 974 974 * Displays the nav item URL. 975 975 * 976 * @since 1.0.0976 * @since 3.0.0 977 977 */ 978 978 function bp_nouveau_nav_link() { … … 983 983 * Retrieve the URL for the current nav item. 984 984 * 985 * @since 1.0.0985 * @since 3.0.0 986 986 * 987 987 * @return string The URL for the nav item. … … 1007 1007 * Filter to edit the URL of the nav item. 1008 1008 * 1009 * @since 1.0.01009 * @since 3.0.0 1010 1010 * 1011 1011 * @param string $link The URL for the nav item. … … 1019 1019 * Displays the nav item link ID. 1020 1020 * 1021 * @since 1.0.01021 * @since 3.0.0 1022 1022 */ 1023 1023 function bp_nouveau_nav_link_id() { … … 1028 1028 * Retrieve the id attribute of the link for the current nav item. 1029 1029 * 1030 * @since 1.0.01030 * @since 3.0.0 1031 1031 * 1032 1032 * @return string The link id for the nav item. … … 1050 1050 * Filter to edit the link id attribute of the nav. 1051 1051 * 1052 * @since 1.0.01052 * @since 3.0.0 1053 1053 * 1054 1054 * @param string $link_id The link id attribute for the nav item. … … 1062 1062 * Displays the nav item link title. 1063 1063 * 1064 * @since 1.0.01064 * @since 3.0.0 1065 1065 */ 1066 1066 function bp_nouveau_nav_link_title() { … … 1071 1071 * Retrieve the title attribute of the link for the current nav item. 1072 1072 * 1073 * @since 1.0.01073 * @since 3.0.0 1074 1074 * 1075 1075 * @return string The link title for the nav item. … … 1094 1094 * Filter to edit the link title attribute of the nav. 1095 1095 * 1096 * @since 1.0.01096 * @since 3.0.0 1097 1097 * 1098 1098 * @param string $title The link title attribute for the nav item. … … 1106 1106 * Displays the nav item link html text. 1107 1107 * 1108 * @since 1.0.01108 * @since 3.0.0 1109 1109 */ 1110 1110 function bp_nouveau_nav_link_text() { … … 1115 1115 * Retrieve the html text of the link for the current nav item. 1116 1116 * 1117 * @since 1.0.01117 * @since 3.0.0 1118 1118 * 1119 1119 * @return string The html text for the nav item. … … 1138 1138 * Filter to edit the html text of the nav. 1139 1139 * 1140 * @since 1.0.01140 * @since 3.0.0 1141 1141 * 1142 1142 * @param string $link_text The html text of the nav item. … … 1150 1150 * Checks if the nav item has a count attribute. 1151 1151 * 1152 * @since 1.0.01152 * @since 3.0.0 1153 1153 * 1154 1154 * @return bool … … 1170 1170 * Filter to edit whether the nav has a count attribute. 1171 1171 * 1172 * @since 1.0.01172 * @since 3.0.0 1173 1173 * 1174 1174 * @param bool $value True if the nav has a count attribute. False otherwise … … 1182 1182 * Displays the nav item count attribute. 1183 1183 * 1184 * @since 1.0.01184 * @since 3.0.0 1185 1185 */ 1186 1186 function bp_nouveau_nav_count() { … … 1191 1191 * Retrieve the count attribute for the current nav item. 1192 1192 * 1193 * @since 1.0.01193 * @since 3.0.0 1194 1194 * 1195 1195 * @return int The count attribute for the nav item. … … 1221 1221 * Filter to edit the count attribute for the nav item. 1222 1222 * 1223 * @since 1.0.01223 * @since 3.0.0 1224 1224 * 1225 1225 * @param int $count The count attribute for the nav item. … … 1235 1235 * Displays the directory nav class. 1236 1236 * 1237 * @since 1.0.01237 * @since 3.0.0 1238 1238 */ 1239 1239 function bp_nouveau_directory_type_navs_class() { … … 1247 1247 * Gets user selection Customizer options. 1248 1248 * 1249 * @since 1.0.01249 * @since 3.0.0 1250 1250 * 1251 1251 * @return string … … 1280 1280 * NB: you can also directly add classes to the class attr. 1281 1281 * 1282 * @since 1.0.01282 * @since 3.0.0 1283 1283 * 1284 1284 * @param array $nav_wrapper_classes The list of classes. … … 1292 1292 * Displays the directory nav item list class. 1293 1293 * 1294 * @since 1.0.01294 * @since 3.0.0 1295 1295 */ 1296 1296 function bp_nouveau_directory_list_class() { … … 1301 1301 * Gets the directory nav item list class. 1302 1302 * 1303 * @since 1.0.01303 * @since 3.0.0 1304 1304 */ 1305 1305 function bp_nouveau_get_directory_list_class() { … … 1310 1310 * Displays the directory nav item object (data-bp attribute). 1311 1311 * 1312 * @since 1.0.01312 * @since 3.0.0 1313 1313 */ 1314 1314 function bp_nouveau_directory_nav_object() { … … 1325 1325 * @see BP_Component::setup_nav(). 1326 1326 * 1327 * @since 1.0.01327 * @since 3.0.0 1328 1328 * 1329 1329 * @return array … … 1345 1345 * Output main BuddyPress container classes. 1346 1346 * 1347 * @since 1.0.01347 * @since 3.0.0 1348 1348 * 1349 1349 * @return string CSS classes … … 1356 1356 * Returns the main BuddyPress container classes. 1357 1357 * 1358 * @since 1.0.01358 * @since 3.0.0 1359 1359 * 1360 1360 * @return string CSS classes … … 1445 1445 * Output single item nav container classes 1446 1446 * 1447 * @since 1.0.01447 * @since 3.0.0 1448 1448 * 1449 1449 * @return string CSS classes … … 1456 1456 * Returns the single item nav container classes 1457 1457 * 1458 * @since 1.0.01458 * @since 3.0.0 1459 1459 * 1460 1460 * @return string CSS classes … … 1510 1510 * Output single item subnav container classes. 1511 1511 * 1512 * @since 1.0.01512 * @since 3.0.0 1513 1513 * 1514 1514 * @return string CSS classes … … 1521 1521 * Returns the single item subnav container classes. 1522 1522 * 1523 * @since 1.0.01523 * @since 3.0.0 1524 1524 * 1525 1525 * @return string CSS classes … … 1560 1560 * Output the groups create steps classes. 1561 1561 * 1562 * @since 1.0.01562 * @since 3.0.0 1563 1563 * 1564 1564 * @return string CSS classes … … 1571 1571 * Returns the groups create steps customizer option choice class. 1572 1572 * 1573 * @since 1.0.01573 * @since 3.0.0 1574 1574 * 1575 1575 * @return string CSS classes … … 1594 1594 * Get the search primary object 1595 1595 * 1596 * @since 1.0.01596 * @since 3.0.0 1597 1597 * 1598 1598 * @param string $object Optional. The primary object. … … 1617 1617 * Get The list of search objects (primary + secondary). 1618 1618 * 1619 * @since 1.0.01619 * @since 3.0.0 1620 1620 * 1621 1621 * @param array $objects Optional. The list of objects. … … 1647 1647 * Output the search form container classes. 1648 1648 * 1649 * @since 1.0.01649 * @since 3.0.0 1650 1650 */ 1651 1651 function bp_nouveau_search_container_class() { … … 1659 1659 * Output a selector ID. 1660 1660 * 1661 * @since 1.0.01661 * @since 3.0.0 1662 1662 * 1663 1663 * @param string $suffix Optional. A string to append at the end of the ID. … … 1674 1674 * Output the name attribute of a selector. 1675 1675 * 1676 * @since 1.0.01676 * @since 3.0.0 1677 1677 * 1678 1678 * @param string $suffix Optional. A string to append at the end of the name. … … 1696 1696 * Output the default search text for the search object 1697 1697 * 1698 * @since 1.0.01698 * @since 3.0.0 1699 1699 * 1700 1700 * @param string $text Optional. The default search text for the search object. … … 1723 1723 * Get the search form template part and fire some do_actions if needed. 1724 1724 * 1725 * @since 1.0.01725 * @since 3.0.0 1726 1726 */ 1727 1727 function bp_nouveau_search_form() { … … 1785 1785 * IDs/labels for group/activity & similar screens. 1786 1786 * 1787 * @since 1.0.01787 * @since 3.0.0 1788 1788 */ 1789 1789 function bp_nouveau_current_object() { … … 1814 1814 * Output data filter container's ID attribute value. 1815 1815 * 1816 * @since 1.0.01816 * @since 3.0.0 1817 1817 */ 1818 1818 function bp_nouveau_filter_container_id() { … … 1823 1823 * Get data filter container's ID attribute value. 1824 1824 * 1825 * @since 1.0.01825 * @since 3.0.0 1826 1826 * 1827 1827 * @param string … … 1849 1849 * Output data filter's ID attribute value. 1850 1850 * 1851 * @since 1.0.01851 * @since 3.0.0 1852 1852 */ 1853 1853 function bp_nouveau_filter_id() { … … 1858 1858 * Get data filter's ID attribute value. 1859 1859 * 1860 * @since 1.0.01860 * @since 3.0.0 1861 1861 * 1862 1862 * @param string … … 1884 1884 * Output data filter's label. 1885 1885 * 1886 * @since 1.0.01886 * @since 3.0.0 1887 1887 */ 1888 1888 function bp_nouveau_filter_label() { … … 1893 1893 * Get data filter's label. 1894 1894 * 1895 * @since 1.0.01895 * @since 3.0.0 1896 1896 * 1897 1897 * @param string … … 1911 1911 * Output data filter's data-bp-filter attribute value. 1912 1912 * 1913 * @since 1.0.01913 * @since 3.0.0 1914 1914 */ 1915 1915 function bp_nouveau_filter_component() { … … 1921 1921 * Output the <option> of the data filter's <select> element. 1922 1922 * 1923 * @since 1.0.01923 * @since 3.0.0 1924 1924 */ 1925 1925 function bp_nouveau_filter_options() { … … 1930 1930 * Get the <option> of the data filter's <select> element. 1931 1931 * 1932 * @since 1.0.01932 * @since 3.0.0 1933 1933 * 1934 1934 * @return string … … 1961 1961 * Get a link to reach a specific section into the customizer 1962 1962 * 1963 * @since 1.0.01963 * @since 3.0.0 1964 1964 * 1965 1965 * @param array $args Optional. The argument to customize the Customizer link. … … 2022 2022 * Fire specific hooks into the register template 2023 2023 * 2024 * @since 1.0.02024 * @since 3.0.0 2025 2025 * 2026 2026 * @param string $when 'before' or 'after' … … 2054 2054 * Fire specific hooks into the activate template 2055 2055 * 2056 * @since 1.0.02056 * @since 3.0.0 2057 2057 * 2058 2058 * @param string $when 'before' or 'after' … … 2082 2082 * Output the signup form for the requested section 2083 2083 * 2084 * @since 1.0.02084 * @since 3.0.0 2085 2085 * 2086 2086 * @param string $section Optional. The section of fields to get 'account_details' or 'blog_details'. … … 2244 2244 * Output a submit button and the nonce for the requested action. 2245 2245 * 2246 * @since 1.0.02246 * @since 3.0.0 2247 2247 * 2248 2248 * @param string $action The action to get the submit button for. Required. … … 2282 2282 * @param string $type optional: the type of error message e.g 'error'. 2283 2283 * 2284 * @since 1.0.02284 * @since 3.0.0 2285 2285 */ 2286 2286 function nouveau_error_template( $message = '', $type = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.