Changeset 10100 for trunk/src/bpblogs/bpblogstemplate.php
 Timestamp:
 09/12/2015 06:03:18 AM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/bpblogs/bpblogstemplate.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Template Tags. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' )  exit; 12 11 … … 14 13 * Output the blogs component slug. 15 14 * 16 * @since BuddyPress (1.5.0)15 * @since 1.5.0 17 16 * 18 17 * @uses bp_get_blogs_slug() … … 24 23 * Return the blogs component slug. 25 24 * 26 * @since BuddyPress (1.5.0)25 * @since 1.5.0 27 26 * 28 27 * @return string The 'blogs' slug. … … 33 32 * Filters the blogs component slug. 34 33 * 35 * @since BuddyPress (1.5.0)34 * @since 1.5.0 36 35 * 37 36 * @param string $slug Slug for the blogs component. … … 43 42 * Output the blogs component root slug. 44 43 * 45 * @since BuddyPress (1.5.0)44 * @since 1.5.0 46 45 * 47 46 * @uses bp_get_blogs_root_slug() … … 53 52 * Return the blogs component root slug. 54 53 * 55 * @since BuddyPress (1.5.0)54 * @since 1.5.0 56 55 * 57 56 * @return string The 'blogs' root slug. … … 62 61 * Filters the blogs component root slug. 63 62 * 64 * @since BuddyPress (1.5.0)63 * @since 1.5.0 65 64 * 66 65 * @param string $root_slug Root slug for the blogs component. … … 72 71 * Output blog directory permalink. 73 72 * 74 * @since BuddyPress (1.5.0)73 * @since 1.5.0 75 74 * 76 75 * @uses bp_get_blogs_directory_permalink() … … 82 81 * Return blog directory permalink. 83 82 * 84 * @since BuddyPress (1.5.0)83 * @since 1.5.0 85 84 * 86 85 * @uses apply_filters() … … 96 95 * Filters the blog directory permalink. 97 96 * 98 * @since BuddyPress (1.5.0)97 * @since 1.5.0 99 98 * 100 99 * @param string $value Permalink URL for the blog directory. … … 309 308 * Fires right before the rewinding of blogs listing after all are shown. 310 309 * 311 * @since BuddyPress (1.5.0)310 * @since 1.5.0 312 311 */ 313 312 do_action( 'blog_loop_end' ); … … 340 339 * Fires if on the first blog in the loop. 341 340 * 342 * @since BuddyPress (1.5.0)341 * @since 1.5.0 343 342 */ 344 343 do_action( 'blog_loop_start' ); … … 426 425 * Filters whether or not there are blogs to list. 427 426 * 428 * @since BuddyPress (1.1.0)427 * @since 1.1.0 429 428 * 430 429 * @param bool $value Whether or not there are blogs to list. … … 502 501 * Filters the blogs pagination links. 503 502 * 504 * @since BuddyPress (1.0.0)503 * @since 1.0.0 505 504 * 506 505 * @param string $pag_links HTML pagination links. … … 525 524 * admin. Filter 'bp_get_blog_avatar_' . $blog_id to customize. 526 525 * 527 * @since BuddyPress (2.4.0)Introduced `$title` argument.526 * @since 2.4.0 Introduced `$title` argument. 528 527 * 529 528 * @see bp_core_fetch_avatar() For a description of arguments and … … 595 594 * Filters a blog's avatar. 596 595 * 597 * @since BuddyPress (1.5.0)596 * @since 1.5.0 598 597 * 599 598 * @param string $avatar Formatted HTML <img> element, or raw avatar … … 624 623 * Filters the blog permalink. 625 624 * 626 * @since BuddyPress (1.0.0)625 * @since 1.0.0 627 626 * 628 627 * @param string $permalink Permalink URL for the blog. … … 648 647 * Filters the name of the current blog in the loop. 649 648 * 650 * @since BuddyPress (1.2.0)649 * @since 1.2.0 651 650 * 652 651 * @param string $name Name of the current blog in the loop. … … 658 657 * Output the ID of the current blog in the loop. 659 658 * 660 * @since BuddyPress (1.7.0)659 * @since 1.7.0 661 660 */ 662 661 function bp_blog_id() { … … 666 665 * Return the ID of the current blog in the loop. 667 666 * 668 * @since BuddyPress (1.7.0)667 * @since 1.7.0 669 668 * 670 669 * @return int ID of the current blog in the loop. … … 676 675 * Filters the ID of the current blog in the loop. 677 676 * 678 * @since BuddyPress (1.7.0)677 * @since 1.7.0 679 678 * 680 679 * @param int $blog_id ID of the current blog in the loop. … … 691 690 * Filters the description of the current blog in the loop. 692 691 * 693 * @since BuddyPress (1.2.0)692 * @since 1.2.0 694 693 * 695 694 * @param string $value Description of the current blog in the loop. … … 708 707 * Filters the description of the current blog in the loop. 709 708 * 710 * @since BuddyPress (1.0.0)709 * @since 1.0.0 711 710 * 712 711 * @param string $value Description of the current blog in the loop. … … 718 717 * Output the row class of the current blog in the loop. 719 718 * 720 * @since BuddyPress (1.7.0)719 * @since 1.7.0 721 720 * 722 721 * @param array $classes Array of custom classes … … 728 727 * Return the row class of the current blog in the loop. 729 728 * 730 * @since BuddyPress (1.7.0)729 * @since 1.7.0 731 730 * 732 731 * @global BP_Blogs_Template $blogs_template … … 751 750 * Filters the row class of the current blog in the loop. 752 751 * 753 * @since BuddyPress (1.7.0)752 * @since 1.7.0 754 753 * 755 754 * @param array $classes Array of classes to be applied to row. … … 852 851 * Filters the title text of the latest post for the current blog in loop. 853 852 * 854 * @since BuddyPress (1.0.0)853 * @since 1.0.0 855 854 * 856 855 * @param string $retval Title of the latest post. … … 867 866 * Filters the HTML markup result for the latest blog post in loop. 868 867 * 869 * @since BuddyPress (1.2.0)868 * @since 1.2.0 870 869 * 871 870 * @param string $retval HTML markup for the latest post. … … 877 876 * Output the title of the latest post on the current blog in the loop. 878 877 * 879 * @since BuddyPress (1.7.0)878 * @since 1.7.0 880 879 * 881 880 * @see bp_get_blog_latest_post_title() … … 887 886 * Return the title of the latest post on the current blog in the loop. 888 887 * 889 * @since BuddyPress (1.7.0)888 * @since 1.7.0 890 889 * 891 890 * @global BP_Blogs_Template … … 904 903 * Filters the title text of the latest post on the current blog in the loop. 905 904 * 906 * @since BuddyPress (1.7.0)905 * @since 1.7.0 907 906 * 908 907 * @param string $retval Title text for the latest post. … … 914 913 * Output the permalink of the latest post on the current blog in the loop. 915 914 * 916 * @since BuddyPress (1.7.0)915 * @since 1.7.0 917 916 * 918 917 * @see bp_get_blog_latest_post_title() … … 924 923 * Return the permalink of the latest post on the current blog in the loop. 925 924 * 926 * @since BuddyPress (1.7.0)925 * @since 1.7.0 927 926 * 928 927 * @global BP_Blogs_Template … … 941 940 * Filters the permalink of the latest post on the current blog in the loop. 942 941 * 943 * @since BuddyPress (1.7.0)942 * @since 1.7.0 944 943 * 945 944 * @param string $retval Permalink URL of the latest post. … … 951 950 * Output the content of the latest post on the current blog in the loop. 952 951 * 953 * @since BuddyPress (1.7.0)952 * @since 1.7.0 954 953 * 955 954 * @uses bp_get_blog_latest_post_content() … … 961 960 * Return the content of the latest post on the current blog in the loop. 962 961 * 963 * @since BuddyPress (1.7.0)962 * @since 1.7.0 964 963 * 965 964 * @global BP_Blogs_Template … … 978 977 * Filters the content of the latest post on the current blog in the loop. 979 978 * 980 * @since BuddyPress (1.7.0)979 * @since 1.7.0 981 980 * 982 981 * @param string $retval Content of the latest post on the current blog in the loop. … … 988 987 * Output the featured image of the latest post on the current blog in the loop. 989 988 * 990 * @since BuddyPress (1.7.0)989 * @since 1.7.0 991 990 * 992 991 * @see bp_get_blog_latest_post_content() For description of parameters. … … 1000 999 * Return the featured image of the latest post on the current blog in the loop. 1001 1000 * 1002 * @since BuddyPress (1.7.0)1001 * @since 1.7.0 1003 1002 * 1004 1003 * @global BP_Blogs_Template … … 1020 1019 * Filters the featured image of the latest post on the current blog in the loop. 1021 1020 * 1022 * @since BuddyPress (1.7.0)1021 * @since 1.7.0 1023 1022 * 1024 1023 * @param string $retval The featured image of the latest post on the current blog in the loop. … … 1030 1029 * Does the latest blog post have a featured image? 1031 1030 * 1032 * @since BuddyPress (1.7.0)1031 * @since 1.7.0 1033 1032 * 1034 1033 * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large', … … 1044 1043 * Filters whether or not the latest blog post has a featured image. 1045 1044 * 1046 * @since BuddyPress (1.7.0)1045 * @since 1.7.0 1047 1046 * 1048 1047 * @param bool $value Whether or not the latest blog post has a featured image. … … 1087 1086 * Filters the total number of blogs on the site. 1088 1087 * 1089 * @since BuddyPress (1.2.0)1088 * @since 1.2.0 1090 1089 * 1091 1090 * @param int $value Total number of blogs on the site. … … 1115 1114 * Filters the total number of blogs for a given user. 1116 1115 * 1117 * @since BuddyPress (1.2.0)1116 * @since 1.2.0 1118 1117 * 1119 1118 * @param int $value Total number of blogs for a given user. … … 1144 1143 * Filters whether or not blog creation is enabled. 1145 1144 * 1146 * @since BuddyPress (1.0.0)1145 * @since 1.0.0 1147 1146 * 1148 1147 * @param string $active_signup Value of the registration site option creation status. … … 1177 1176 * Filters the default values for Blog name, title, and any current errors. 1178 1177 * 1179 * @since BuddyPress (1.0.0)1178 * @since 1.0.0 1180 1179 * 1181 1180 * @param array $value { … … 1206 1205 * Fires after the default hidden fields in blog signup form markup. 1207 1206 * 1208 * @since BuddyPress (1.0.0)1207 * @since 1.0.0 1209 1208 */ 1210 1209 do_action( 'signup_hidden_fields' ); ?> … … 1293 1292 * Fires at the end of all of the default input fields for blog creation form. 1294 1293 * 1295 * @since BuddyPress (1.0.0)1294 * @since 1.0.0 1296 1295 * 1297 1296 * @param WP_Error $errors WP_Error object if any present. … … 1334 1333 * Filters the default values for Blog meta. 1335 1334 * 1336 * @since BuddyPress (1.0.0)1335 * @since 1.0.0 1337 1336 * 1338 1337 * @param array $meta { … … 1391 1390 * Fires after the default successful blog registration message markup. 1392 1391 * 1393 * @since BuddyPress (1.0.0)1392 * @since 1.0.0 1394 1393 */ 1395 1394 do_action('signup_finished'); … … 1412 1411 * Filters "Create a Site" links for users viewing their own profiles. 1413 1412 * 1414 * @since BuddyPress (1.0.0)1413 * @since 1.0.0 1415 1414 * 1416 1415 * @param string $value HTML link for creating a site. … … 1442 1441 * Fires after the markup for the navigation tabs for a user Blogs page. 1443 1442 * 1444 * @since BuddyPress (1.0.0)1443 * @since 1.0.0 1445 1444 */ 1446 1445 do_action( 'bp_blogs_blog_tabs' ); … … 1462 1461 * Filters the output for the blog directory search form. 1463 1462 * 1464 * @since BuddyPress (1.9.0)1463 * @since 1.9.0 1465 1464 * 1466 1465 * @param string $search_form_html HTML markup for blog directory search form. … … 1472 1471 * Output the Create a Site button. 1473 1472 * 1474 * @since BuddyPress (2.0.0)1473 * @since 2.0.0 1475 1474 */ 1476 1475 function bp_blog_create_button() { … … 1480 1479 * Get the Create a Site button. 1481 1480 * 1482 * @since BuddyPress (2.0.0)1481 * @since 2.0.0 1483 1482 * 1484 1483 * @return string … … 1507 1506 * Filters the Create a Site button. 1508 1507 * 1509 * @since BuddyPress (2.0.0)1508 * @since 2.0.0 1510 1509 * 1511 1510 * @param array $button_args Array of arguments to be used for the Create a Site button. … … 1517 1516 * Output the Create a Site nav item. 1518 1517 * 1519 * @since BuddyPress (2.2.0)1518 * @since 2.2.0 1520 1519 */ 1521 1520 function bp_blog_create_nav_item() { … … 1526 1525 * Get the Create a Site nav item. 1527 1526 * 1528 * @since BuddyPress (2.2.0)1527 * @since 2.2.0 1529 1528 * 1530 1529 * @return string … … 1548 1547 * if so, transform the title button into a Blogs directory nav item. 1549 1548 * 1550 * @since BuddyPress (2.2.0)1549 * @since 2.2.0 1551 1550 * 1552 1551 * @uses bp_blog_create_nav_item() to output the Create a Site nav item. … … 1618 1617 * Filters the button for visiting a blog in a loop. 1619 1618 * 1620 * @since BuddyPress (1.2.10)1619 * @since 1.2.10 1621 1620 * 1622 1621 * @param array $button Array of arguments to be used for the button to visit a blog. … … 1630 1629 * Display the number of blogs in user's profile. 1631 1630 * 1632 * @since BuddyPress (2.0.0)1631 * @since 2.0.0 1633 1632 * 1634 1633 * @uses bp_blogs_admin_get_profile_stats() to get the stats. … … 1644 1643 * Return the number of blogs in user's profile. 1645 1644 * 1646 * @since BuddyPress (2.0.0)1645 * @since 2.0.0 1647 1646 * 1648 1647 * @param arraystring $args beforeafteruser_id … … 1680 1679 * Filters the number of blogs in user's profile. 1681 1680 * 1682 * @since BuddyPress (2.0.0)1681 * @since 2.0.0 1683 1682 * 1684 1683 * @param string $value Output determined for the profile stats.
Note: See TracChangeset
for help on using the changeset viewer.