Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/13/2015 02:02:56 AM (10 years ago)
Author:
tw2113
Message:

Standardizing our @since tags for the Core component.

See #6576.

File:
1 edited

Legend:

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

    r10046 r10108  
    11<?php
    2 
    32/**
    43 * BuddyPress Common Functions.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    1615 * Output the BuddyPress version.
    1716 *
    18  * @since BuddyPress (1.6.0)
     17 * @since 1.6.0
    1918 *
    2019 * @uses bp_get_version() To get the BuddyPress version.
     
    2625     * Return the BuddyPress version.
    2726     *
    28      * @since BuddyPress (1.6.0)
     27     * @since 1.6.0
    2928     *
    3029     * @return string The BuddyPress version.
     
    3736 * Output the BuddyPress database version.
    3837 *
    39  * @since BuddyPress (1.6.0)
     38 * @since 1.6.0
    4039 *
    4140 * @uses bp_get_db_version() To get the BuddyPress database version.
     
    4746     * Return the BuddyPress database version.
    4847     *
    49      * @since BuddyPress (1.6.0)
     48     * @since 1.6.0
    5049     * @return string The BuddyPress database version.
    5150     */
     
    5756 * Output the BuddyPress database version.
    5857 *
    59  * @since BuddyPress (1.6.0)
     58 * @since 1.6.0
    6059 *
    6160 * @uses bp_get_db_version_raw() To get the current database BuddyPress version.
     
    6766     * Return the BuddyPress database version.
    6867     *
    69      * @since BuddyPress (1.6)
     68     * @since 1.6.0
    7069     *
    7170     * @return string The BuddyPress version direct from the database.
     
    9594     * Intended primarily for use in multinetwork installations.
    9695     *
    97      * @since BuddyPress (1.2.6)
     96     * @since 1.2.6
    9897     *
    9998     * @param string $base_prefix Base prefix to use.
     
    108107 * your own awkward callback function for usort().
    109108 *
    110  * @since BuddyPress (2.2.0)
     109 * @since 2.2.0
    111110 *
    112111 * @param  array      $items The items to be sorted. Its constituent items can be either associative arrays or objects.
     
    157156 *     $sorted_posts = bp_alpha_sort_by_key( $posts, 'post_name' );
    158157 *
    159  * @since BuddyPress (1.9.0)
     158 * @since 1.9.0
    160159 *
    161160 * @param  array      $items The items to be sorted. Its constituent items can be either associative arrays or objects.
     
    185184     * Filters the BuddyPress formatted number.
    186185     *
    187      * @since BuddyPress (1.2.4)
     186     * @since 1.2.4
    188187     *
    189188     * @param string $value    BuddyPress formatted value.
     
    224223 * For the second argument, $func_args, you should just pass the value of func_get_args().
    225224 *
    226  * @since BuddyPress (1.6)
     225 * @since 1.6.0
    227226 *
    228227 * @param array $old_args_keys Old argument indexs, keyed to their positions.
     
    252251 * are applied.
    253252 *
    254  * @since BuddyPress (r7704)
     253 * @since r7704
    255254 *
    256255 * @param string|array $args       Value to merge with $defaults.
     
    279278         * This is a dynamic filter dependent on the specified key.
    280279         *
    281          * @since BuddyPress (2.0.0)
     280         * @since 2.0.0
    282281         *
    283282         * @param array $r Array of arguments to use.
     
    299298         * This is a dynamic filter dependent on the specified key.
    300299         *
    301          * @since BuddyPress (2.0.0)
     300         * @since 2.0.0
    302301         *
    303302         * @param array $r Array of parsed arguments.
     
    315314 * responsible for limiting the resultset of a template loop.
    316315 *
    317  * @since BuddyPress (2.2.0)
     316 * @since 2.2.0
    318317 *
    319318 * @param  string $page_arg The $_REQUEST argument to look for.
     
    346345 * Everything else becomes 'ASC'.
    347346 *
    348  * @since BuddyPress (1.8.0)
     347 * @since 1.8.0
    349348 *
    350349 * @param string $order The 'order' string, as passed to the SQL constructor.
     
    365364 * logic of the replacement, wpdb::esc_like().
    366365 *
    367  * @since BuddyPress (2.1.0)
     366 * @since 2.1.0
    368367 *
    369368 * @see wpdb::esc_like() for more details on proper use.
     
    387386 * Are we running username compatibility mode?
    388387 *
    389  * @since BuddyPress (1.5.0)
     388 * @since 1.5.0
    390389 *
    391390 * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter.
     
    400399     * Filters whether or not to use username compatibility mode.
    401400     *
    402      * @since BuddyPress (1.5.0)
     401     * @since 1.5.0
    403402     *
    404403     * @param bool $value Whether or not username compatibility mode should be used.
     
    413412 * of BP 1.5. For BP 1.6, the WP Toolbar is the default.
    414413 *
    415  * @since BuddyPress (1.5.0)
     414 * @since 1.5.0
    416415 *
    417416 * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter.
     
    436435     * Filters whether or not to use the admin bar.
    437436     *
    438      * @since BuddyPress (1.5.0)
     437     * @since 1.5.0
    439438     *
    440439     * @param bool $use_admin_bar Whether or not to use the admin bar.
     
    448447 * Returns an array of core component IDs.
    449448 *
    450  * @since BuddyPress (2.1.0)
     449 * @since 2.1.0
    451450 *
    452451 * @return array
     
    477476 * Fetch a list of BP directory pages from the appropriate meta table.
    478477 *
    479  * @since BuddyPress (1.5.0)
     478 * @since 1.5.0
    480479 *
    481480 * @param string $status 'active' to return only pages associated with active components, 'all' to return all saved
     
    517516     * Filters the list of BP directory pages from the appropriate meta table.
    518517     *
    519      * @since BuddyPress (1.5.0)
     518     * @since 1.5.0
    520519     *
    521520     * @param array $page_ids Array of directory pages.
     
    531530 * bp_get_root_blog_id() and go through the setup process again.
    532531 *
    533  * @since BuddyPress (1.5.0)
     532 * @since 1.5.0
    534533 *
    535534 * @param array $blog_page_ids The IDs of the WP pages corresponding to BP
     
    543542 * Get names and slugs for BuddyPress component directory pages.
    544543 *
    545  * @since BuddyPress (1.5.0).
     544 * @since 1.5.0
    546545 *
    547546 * @return object Page names, IDs, and slugs.
     
    601600     * Filters the names and slugs for BuddyPress component directory pages.
    602601     *
    603      * @since BuddyPress (1.5.0)
     602     * @since 1.5.0
    604603     *
    605604     * @param object $pages Object holding page names and slugs.
     
    614613 * content (eg, the 'groups' page created by BP).
    615614 *
    616  * @since BuddyPress (1.7.0)
     615 * @since 1.7.0
    617616 *
    618617 * @param array  $components Components to create pages for.
     
    714713 * @link https://buddypress.trac.wordpress.org/ticket/6226
    715714 *
    716  * @since BuddyPress (2.2.0)
     715 * @since 2.2.0
    717716 *
    718717 * @param int $post_id Post ID.
     
    754753 * BP_MEMBERS_SLUG) to override specific component slugs.
    755754 *
    756  * @since BuddyPress (1.5.0)
     755 * @since 1.5.0
    757756 *
    758757 * @param string $root_slug The root slug, which comes from $bp->pages->[component]->slug.
     
    767766     * Filters the default component slug from a WP page root_slug.
    768767     *
    769      * @since BuddyPress (1.5.0)
     768     * @since 1.5.0
    770769     *
    771770     * @param string $slug      Short slug for use in the middle of URLs.
     
    858857 * Determine whether BuddyPress should register the bp-themes directory.
    859858 *
    860  * @since BuddyPress (1.9.0)
     859 * @since 1.9.0
    861860 *
    862861 * @return bool True if bp-themes should be registered, false otherwise.
     
    885884     * Filters whether BuddyPress should register the bp-themes directory.
    886885     *
    887      * @since BuddyPress (1.9.0)
     886     * @since 1.9.0
    888887     *
    889888     * @param bool $register If bp-themes should be registered.
     
    910909     * Filters the domain for the root blog.
    911910     *
    912      * @since BuddyPress (1.0.1)
     911     * @since 1.0.1
    913912     *
    914913     * @param string $domain The domain URL for the blog.
     
    950949 * reduced to '/foo/'.
    951950 *
    952  * @since BuddyPress (2.3.0)
     951 * @since 2.3.0
    953952 *
    954953 * @return bool|string Returns false on error, a URL path on success.
     
    10011000     * Filters the path of the current site.
    10021001     *
    1003      * @since BuddyPress (1.2.0)
     1002     * @since 1.2.0
    10041003     *
    10051004     * @param string $site_path URL to the current site.
     
    10131012 * Get the current GMT time to save into the DB.
    10141013 *
    1015  * @since BuddyPress (1.2.6)
     1014 * @since 1.2.6
    10161015 *
    10171016 * @param bool   $gmt  True to use GMT (rather than local) time. Default: true.
     
    10261025     * Filters the current GMT time to save into the DB.
    10271026     *
    1028      * @since BuddyPress (1.2.6)
     1027     * @since 1.2.6
    10291028     *
    10301029     * @param string $value Current GMT time.
     
    10651064     * Filters whether or not to bypass BuddyPress' time_since calculations.
    10661065     *
    1067      * @since BuddyPress (1.7.0)
     1066     * @since 1.7.0
    10681067     *
    10691068     * @param bool   $value      Whether or not to bypass.
     
    10791078     * Filters the value to use if the time since is unknown.
    10801079     *
    1081      * @since BuddyPress (1.5.0)
     1080     * @since 1.5.0
    10821081     *
    10831082     * @param string $value String representing the time since the older date.
     
    10881087     * Filters the value to use if the time since is right now.
    10891088     *
    1090      * @since BuddyPress (1.5.0)
     1089     * @since 1.5.0
    10911090     *
    10921091     * @param string $value String representing the time since the older date.
     
    10971096     * Filters the value to use if the time since is some time ago.
    10981097     *
    1099      * @since BuddyPress (1.5.0)
     1098     * @since 1.5.0
    11001099     *
    11011100     * @param string $value String representing the time since the older date.
     
    12341233     * Filters the English-language representation of the time elapsed since a given date.
    12351234     *
    1236      * @since BuddyPress (1.7.0)
     1235     * @since 1.7.0
    12371236     *
    12381237     * @param string $output     Final 'time since' string.
     
    13281327         * Filters the 'template_notices' feedback message content.
    13291328         *
    1330          * @since BuddyPress (1.5.5)
     1329         * @since 1.5.5
    13311330         *
    13321331         * @param string $template_message Feedback message content.
     
    13471346         * Fires after the display of any template_notices feedback messages.
    13481347         *
    1349          * @since BuddyPress (1.1.0)
     1348         * @since 1.1.0
    13501349         */
    13511350        do_action( 'bp_core_render_message' );
     
    14031402         * Use this action to detect the very first activity for a given member.
    14041403         *
    1405          * @since BuddyPress (1.6.0)
     1404         * @since 1.6.0
    14061405         *
    14071406         * @param int $user_id ID of the user whose activity is recorded.
     
    14431442     * Filters last activity string based on time since date given.
    14441443     *
    1445      * @since BuddyPress (1.2.0)
     1444     * @since 1.2.0
    14461445     *
    14471446     * @param string $last_active        Last activity string based on time since date given.
     
    14701469 * If using the WP functions, do not not hardcode your meta keys.
    14711470 *
    1472  * @since BuddyPress (1.5.0)
     1471 * @since 1.5.0
    14731472 *
    14741473 * @uses apply_filters() Filter 'bp_get_user_meta_key' to modify keys individually.
     
    14831482     * Filters the meta_key for a given piece of user metadata.
    14841483     *
    1485      * @since BuddyPress (1.5.0)
     1484     * @since 1.5.0
    14861485     *
    14871486     * @param string $key The usermeta meta key.
     
    14971496 * BP setups.
    14981497 *
    1499  * @since BuddyPress (1.5.0)
     1498 * @since 1.5.0
    15001499 *
    15011500 * @see get_user_meta() For complete details about parameters and return values.
     
    15201519 * BP setups.
    15211520 *
    1522  * @since BuddyPress (1.5.0)
     1521 * @since 1.5.0
    15231522 *
    15241523 * @see update_user_meta() For complete details about parameters and return values.
     
    15431542 * BP setups.
    15441543 *
    1545  * @since BuddyPress (1.5.0)
     1544 * @since 1.5.0
    15461545 *
    15471546 * @see delete_user_meta() For complete details about parameters and return values.
     
    15631562 * Initializes {@link BP_Embed} after everything is loaded.
    15641563 *
    1565  * @since BuddyPress (1.5.0)
     1564 * @since 1.5.0
    15661565 */
    15671566function bp_embed_init() {
     
    15791578 * Are oembeds allowed in activity items?
    15801579 *
    1581  * @since BuddyPress (1.5.0)
     1580 * @since 1.5.0
    15821581 *
    15831582 * @return bool False when activity embed support is disabled; true when
     
    15891588     * Filters whether or not oEmbeds are allowed in activity items.
    15901589     *
    1591      * @since BuddyPress (1.5.0)
     1590     * @since 1.5.0
    15921591     *
    15931592     * @param bool $value Whether or not oEmbeds are allowed.
     
    15991598 * Are oembeds allowed in activity replies?
    16001599 *
    1601  * @since BuddyPress (1.5.0)
     1600 * @since 1.5.0
    16021601 *
    16031602 * @return bool False when activity replies embed support is disabled; true
     
    16091608     * Filters whether or not oEmbeds are allowed in activity replies.
    16101609     *
    1611      * @since BuddyPress (1.5.0)
     1610     * @since 1.5.0
    16121611     *
    16131612     * @param bool $value Whether or not oEmbeds are allowed.
     
    16191618 * Are oembeds allowed in forum posts?
    16201619 *
    1621  * @since BuddyPress (1.5.0)
     1620 * @since 1.5.0
    16221621 *
    16231622 * @return bool False when forum post embed support is disabled; true when
     
    16291628     * Filters whether or not oEmbeds are allowed in forum posts.
    16301629     *
    1631      * @since BuddyPress (1.5.0)
     1630     * @since 1.5.0
    16321631     *
    16331632     * @param bool $value Whether or not oEmbeds are allowed.
     
    16391638 * Are oembeds allowed in private messages?
    16401639 *
    1641  * @since BuddyPress (1.5.0)
     1640 * @since 1.5.0
    16421641 *
    16431642 * @return bool False when private message embed support is disabled; true when
     
    16491648     * Filters whether or not oEmbeds are allowed in private messages.
    16501649     *
    1651      * @since BuddyPress (1.5.0)
     1650     * @since 1.5.0
    16521651     *
    16531652     * @param bool $value Whether or not oEmbeds are allowed.
     
    16611660 * Output the correct admin URL based on BuddyPress and WordPress configuration.
    16621661 *
    1663  * @since BuddyPress (1.5.0)
     1662 * @since 1.5.0
    16641663 *
    16651664 * @see bp_get_admin_url() For description of parameters.
     
    16741673     * Return the correct admin URL based on BuddyPress and WordPress configuration.
    16751674     *
    1676      * @since BuddyPress (1.5.0)
     1675     * @since 1.5.0
    16771676     *
    16781677     * @uses bp_core_do_network_admin()
     
    17091708 * to hook into certain areas of WordPress's admin.
    17101709 *
    1711  * @since BuddyPress (1.5.0)
     1710 * @since 1.5.0
    17121711 *
    17131712 * @uses bp_is_network_activated()
     
    17291728     * Filters whether or not BuddyPress should appear in network admin.
    17301729     *
    1731      * @since BuddyPress (1.5.0)
     1730     * @since 1.5.0
    17321731     *
    17331732     * @param bool $retval Whether or not BuddyPress should be in the network admin.
     
    17541753     * Filters the action name that BuddyPress nav setup callbacks should be hooked to.
    17551754     *
    1756      * @since BuddyPress (1.5.0)
     1755     * @since 1.5.0
    17571756     *
    17581757     * @param string $hook Action name to be attached to.
     
    17661765 * Is this the root blog?
    17671766 *
    1768  * @since BuddyPress (1.5.0)
     1767 * @since 1.5.0
    17691768 *
    17701769 * @param int $blog_id Optional. Default: the ID of the current blog.
     
    17901789     * Filters whether or not we're on the root blog.
    17911790     *
    1792      * @since BuddyPress (1.5.0)
     1791     * @since 1.5.0
    17931792     *
    17941793     * @param bool $is_root_blog Whether or not we're on the root blog.
     
    18041803 * etc.).
    18051804 *
    1806  * @since BuddyPress (1.5.0)
     1805 * @since 1.5.0
    18071806 *
    18081807 * @return int The root site ID.
     
    18131812     * Filters the ID for the root blog.
    18141813     *
    1815      * @since BuddyPress (1.5.0)
     1814     * @since 1.5.0
    18161815     *
    18171816     * @param int $root_blog_id ID for the root blog.
     
    18431842 * down this road unless you specifically need to.
    18441843 *
    1845  * @since BuddyPress (1.5.0)
     1844 * @since 1.5.0
    18461845 *
    18471846 * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter.
     
    18701869     * Filters whether or not we're running in multiblog mode.
    18711870     *
    1872      * @since BuddyPress (1.5.0)
     1871     * @since 1.5.0
    18731872     *
    18741873     * @param bool $retval Whether or not we're running multiblog mode.
     
    18851884 * 'bp_is_network_activated' and override the auto-determined value.
    18861885 *
    1887  * @since BuddyPress (1.7.0)
     1886 * @since 1.7.0
    18881887 *
    18891888 * @return bool True if BuddyPress is network activated.
     
    19061905     * Filters whether or not we're active at the network level.
    19071906     *
    1908      * @since BuddyPress (1.7.0)
     1907     * @since 1.7.0
    19091908     *
    19101909     * @param bool $retval Whether or not we're network activated.
     
    19311930     * Filters the "is_directory" global value.
    19321931     *
    1933      * @since BuddyPress (1.5.0)
     1932     * @since 1.5.0
    19341933     *
    19351934     * @param bool   $is_directory Whether or not we're "is_directory".
     
    19551954     * Filters the "is_item_admin" global value.
    19561955     *
    1957      * @since BuddyPress (1.5.0)
     1956     * @since 1.5.0
    19581957     *
    19591958     * @param bool   $is_item_admin Whether or not we're "is_item_admin".
     
    19791978     * Filters the "is_item_mod" global value.
    19801979     *
    1981      * @since BuddyPress (1.5.0)
     1980     * @since 1.5.0
    19821981     *
    19831982     * @param bool   $is_item_mod Whether or not we're "is_item_mod".
     
    19901989 * Trigger a 404.
    19911990 *
    1992  * @since BuddyPress (1.5.0)
     1991 * @since 1.5.0
    19931992 *
    19941993 * @global WP_Query $wp_query WordPress query object.
     
    20032002     * Fires inside the triggering of a 404.
    20042003     *
    2005      * @since BuddyPress (1.5.0)
     2004     * @since 1.5.0
    20062005     *
    20072006     * @param string $redirect Redirect type used to determine if redirect_canonical
     
    20262025 * To avoid security exploits within the theme.
    20272026 *
    2028  * @since BuddyPress (1.6.0)
     2027 * @since 1.6.0
    20292028 *
    20302029 * @uses do_action() Calls 'bp_verify_nonce_request' on $action.
     
    20732072     * Useful for configurations like reverse proxying.
    20742073     *
    2075      * @since BuddyPress (1.9.0)
     2074     * @since 1.9.0
    20762075     *
    20772076     * @param string $requested_url The requested URL.
     
    20902089     * Fires at the end of the nonce verification check.
    20912090     *
    2092      * @since BuddyPress (1.6.0)
     2091     * @since 1.6.0
    20932092     *
    20942093     * @param string $action Action nonce.
     
    21052104 * Return true|false if this is a POST request.
    21062105 *
    2107  * @since BuddyPress (1.9.0)
     2106 * @since 1.9.0
    21082107 * @return bool
    21092108 */
     
    21152114 * Return true|false if this is a GET request.
    21162115 *
    2117  * @since BuddyPress (1.9.0)
     2116 * @since 1.9.0
    21182117 * @return bool
    21192118 */
     
    21382137     * Filters the locale to be loaded for the language files.
    21392138     *
    2140      * @since BuddyPress (1.0.2)
     2139     * @since 1.0.2
    21412140     *
    21422141     * @param string $value Current locale for the install.
     
    21472146     * Filters the locations to load language files from.
    21482147     *
    2149      * @since BuddyPress (2.2.0)
     2148     * @since 2.2.0
    21502149     *
    21512150     * @param array $value Array of directories to check for language files in.
     
    22332232     * Filters the constructed url for use with site searching.
    22342233     *
    2235      * @since BuddyPress (1.0.0)
     2234     * @since 1.0.0
    22362235     *
    22372236     * @param string $value        URL for use with site searching.
     
    22622261 * prevents additional, unnecessary queries from running.
    22632262 *
    2264  * @since BuddyPress (2.1.0)
     2263 * @since 2.1.0
    22652264 */
    22662265function bp_remove_adjacent_posts_rel_link() {
     
    22892288 * logged-in user.
    22902289 *
    2291  * @since BuddyPress (1.9.0)
     2290 * @since 1.9.0
    22922291 *
    22932292 * @return mixed A URL or an array of dummy pages.
     
    23592358 * menu.
    23602359 *
    2361  * @since BuddyPress (1.9.0)
     2360 * @since 1.9.0
    23622361 *
    23632362 * @return mixed A URL or an array of dummy pages.
     
    24302429 * proper URL for a given nav item slug (such as 'login' or 'messages').
    24312430 *
    2432  * @since BuddyPress (1.9.0)
     2431 * @since 1.9.0
    24332432 *
    24342433 * @param string $slug The slug of the nav item: login, register, or one of the
     
    24562455 * for similar kinds of future requirements, or those implemented by third-party developers.
    24572456 *
    2458  * @since BuddyPress (2.1.0)
     2457 * @since 2.1.0
    24592458 *
    24602459 * @param array $args
     
    24862485         * if you've built a custom suggestions service.
    24872486         *
    2488          * @since BuddyPress (2.1.0)
     2487         * @since 2.1.0
    24892488         *
    24902489         * @param string $value Custom class to use. Default: none.
     
    25112510     * Filters the available type of at-mentions.
    25122511     *
    2513      * @since BuddyPress (2.1.0)
     2512     * @since 2.1.0
    25142513     *
    25152514     * @param array|WP_Error $retval Array of results or WP_Error object.
     
    25282527 * once to get what we need.
    25292528 *
    2530  * @since BuddyPress (2.3.0)
     2529 * @since 2.3.0
    25312530 *
    25322531 * @uses  is_multisite()
Note: See TracChangeset for help on using the changeset viewer.