Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2016 05:01:13 AM (8 years ago)
Author:
tw2113
Message:

Adds many missing @since tags to the BP Core component.

See #6398.

File:
1 edited

Legend:

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

    r10487 r10497  
    2424 * The function will also analyze the current action for the current component
    2525 * to determine whether or not to highlight a particular sub nav item.
     26 *
     27 * @since 1.0.0
    2628 *
    2729 * @uses bp_get_user_nav() Renders the navigation for a profile of a currently
     
    209211/**
    210212 * Output the current avatar upload step.
     213 *
     214 * @since 1.1.0
    211215 */
    212216function bp_avatar_admin_step() {
     
    215219    /**
    216220     * Return the current avatar upload step.
     221     *
     222     * @since 1.1.0
    217223     *
    218224     * @return string The current avatar upload step. Returns 'upload-image'
     
    237243/**
    238244 * Output the URL of the avatar to crop.
     245 *
     246 * @since 1.1.0
    239247 */
    240248function bp_avatar_to_crop() {
     
    243251    /**
    244252     * Return the URL of the avatar to crop.
     253     *
     254     * @since 1.1.0
    245255     *
    246256     * @return string URL of the avatar awaiting cropping.
     
    264274/**
    265275 * Output the relative file path to the avatar to crop.
     276 *
     277 * @since 1.1.0
    266278 */
    267279function bp_avatar_to_crop_src() {
     
    270282    /**
    271283     * Return the relative file path to the avatar to crop.
     284     *
     285     * @since 1.1.0
    272286     *
    273287     * @return string Relative file path to the avatar.
     
    304318/**
    305319 * Output the name of the BP site. Used in RSS headers.
     320 *
     321 * @since 1.0.0
    306322 */
    307323function bp_site_name() {
     
    416432 * do the necessary argument swapping for dynamic phrases.
    417433 *
     434 * @since 1.0.0
     435 *
    418436 * @param string $youtext    The "you" version of the phrase (eg "Your Friends").
    419437 * @param string $nametext   The other-user version of the phrase. Should be in
     
    479497/**
    480498 * Return the "action" attribute for search forms.
     499 *
     500 * @since 1.0.0
    481501 *
    482502 * @return string URL action attribute for search forms, eg example.com/search/.
     
    707727 * Create and output a button.
    708728 *
     729 * @since 1.2.6
     730 *
    709731 * @see bp_get_button()
    710732 *
     
    716738    /**
    717739     * Create and return a button.
     740     *
     741     * @since 1.2.6
    718742     *
    719743     * @see BP_Button for a description of arguments and return value.
     
    752776 * - `html` If true, HTML tags would be handled correctly.
    753777 * - `filter_shortcodes` If true, shortcodes will be stripped before truncating.
     778 *
     779 * @since 1.0.0
    754780 *
    755781 * @param string $text   String to truncate.
     
    963989/**
    964990 * Output the total member count for the site.
     991 *
     992 * @since 1.2.0
    965993 */
    966994function bp_total_member_count() {
     
    9781006     * which did not take into account last_activity, and thus often
    9791007     * resulted in higher counts than shown by member directory pagination.
     1008     *
     1009     * @since 1.2.0
    9801010     *
    9811011     * @return int Member count.
     
    10081038     * Network Admin > Settings.
    10091039     *
     1040     * @since 1.2.0
     1041     *
    10101042     * @return bool True if blog signup is allowed, otherwise false.
    10111043     */
     
    10261058/**
    10271059 * Check whether an activation has just been completed.
     1060 *
     1061 * @since 1.1.0
    10281062 *
    10291063 * @return bool True if the activation_complete global flag has been set,
     
    10451079 * activation. This filter exists so that customizations that omit activation
    10461080 * can remove certain notification text from the registration screen.
     1081 *
     1082 * @since 1.2.0
    10471083 *
    10481084 * @return bool True by default.
     
    11161152 * WordPress theme without coping the functions from functions.php.
    11171153 *
     1154 * @since 1.2.0
     1155 *
    11181156 * @param string|bool $object Current template component.
    11191157 * @return string The AJAX querystring.
     
    11431181/**
    11441182 * Return the name of the current component.
     1183 *
     1184 * @since 1.0.0
    11451185 *
    11461186 * @return string Component name.
     
    11651205 * Return the name of the current action.
    11661206 *
     1207 * @since 1.0.0
     1208 *
    11671209 * @return string Action name.
    11681210 */
     
    11861228 * Return the name of the current item.
    11871229 *
     1230 * @since 1.1.0
     1231 *
    11881232 * @return string|bool
    11891233 */
     
    12071251 * Return the value of $bp->action_variables.
    12081252 *
     1253 * @since 1.0.0
     1254 *
    12091255 * @return array|bool $action_variables The action variables array, or false
    12101256 *                                      if the array is empty.
     
    12541300/**
    12551301 * Output the "root domain", the URL of the BP root blog.
     1302 *
     1303 * @since 1.1.0
    12561304 */
    12571305function bp_root_domain() {
     
    12601308    /**
    12611309     * Return the "root domain", the URL of the BP root blog.
     1310     *
     1311     * @since 1.1.0
    12621312     *
    12631313     * @return string URL of the BP root blog.
     
    13941444}
    13951445
     1446/**
     1447 * Returns whether or not a user has access.
     1448 *
     1449 * @since 1.2.4
     1450 *
     1451 * @return bool
     1452 */
    13961453function bp_user_has_access() {
    13971454    $has_access = bp_current_user_can( 'bp_moderate' ) || bp_is_my_profile();
     
    14391496 * Get the ID of the currently displayed user.
    14401497 *
     1498 * @since 1.0.0
     1499 *
    14411500 * @uses apply_filters() Filter 'bp_displayed_user_id' to change this value.
    14421501 *
     
    14611520/**
    14621521 * Get the ID of the currently logged-in user.
     1522 *
     1523 * @since 1.0.0
    14631524 *
    14641525 * @uses apply_filters() Filter 'bp_loggedin_user_id' to change this value.
     
    16421703 * Check against the current_item.
    16431704 *
     1705 * @since 1.5.0
     1706 *
    16441707 * @param string $item The item being checked.
    16451708 * @return bool True if $item is the current item.
     
    16611724/**
    16621725 * Are we looking at a single item? (group, user, etc).
     1726 *
     1727 * @since 1.1.0
    16631728 *
    16641729 * @return bool True if looking at a single item, otherwise false.
     
    16851750 * Is the logged-in user an admin for the current item?
    16861751 *
     1752 * @since 1.5.0
     1753 *
    16871754 * @return bool True if the current user is an admin for the current item,
    16881755 *              otherwise false.
     
    17091776 * Is the logged-in user a mod for the current item?
    17101777 *
     1778 * @since 1.5.0
     1779 *
    17111780 * @return bool True if the current user is a mod for the current item,
    17121781 *              otherwise false.
     
    17331802 * Is this a component directory page?
    17341803 *
     1804 * @since 1.0.0
     1805 *
    17351806 * @return bool True if the current page is a component directory, otherwise false.
    17361807 */
     
    17611832 * This function is on the chopping block. It's currently only used by a few
    17621833 * already deprecated functions.
     1834 *
     1835 * @since 1.5.0
    17631836 *
    17641837 * @param string $component_name Component name to check.
     
    18481921 * You can tell if a page is displaying BP content by whether the
    18491922 * current_component has been defined.
     1923 *
     1924 * @since 1.0.0
    18501925 *
    18511926 * @return bool True if it's a non-BP page, false otherwise.
     
    19622037 * Check whether the current page is part of the Members component.
    19632038 *
     2039 * @since 1.5.0
     2040 *
    19642041 * @return bool True if the current page is part of the Members component.
    19652042 */
     
    19712048 * Check whether the current page is part of the Profile component.
    19722049 *
     2050 * @since 1.1.0
     2051 *
    19732052 * @return bool True if the current page is part of the Profile component.
    19742053 */
     
    19802059 * Check whether the current page is part of the Activity component.
    19812060 *
     2061 * @since 1.1.0
     2062 *
    19822063 * @return bool True if the current page is part of the Activity component.
    19832064 */
     
    19892070 * Check whether the current page is part of the Blogs component.
    19902071 *
     2072 * @since 1.1.0
     2073 *
    19912074 * @return bool True if the current page is part of the Blogs component.
    19922075 */
     
    19982081 * Check whether the current page is part of the Messages component.
    19992082 *
     2083 * @since 1.1.0
     2084 *
    20002085 * @return bool True if the current page is part of the Messages component.
    20012086 */
     
    20072092 * Check whether the current page is part of the Friends component.
    20082093 *
     2094 * @since 1.1.0
     2095 *
    20092096 * @return bool True if the current page is part of the Friends component.
    20102097 */
     
    20162103 * Check whether the current page is part of the Groups component.
    20172104 *
     2105 * @since 1.1.0
     2106 *
    20182107 * @return bool True if the current page is part of the Groups component.
    20192108 */
     
    20252114 * Check whether the current page is part of the Forums component.
    20262115 *
     2116 * @since 1.5.0
     2117 *
    20272118 * @return bool True if the current page is part of the Forums component.
    20282119 */
     
    20442135/**
    20452136 * Check whether the current page is part of the Settings component.
     2137 *
     2138 * @since 1.1.0
    20462139 *
    20472140 * @return bool True if the current page is part of the Settings component.
     
    20602153 * BuddyPress core, it will return true.
    20612154 *
     2155 * @since 1.7.0
     2156 *
    20622157 * @return bool True if the current component is active and is one of BP's
    20632158 *              packaged components.
     
    20962191 * Is the current page a single activity item permalink?
    20972192 *
     2193 * @since 1.5.0
     2194 *
    20982195 * @return bool True if the current page is a single activity item permalink.
    20992196 */
     
    21242221 * Will return true for any subpage of the logged-in user's profile, eg
    21252222 * http://example.com/members/joe/friends/.
     2223 *
     2224 * @since 1.2.0
    21262225 *
    21272226 * @return bool True if the current page is part of the profile of the logged-in user.
     
    21492248 * Will return true anytime there is a displayed user.
    21502249 *
     2250 * @since 1.5.0
     2251 *
    21512252 * @return bool True if the current page is a user page.
    21522253 */
     
    21602261 * Eg http://example.com/members/joe/activity/ (or any subpages thereof).
    21612262 *
     2263 * @since 1.1.0
     2264 *
    21622265 * @return bool True if the current page is a user's activity stream page.
    21632266 */
     
    21712274 * Eg http://example.com/members/joe/friends/
    21722275 *
     2276 * @since 1.1.0
     2277 *
    21732278 * @return bool True if the current page is a user's Friends activity stream.
    21742279 */
     
    21962301 *
    21972302 * Eg http://example.com/members/joe/groups/
     2303 *
     2304 * @since 1.5.0
    21982305 *
    21992306 * @return bool True if the current page is a user's Groups activity stream.
     
    22212328 * Eg http://example.com/members/joe/profile/ (or a subpage thereof).
    22222329 *
     2330 * @since 1.1.0
     2331 *
    22232332 * @return bool True if the current page is part of a user's extended profile.
    22242333 */
     
    22322341 * Eg http://example.com/members/joe/profile/edit/ (or a subpage thereof).
    22332342 *
     2343 * @since 1.5.0
     2344 *
    22342345 * @return bool True if the current page is a user's profile edit page.
    22352346 */
     
    22382349}
    22392350
     2351/**
     2352 * Is the current page part of a user's profile avatar editing section?
     2353 *
     2354 * Eg http://example.com/members/joe/profile/change-avatar/ (or a subpage thereof).
     2355 *
     2356 * @since 1.5.0
     2357 *
     2358 * @return bool True if the current page is the user's avatar edit page.
     2359 */
    22402360function bp_is_user_change_avatar() {
    22412361    return (bool) ( bp_is_profile_component() && bp_is_current_action( 'change-avatar' ) );
     
    22602380 * Eg http://example.com/members/joe/forums/ (or a subpage thereof).
    22612381 *
     2382 * @since 1.5.0
     2383 *
    22622384 * @return bool True if the current page is a user's forums page.
    22632385 */
     
    23062428 * Eg http://example.com/members/joe/groups/ (or a subpage thereof).
    23072429 *
     2430 * @since 1.1.0
     2431 *
    23082432 * @return bool True if the current page is a user's Groups page.
    23092433 */
     
    23172441 * Eg http://example.com/members/joe/blogs/ (or a subpage thereof).
    23182442 *
     2443 * @since 1.1.0
     2444 *
    23192445 * @return bool True if the current page is a user's Blogs page.
    23202446 */
     
    23282454 * Eg http://example.com/members/joe/blogs/recent-posts/.
    23292455 *
     2456 * @since 1.1.0
     2457 *
    23302458 * @return bool True if the current page is a user's Recent Blog Posts page.
    23312459 */
     
    23392467 * Eg http://example.com/members/joe/blogs/recent-comments/.
    23402468 *
     2469 * @since 1.1.0
     2470 *
    23412471 * @return bool True if the current page is a user's Recent Blog Comments page.
    23422472 */
     
    23502480 * Eg http://example.com/members/joe/blogs/friends/ (or a subpage thereof).
    23512481 *
     2482 * @since 1.1.0
     2483 *
    23522484 * @return bool True if the current page is a user's Friends page.
    23532485 */
     
    23612493 * Eg http://example.com/members/joe/friends/requests/.
    23622494 *
     2495 * @since 1.5.0
     2496 *
    23632497 * @return bool True if the current page is a user's Friends Requests page.
    23642498 */
     
    23842518 *
    23852519 * Eg http://example.com/members/joe/settings/ (or a subpage thereof).
     2520 *
     2521 * @since 1.5.0
    23862522 *
    23872523 * @return bool True if the current page is a user's Settings page.
     
    24652601 * Will return true for any subpage of a single group.
    24662602 *
     2603 * @since 1.2.0
     2604 *
    24672605 * @return bool True if the current page is part of a single group.
    24682606 */
     
    24822620 * URL will vary depending on which group tab is set to be the "home". By
    24832621 * default, it's the group's recent activity.
     2622 *
     2623 * @since 1.1.0
    24842624 *
    24852625 * @return bool True if the current page is a single group's home page.
     
    24962636 * Is the current page part of the group creation process?
    24972637 *
     2638 * @since 1.1.0
     2639 *
    24982640 * @return bool True if the current page is part of the group creation process.
    24992641 */
     
    25072649 * Eg http://example.com/groups/mygroup/admin/settings/.
    25082650 *
     2651 * @since 1.1.0
     2652 *
    25092653 * @return bool True if the current page is part of a single group's admin.
    25102654 */
     
    25172661 *
    25182662 * Only applies to legacy bbPress forums.
     2663 *
     2664 * @since 1.1.0
    25192665 *
    25202666 * @return bool True if the current page is a group forum page.
     
    25402686 * Is the current page a group's activity page?
    25412687 *
     2688 * @since 1.2.1
     2689 *
    25422690 * @return True if the current page is a group's activity page.
    25432691 */
     
    25612709 * Only applies to legacy bbPress (1.x) forums.
    25622710 *
     2711 * @since 1.1.0
     2712 *
    25632713 * @return bool True if the current page is part of a group forum topic.
    25642714 */
     
    25722722 * Only applies to legacy bbPress (1.x) forums.
    25732723 *
     2724 * @since 1.2.0
     2725 *
    25742726 * @return bool True if the current page is part of a group forum topic edit page.
    25752727 */
     
    25832735 * Eg http://example.com/groups/mygroup/members/.
    25842736 *
     2737 * @since 1.1.0
     2738 *
    25852739 * @return bool True if the current page is part of a group's Members page.
    25862740 */
     
    26042758 * Eg http://example.com/groups/mygroup/send-invites/.
    26052759 *
     2760 * @since 1.1.0
     2761 *
    26062762 * @return bool True if the current page is a group's Send Invites page.
    26072763 */
     
    26152771 * Eg http://example.com/groups/mygroup/request-membership/.
    26162772 *
     2773 * @since 1.2.0
     2774 *
    26172775 * @return bool True if the current page is a group's Request Membership page.
    26182776 */
     
    26232781/**
    26242782 * Is the current page a leave group attempt?
     2783 *
     2784 * @since 1.1.0
    26252785 *
    26262786 * @return bool True if the current page is a Leave Group attempt.
     
    26602820 * Eg http://example.com/sites/create/.
    26612821 *
     2822 * @since 1.1.0
     2823 *
    26622824 * @return bool True if the current page is the Create a Blog page.
    26632825 */
     
    26882850 * Eg http://example.com/members/joe/messages/ (or a subpage thereof).
    26892851 *
     2852 * @since 1.2.0
     2853 *
    26902854 * @return bool True if the current page is part of a user's Messages pages.
    26912855 */
     
    26982862 *
    26992863 * Eg http://example.com/members/joe/messages/inbox/.
     2864 *
     2865 * @since 1.1.0
    27002866 *
    27012867 * @return bool True if the current page is a user's Messages Inbox.
     
    27142880 * Eg http://example.com/members/joe/messages/sentbox/.
    27152881 *
     2882 * @since 1.1.0
     2883 *
    27162884 * @return bool True if the current page is a user's Messages Sentbox.
    27172885 */
     
    27252893 * Eg http://example.com/members/joe/messages/compose/.
    27262894 *
     2895 * @since 1.1.0
     2896 *
    27272897 * @return bool True if the current page is a user's Messages Compose screen.
    27282898 */
     
    27362906 * Eg http://example.com/members/joe/messages/notices/.
    27372907 *
     2908 * @since 1.1.0
     2909 *
    27382910 * @return bool True if the current page is the Notices screen.
    27392911 */
     
    27442916/**
    27452917 * Is the current page a single Messages conversation thread?
     2918 *
     2919 * @since 1.6.0
    27462920 *
    27472921 * @return bool True if the current page a single Messages conversation thread?
     
    27692943 * Eg http://example.com/activate/.
    27702944 *
     2945 * @since 1.1.0
     2946 *
    27712947 * @return bool True if the current page is the Activate page.
    27722948 */
     
    27802956 * Eg http://example.com/register/.
    27812957 *
     2958 * @since 1.1.0
     2959 *
    27822960 * @return bool True if the current page is the Register page.
    27832961 */
     
    27912969 * @since 2.4.3
    27922970 *
    2793  * @param string $seplocation
     2971 * @param string $seplocation Location for the separator.
    27942972 * @return array the title parts
    27952973 */
     
    27972975    $bp = buddypress();
    27982976
    2799     // Defaults to an empty array
     2977    // Defaults to an empty array.
    28002978    $bp_title_parts = array();
    28012979
     
    29263104/**
    29273105 * Customize the body class, according to the currently displayed BP content.
     3106 *
     3107 * @since 1.1.0
    29283108 */
    29293109function bp_the_body_class() {
     
    29343114     *
    29353115     * Uses the above is_() functions to output a body class for each scenario.
     3116     *
     3117     * @since 1.1.0
    29363118     *
    29373119     * @param array      $wp_classes     The body classes coming from WP.
Note: See TracChangeset for help on using the changeset viewer.