Skip to:
Content

BuddyPress.org

Changeset 10899


Ignore:
Timestamp:
06/23/2016 06:31:58 AM (8 years ago)
Author:
tw2113
Message:

Many PHPDocs cleanup for Core component.

See #6398.

Location:
trunk/src/bp-core
Files:
22 edited

Legend:

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

    r10707 r10899  
    964964     * add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_filter', 10, 1 );
    965965     *
    966      * @since  2.4.0
     966     * @since 2.4.0
    967967     *
    968968     * @param array $settings The cover image settings
     
    991991
    992992/**
    993  * Get cover image Width and Height
     993 * Get cover image Width and Height.
    994994 *
    995995 * @since 2.4.0
  • trunk/src/bp-core/bp-core-avatars.php

    r10825 r10899  
    649649         *
    650650         * @param string $default_grav The avatar default.
    651          * @param array $params The avatar's data.
     651         * @param array  $params      The avatar's data.
    652652         */
    653653        $default_grav = apply_filters( 'bp_core_avatar_default', $default_grav, $params );
     
    727727     * @since 2.5.1
    728728     *
    729      * @param bool $value Whether or not to delete the avatar.
     729     * @param bool  $value Whether or not to delete the avatar.
    730730     * @param array $args {
    731731     *     Array of function parameters.
     
    806806 * @since 2.3.0
    807807 *
    808  * @return string|null A json object containing success data if the avatar was deleted
     808 * @return string|null A JSON object containing success data if the avatar was deleted,
    809809 *                     error message otherwise.
    810810 */
     
    949949 * @since 2.3.0
    950950 *
    951  * @return  string|null A json object containing success data if the upload succeeded
    952  *                      error message otherwise.
     951 * @return string|null A JSON object containing success data if the upload succeeded
     952 *                     error message otherwise.
    953953 */
    954954function bp_avatar_ajax_upload() {
     
    960960    /**
    961961     * Sending the json response will be different if
    962      * the current Plupload runtime is html4
     962     * the current Plupload runtime is html4.
    963963     */
    964964    $is_html4 = false;
     
    11711171/**
    11721172 * Crop an uploaded avatar.
    1173  *
    1174  * $args has the following parameters:
    1175  *  object - What component the avatar is for, e.g. "user"
    1176  *  avatar_dir  The absolute path to the avatar
    1177  *  item_id - Item ID
    1178  *  original_file - The absolute path to the original avatar file
    1179  *  crop_w - Crop width
    1180  *  crop_h - Crop height
    1181  *  crop_x - The horizontal starting point of the crop
    1182  *  crop_y - The vertical starting point of the crop
    11831173 *
    11841174 * @since 1.1.0
     
    12471237 * @since 2.3.0
    12481238 *
    1249  * @return  string|null A json object containing success data if the crop/capture succeeded
    1250  *                      error message otherwise.
     1239 * @return string|null A JSON object containing success data if the crop/capture succeeded
     1240 *                     error message otherwise.
    12511241 */
    12521242function bp_avatar_ajax_set() {
     
    15121502 *
    15131503 * @since 2.3.0
     1504 *
     1505 * @return array
    15141506 */
    15151507function bp_core_get_allowed_avatar_types() {
     
    15381530 *
    15391531 * @since 2.3.0
     1532 *
     1533 * @return array
    15401534 */
    15411535function bp_core_get_allowed_avatar_mimes() {
     
    19441938 * notices, we need to make sure this 'week' query var is reset to 0.
    19451939 *
    1946  * @since  2.2.0
     1940 * @since 2.2.0
    19471941 *
    19481942 * @param WP_Query|null $posts_query The main query object.
     
    19781972 * Checks whether Avatar UI should be loaded.
    19791973 *
    1980  * @since  2.3.0
     1974 * @since 2.3.0
    19811975 *
    19821976 * @return bool True if Avatar UI should load, false otherwise.
     
    20102004     * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false())
    20112005     *
    2012      * @since  2.3.0
     2006     * @since 2.3.0
    20132007     *
    20142008     * @param bool $retval Whether or not to load the Avatar UI.
     
    20202014 * Checks whether the Webcam Avatar UI part should be loaded.
    20212015 *
    2022  * @since  2.3.0
     2016 * @since 2.3.0
    20232017 *
    20242018 * @global $is_safari
     
    20412035     * Bail when the browser does not support getUserMedia.
    20422036     *
    2043      * @see  http://caniuse.com/#feat=stream
     2037     * @see http://caniuse.com/#feat=stream
    20442038     */
    20452039    if ( $is_safari || $is_IE || ( $is_chrome && ! is_ssl() ) ) {
     
    20612055 * Template function to load the Avatar UI javascript templates.
    20622056 *
    2063  * @since  2.3.0
     2057 * @since 2.3.0
    20642058 */
    20652059function bp_avatar_get_templates() {
     
    20772071 * help users to get the avatar UI.
    20782072 *
    2079  * @since  2.3.0
     2073 * @since 2.3.0
    20802074 */
    20812075function bp_avatar_template_check() {
  • trunk/src/bp-core/bp-core-buddybar.php

    r10876 r10899  
    3434 *                                                item is clicked.
    3535 * }
    36  * @param string $component The component the navigation is attached to. Defaults to 'members'.
     36 * @param string       $component The component the navigation is attached to. Defaults to 'members'.
    3737 * @return bool|null Returns false on failure.
    3838 */
     
    108108 *                                                item is clicked.
    109109 * }
    110  * @param string $component Optional. Component that the nav belongs to.
     110 * @param string       $component Optional. Component that the nav belongs to.
    111111 * @return bool|BP_Nav_Item Returns false on failure, new nav item on success.
    112112 */
     
    322322    }
    323323
    324     // Edit the screen function for the parent nav
     324    // Edit the screen function for the parent nav.
    325325    $bp->members->nav->edit_nav( array(
    326326        'screen_function'     => &$r['screen_function'],
     
    395395 *                                          Admin Bar menu for group admins. Default: false.
    396396 * }
    397  * @param string $component The component the navigation is attached to. Defaults to 'members'.
     397 * @param string       $component The component the navigation is attached to. Defaults to 'members'.
    398398 * @return bool|null Returns false on failure.
    399399 */
     
    406406         * a) the 'parent_slug' is the same as the slug of the current group, or
    407407         * b) the 'parent_slug' starts with the slug of the current group, and the members nav doesn't have
    408          *    a primary item with that slug
     408         *    a primary item with that slug.
    409409         */
    410410        $group_slug = bp_get_current_group_slug();
     
    475475 *                                          Default: false.
    476476 * }
    477  * @param string $component The component the navigation is attached to. Defaults to 'members'.
    478  * @return bool|BP_Nav_Item Returns false on failure, new nav item on success.
     477 * @param string       $component The component the navigation is attached to. Defaults to 'members'.
     478 * @return bool|object Returns false on failure, new BP_Nav_Item instance on success.
    479479 */
    480480function bp_core_create_subnav_link( $args = '', $component = 'members' ) {
     
    569569 *                                       Default: false.
    570570 * }
    571  * @param string $component The component the navigation is attached to. Defaults to 'members'.
     571 * @param string       $component The component the navigation is attached to. Defaults to 'members'.
    572572 * @return bool|null Returns false on failure.
    573573 */
  • trunk/src/bp-core/bp-core-caps.php

    r10825 r10899  
    2121 * @since 2.1.0
    2222 *
    23  * @return array
     23 * @return object
    2424 */
    2525function bp_get_current_blog_roles() {
     
    5757 *
    5858 * @since 1.6.0
    59  *
    6059 */
    6160function bp_add_caps() {
     
    9089 *
    9190 * @since 1.6.0
    92  *
    9391 */
    9492function bp_remove_caps() {
     
    219217 *
    220218 * @since 1.6.0
    221  *
    222  * @global BuddyPress $bp Global BuddyPress settings object.
    223  *
    224219 */
    225220function bp_set_current_user_default_role() {
     
    273268    }
    274269
    275     // Backward compatibility for older bp_current_user_can() checks
     270    // Backward compatibility for older bp_current_user_can() checks.
    276271    if ( empty( $args ) ) {
    277272        $args = null;
  • trunk/src/bp-core/bp-core-catchuri.php

    r10879 r10899  
    219219         * Filter the portion of the URI that is the displayed user's slug.
    220220         *
    221          * eg. example.com/ADMIN (when root profiles is enabled)
     221         * Eg. example.com/ADMIN (when root profiles is enabled)
    222222         *     example.com/members/ADMIN (when root profiles isn't enabled)
    223223         *
     
    554554 *
    555555 * @param string $member_slug The current member slug.
     556 * @return string $member_slug The current member slug.
    556557 */
    557558function bp_core_members_shortlink_redirector( $member_slug ) {
     559
    558560    /**
    559561     * Shortlink slug to redirect to logged-in user.
    560562     *
    561      * x.com/members/me/* will redirect to x.com/members/{LOGGED_IN_USER_SLUG}/*
     563     * The x.com/members/me/* url will redirect to x.com/members/{LOGGED_IN_USER_SLUG}/*
    562564     *
    563565     * @since 2.6.0
    564566     *
    565      * @var string $slug Defaults to 'me'.
     567     * @param string $slug Defaults to 'me'.
    566568     */
    567569    $me_slug = apply_filters( 'bp_core_members_shortlink_slug', 'me' );
     
    636638
    637639    $defaults = array(
    638         'mode'     => 2,                    // 1 = $root, 2 = wp-login.php
    639         'redirect' => $redirect_url,        // the URL you get redirected to when a user successfully logs in
    640         'root'     => bp_get_root_domain(), // the landing page you get redirected to when a user doesn't have access
     640        'mode'     => 2,                    // 1 = $root, 2 = wp-login.php.
     641        'redirect' => $redirect_url,        // the URL you get redirected to when a user successfully logs in.
     642        'root'     => bp_get_root_domain(), // the landing page you get redirected to when a user doesn't have access.
    641643        'message'  => __( 'You must log in to access the page you requested.', 'buddypress' )
    642644    );
     
    655657
    656658    /*
    657      * @ignore Ignore these filters and use 'bp_core_no_access' above
     659     * @ignore Ignore these filters and use 'bp_core_no_access' above.
    658660     */
    659661    $mode     = apply_filters( 'bp_no_access_mode',     $mode,     $root,     $redirect, $message );
     
    665667    switch ( $mode ) {
    666668
    667         // Option to redirect to wp-login.php
     669        // Option to redirect to wp-login.php.
    668670        // Error message is displayed with bp_core_no_access_wp_login_error().
    669671        case 2 :
     
    676678            break;
    677679
    678         // Redirect to root with "redirect_to" parameter
     680        // Redirect to root with "redirect_to" parameter.
    679681        // Error message is displayed with bp_core_add_message().
    680682        case 1 :
     
    940942 *
    941943 * @since 1.6.0
    942  *
    943944 */
    944945function _bp_maybe_remove_redirect_canonical() {
  • trunk/src/bp-core/bp-core-cssjs.php

    r10825 r10899  
    3636        'bp-jquery-scroll-to' => array( 'file' => "{$url}jquery-scroll-to{$min}.js", 'dependencies' => array( 'jquery' ), 'footer' => false ),
    3737
    38         // 2.1
     38        // Version 2.1.
    3939        'jquery-caret' => array( 'file' => "{$url}jquery.caret{$min}.js", 'dependencies' => array( 'jquery' ), 'footer' => true ),
    4040        'jquery-atwho' => array( 'file' => "{$url}jquery.atwho{$min}.js", 'dependencies' => array( 'jquery', 'jquery-caret' ), 'footer' => true ),
    4141
    42         // 2.3
     42        // Version 2.3.
    4343        'bp-plupload' => array( 'file' => "{$url}bp-plupload{$min}.js", 'dependencies' => array( 'plupload', 'jquery', 'json2', 'wp-backbone' ), 'footer' => true ),
    4444        'bp-avatar'   => array( 'file' => "{$url}avatar{$min}.js", 'dependencies' => array( 'jcrop' ), 'footer' => true ),
    4545        'bp-webcam'   => array( 'file' => "{$url}webcam{$min}.js", 'dependencies' => array( 'bp-avatar' ), 'footer' => true ),
    4646
    47         // 2.4
     47        // Version 2.4.
    4848        'bp-cover-image' => array( 'file' => "{$url}cover-image{$min}.js", 'dependencies' => array(), 'footer' => true ),
    4949
     
    107107
    108108/**
    109  * Load the JS for "Are you sure?" .confirm links.
     109 * Load the JS for "Are you sure?" confirm links.
    110110 *
    111111 * @since 1.1.0
     
    129129 * Enqueues the css and js required by the Avatar UI.
    130130 *
    131  * @since  2.3.0
     131 * @since 2.3.0
    132132 */
    133133function bp_core_avatar_scripts() {
     
    149149 * Enqueues the css and js required by the Cover Image UI.
    150150 *
    151  * @since  2.4.0
     151 * @since 2.4.0
    152152 */
    153153function bp_core_cover_image_scripts() {
     
    362362
    363363/**
    364  * Add inline css to display the component's single item cover image
     364 * Add inline css to display the component's single item cover image.
    365365 *
    366366 * @since 2.4.0
    367367 *
    368  * @param  bool $return True to get the inline css.
     368 * @param bool $return True to get the inline css.
    369369 * @return string|array the inline css or an associative array containing
    370370 *                      the css rules and the style handle
  • trunk/src/bp-core/bp-core-customizer-email.php

    r10814 r10899  
    22/**
    33 * BuddyPress Customizer implementation for email.
    4  *
    5  * @since 2.5.0
    64 *
    75 * @package BuddyPress
    86 * @subpackage Core
     7 * @since 2.5.0
    98 */
    109
     
    6564        $wp_customize->add_control( new $args['class']( $wp_customize, $control_id, $args ) );
    6665    }
    67 
    6866
    6967    /*
     
    9189        );
    9290
    93         // Include the preview loading style
     91        // Include the preview loading style.
    9492        add_action( 'wp_footer', array( $wp_customize, 'customize_preview_loading_style' ) );
    9593    }
     
    113111 * @since 2.5.0
    114112 *
    115  * @param $active Whether the Customizer section is active.
     113 * @param bool                 $active Whether the Customizer section is active.
    116114 * @param WP_Customize_Section $section {@see WP_Customize_Section} instance.
    117115 * @return bool
  • trunk/src/bp-core/bp-core-dependency.php

    r10843 r10899  
    216216 * @link https://buddypress.trac.wordpress.org/ticket/6046
    217217 * @link https://core.trac.wordpress.org/ticket/24169
    218  *
    219218 */
    220219function bp_setup_current_user() {
     
    407406 *
    408407 * @since 1.6.0
    409  *
    410408 */
    411409function bp_template_redirect() {
     
    427425 *
    428426 * @since 1.5.0
    429  *
    430427 */
    431428function bp_register_theme_directory() {
     
    447444 *
    448445 * @since 1.7.0
    449  *
    450446 */
    451447function bp_register_theme_packages() {
     
    463459 *
    464460 * @since 1.6.0
    465  *
    466461 */
    467462function bp_enqueue_scripts() {
     
    497492 *
    498493 * @since 1.8.0
    499  *
    500494 */
    501495function bp_add_rewrite_tags() {
     
    513507 *
    514508 * @since 1.9.0
    515  *
    516509 */
    517510function bp_add_rewrite_rules() {
     
    529522 *
    530523 * @since 1.9.0
    531  *
    532524 */
    533525function bp_add_permastructs() {
     
    548540 *
    549541 * @since 1.6.0
    550  *
    551542 */
    552543function bp_setup_theme() {
     
    571562 *
    572563 * @since 1.6.0
    573  *
    574564 */
    575565function bp_after_setup_theme() {
     
    700690 *
    701691 * @since 1.9.0
    702  *
    703692 */
    704693function bp_post_request() {
     
    743732 *
    744733 * @since 1.9.0
    745  *
    746734 */
    747735function bp_get_request() {
  • trunk/src/bp-core/bp-core-filters.php

    r10825 r10899  
    309309     * @since 1.6.0
    310310     *
    311   * @param bool    $value           Whether or not to redirect.
     311    * @param bool    $value           Whether or not to redirect.
    312312     * @param string  $redirect_to     Sanitized URL to be redirected to.
    313313     * @param string  $redirect_to_raw Unsanitized URL to be redirected to.
     
    350350 * @param string $prop      Email property to check against.
    351351 * @param string $transform Either 'raw' or 'replace-tokens'.
     352 * @return string $retval Modified email content.
    352353 */
    353354function bp_email_plaintext_entity_decode( $retval, $prop, $transform ) {
     
    546547 * @global object $bp BuddyPress global settings.
    547548 *
    548  * @param  string $title       Original page title.
    549  * @param  string $sep         How to separate the various items within the page title.
    550  * @param  string $seplocation Direction to display title.
     549 * @param string $title       Original page title.
     550 * @param string $sep         How to separate the various items within the page title.
     551 * @param string $seplocation Direction to display title.
    551552 * @return string              New page title.
    552553 */
     
    596597     * Filters the older 'wp_title' page title for BuddyPress pages.
    597598     *
    598      * @since  1.5.0
    599      *
    600      * @param  string $new_title   The BuddyPress page title.
    601      * @param  string $title       The original WordPress page title.
    602      * @param  string $sep         The title parts separator.
    603      * @param  string $seplocation Location of the separator (left or right).
     599     * @since 1.5.0
     600     *
     601     * @param string $new_title   The BuddyPress page title.
     602     * @param string $title       The original WordPress page title.
     603     * @param string $sep         The title parts separator.
     604     * @param string $seplocation Location of the separator (left or right).
    604605     */
    605606    return apply_filters( 'bp_modify_page_title', $new_title, $title, $sep, $seplocation );
     
    649650     * Filters BuddyPress title parts that will be used into the document title.
    650651     *
    651      * @since  2.4.3
    652      *
    653      * @param  array $bp_title  The BuddyPress page title parts.
    654      * @param  array $title      The original WordPress title parts.
     652     * @since 2.4.3
     653     *
     654     * @param array $bp_title The BuddyPress page title parts.
     655     * @param array $title    The original WordPress title parts.
    655656     */
    656657    return apply_filters( 'bp_modify_document_title_parts', $bp_title, $title );
     
    750751 * Populate BuddyPress user nav items for the customizer.
    751752 *
    752  * @since  2.3.3
    753  *
    754  * @param  array   $items  The array of menu items.
    755  * @param  string  $type   The requested type.
    756  * @param  string  $object The requested object name.
    757  * @param  integer $page   The page num being requested.
    758  * @return array           The paginated BuddyPress user nav items.
     753 * @since 2.3.3
     754 *
     755 * @param array   $items  The array of menu items.
     756 * @param string  $type   The requested type.
     757 * @param string  $object The requested object name.
     758 * @param integer $page   The page num being requested.
     759 * @return array The paginated BuddyPress user nav items.
    759760 */
    760761function bp_customizer_nav_menus_get_items( $items = array(), $type = '', $object = '', $page = 0 ) {
     
    787788 * Set BuddyPress item navs for the customizer.
    788789 *
    789  * @since  2.3.3
    790  *
    791  * @param  array $item_types An associative array structured for the customizer.
     790 * @since 2.3.3
     791 *
     792 * @param array $item_types An associative array structured for the customizer.
    792793 * @return array $item_types An associative array structured for the customizer.
    793794 */
     
    853854 * @since 2.1.0
    854855 *
    855  * @param  string $edit_link The edit link.
    856  * @param  int    $post_id   Post ID.
     856 * @param string $edit_link The edit link.
     857 * @param int    $post_id   Post ID.
    857858 * @return bool|string Will be a boolean (false) if $post_id is 0. Will be a string (the unchanged edit link)
    858859 *                     otherwise
     
    900901 *
    901902 * @global array $wp_registered_widgets Current registered widgets.
    902  * @param  array $params                Current sidebar params.
     903 *
     904 * @param array $params Current sidebar params.
    903905 * @return array
    904906 */
     
    952954 * @since 2.5.0
    953955 *
    954  * @param string $value Property value.
    955  * @param string $property_name
    956  * @param string $transform How the return value was transformed.
     956 * @param string $value         Property value.
     957 * @param string $property_name Email template property name.
     958 * @param string $transform     How the return value was transformed.
    957959 * @return string Updated value.
    958960 */
     
    991993 * @since 2.5.0
    992994 *
    993  * @param array $headers
    994  * @param string $property Name of property. Unused.
    995  * @param string $transform Return value transformation. Unused.
    996  * @param BP_Email $email Email object reference.
     995 * @param array    $headers   Array of email headers.
     996 * @param string   $property Name of property. Unused.
     997 * @param string   $transform Return value transformation. Unused.
     998 * @param BP_Email $email     Email object reference.
    997999 * @return array
    9981000 */
     
    10101012 * @since 2.5.0
    10111013 *
    1012  * @param array $tokens Email tokens.
    1013  * @param string $property_name Unused.
    1014  * @param string $transform Unused.
    1015  * @param BP_Email $email Email being sent.
     1014 * @param array    $tokens        Email tokens.
     1015 * @param string   $property_name Unused.
     1016 * @param string   $transform    Unused.
     1017 * @param BP_Email $email         Email being sent.
    10161018 * @return array
    10171019 */
  • trunk/src/bp-core/bp-core-functions.php

    r10843 r10899  
    16741674 * @since 2.6.0
    16751675 *
    1676  * @param  string     $content The content to check.
    1677  * @param  string|int $type    The type to check. Can also use a bitmask. See the class constants in the
     1676 * @param string     $content The content to check.
     1677 * @param string|int $type    The type to check. Can also use a bitmask. See the class constants in the
    16781678 *                             BP_Media_Extractor class for more info.
    16791679 * @return array|bool          If media exists, will return array of media metadata. Else, boolean false.
     
    31903190 * @since 2.5.0
    31913191 *
    3192  * @param string $text
    3193  * @param array $tokens Token names and replacement values for the $text.
     3192 * @param string $text   Text to replace tokens in.
     3193 * @param array  $tokens Token names and replacement values for the $text.
    31943194 * @return string
    31953195 */
     
    32283228/**
    32293229 * Get a list of emails for populating the email post type.
    3230  *t
     3230 *
    32313231 * @since 2.5.1
    32323232 *
  • trunk/src/bp-core/bp-core-options.php

    r10825 r10899  
    126126 *
    127127 * @since 1.6.0
    128  *
    129128 */
    130129function bp_add_options() {
     
    157156 *
    158157 * @since 1.6.0
    159  *
    160158 */
    161159function bp_delete_options() {
     
    185183 *
    186184 * @since 1.6.0
    187  *
    188185 */
    189186function bp_setup_option_filters() {
     
    490487 * @since 2.3.0
    491488 *
    492  * @param  string $option Name of the option key.
     489 * @param string $option Name of the option key.
    493490 * @return mixed Value, if found.
    494491 */
     
    754751     *
    755752     * @since 1.6.0
    756      *
    757753     *
    758754     * @param bool|string $default Optional. Default: '0'.
  • trunk/src/bp-core/bp-core-taxonomy.php

    r10871 r10899  
    5252 * @since 2.6.0
    5353 *
     54 * @param string $taxonomy Taxonomy slug to check for.
    5455 * @return int
    5556 */
     
    6263     * @since 2.6.0
    6364     *
    64      * @param int    $site_id
    65      * @param string $taxonomy
     65     * @param int    $site_id  Site ID to cehck for.
     66     * @param string $taxonomy Taxonomy slug to check for.
    6667     */
    6768    return (int) apply_filters( 'bp_get_taxonomy_term_site_id', $site_id, $taxonomy );
  • trunk/src/bp-core/bp-core-template-loader.php

    r10889 r10899  
    7171 *
    7272 * @see bp_get_template_part() for full documentation.
     73 *
     74 * @param string      $slug Template slug.
     75 * @param string|null $name Template name.
     76 * @return string
    7377 */
    7478function bp_get_asset_template_part( $slug, $name = null ) {
     
    157161 * @since 2.6.0
    158162 *
    159  * @param  string    Relative filename to search for.
     163 * @param string $filename Relative filename to search for.
    160164 * @return array|bool Array of asset data if one is located (includes absolute filepath and URI).
    161165 *                    Boolean false on failure.
  • trunk/src/bp-core/bp-core-template.php

    r10874 r10899  
    24002400 * Eg http://example.com/members/joe/profile/change-cover-image/ (or a subpage thereof).
    24012401 *
    2402  * @since  2.4.0
     2402 * @since 2.4.0
    24032403 *
    24042404 * @return bool True if the current page is a user's profile edit cover image page.
     
    31553155     * @since 2.4.3
    31563156     *
    3157      * @param  array $bp_title_parts Current BuddyPress title parts
     3157     * @param array $bp_title_parts Current BuddyPress title parts.
    31583158     * @return array
    31593159     */
     
    37253725 * Prints the Recipient Salutation.
    37263726 *
    3727  * @since  2.5.0
    3728  *
    3729  * @param  array $settings Email Settings.
     3727 * @since 2.5.0
     3728 *
     3729 * @param array $settings Email Settings.
    37303730 */
    37313731function bp_email_the_salutation( $settings = array() ) {
     
    37363736     * Gets the Recipient Salutation.
    37373737     *
    3738      * @since  2.5.0
    3739      *
    3740      * @param  array $settings Email Settings.
     3738     * @since 2.5.0
     3739     *
     3740     * @param array $settings Email Settings.
    37413741     * @return string The Recipient Salutation.
    37423742     */
     
    37473747         * Filters The Recipient Salutation inside the Email Template.
    37483748         *
    3749          * @since  2.5.0
     3749         * @since 2.5.0
    37503750         *
    37513751         * @param string $value    The Recipient Salutation.
  • trunk/src/bp-core/bp-core-theme-compatibility.php

    r10836 r10899  
    320320 * @since 2.4.0
    321321 *
    322  * @param  string $theme_id The theme id (eg: legacy).
    323  * @param  array  $feature  An associative array (eg: array( name => 'feature_name', 'settings' => array() )).
     322 * @param string $theme_id The theme id (eg: legacy).
     323 * @param array  $feature  An associative array (eg: array( name => 'feature_name', 'settings' => array() )).
    324324 */
    325325function bp_set_theme_compat_feature( $theme_id, $feature = array() ) {
     
    380380 * @since 2.4.0
    381381 *
    382  * @param  string $feature The feature (eg: cover_image).
    383  * @return object          The feature settings.
     382 * @param string $feature The feature (eg: cover_image).
     383 * @return object The feature settings.
    384384 */
    385385function bp_get_theme_compat_feature( $feature = '' ) {
     
    398398
    399399/**
    400  * Setup the theme's features
     400 * Setup the theme's features.
    401401 *
    402402 * Note: BP Legacy's buddypress-functions.php is not loaded in WP Administration
     
    647647
    648648    /**
    649      * Force the header back to 200 status if not a deliberate 404
     649     * Force the header back to 200 status if not a deliberate 404.
    650650     *
    651651     * @see https://bbpress.trac.wordpress.org/ticket/1973
  • trunk/src/bp-core/bp-core-update.php

    r10825 r10899  
    140140 *
    141141 * @since 1.6.0
    142  *
    143142 */
    144143function bp_version_bump() {
     
    196195    $switched_to_root_blog = false;
    197196
    198     // Make sure the current blog is set to the root blog
     197    // Make sure the current blog is set to the root blog.
    199198    if ( ! bp_is_root_blog() ) {
    200199        switch_to_blog( bp_get_root_blog_id() );
     
    219218        bp_core_install();
    220219
    221         // 1.5.0
     220        // Version 1.5.0.
    222221        if ( $raw_db_version < 1801 ) {
    223222            bp_update_to_1_5();
     
    225224        }
    226225
    227         // 1.6.0
     226        // Version 1.6.0.
    228227        if ( $raw_db_version < 6067 ) {
    229228            bp_update_to_1_6();
    230229        }
    231230
    232         // 1.9.0
     231        // Version 1.9.0.
    233232        if ( $raw_db_version < 7553 ) {
    234233            bp_update_to_1_9();
    235234        }
    236235
    237         // 1.9.2
     236        // Version 1.9.2.
    238237        if ( $raw_db_version < 7731 ) {
    239238            bp_update_to_1_9_2();
    240239        }
    241240
    242         // 2.0.0
     241        // Version 2.0.0.
    243242        if ( $raw_db_version < 7892 ) {
    244243            bp_update_to_2_0();
    245244        }
    246245
    247         // 2.0.1
     246        // Version 2.0.1.
    248247        if ( $raw_db_version < 8311 ) {
    249248            bp_update_to_2_0_1();
    250249        }
    251250
    252         // 2.2.0
     251        // Version 2.2.0.
    253252        if ( $raw_db_version < 9181 ) {
    254253            bp_update_to_2_2();
    255254        }
    256255
    257         // 2.3.0
     256        // Version 2.3.0.
    258257        if ( $raw_db_version < 9615 ) {
    259258            bp_update_to_2_3();
    260259        }
    261260
    262         // 2.5.0
     261        // Version 2.5.0.
    263262        if ( $raw_db_version < 10440 ) {
    264263            bp_update_to_2_5();
     
    332331
    333332/**
    334  * Remove unused metadata from database when upgrading from < 1.6.
     333 * Remove unused metadata from database when upgrading from < 1.6.0.
    335334 *
    336335 * Database update methods based on version numbers.
     
    381380
    382381/**
    383  * Perform database updates for BP 1.9.2
     382 * Perform database updates for BP 1.9.2.
    384383 *
    385384 * In 1.9, BuddyPress stopped registering its theme directory when it detected
     
    441440 *
    442441 * @since 2.0.1
    443  *
    444  * @return void
    445442 */
    446443function bp_update_to_2_0_1() {
     
    540537 *
    541538 * @since 2.2.0
    542  *
    543539 */
    544540function bp_cleanup_friendship_activities() {
     
    556552 *
    557553 * @internal Used internally to redirect BuddyPress to the about page on activation.
    558  *
    559554 */
    560555function bp_add_activation_redirect() {
     
    625620 *
    626621 * @since 1.6.0
    627  *
    628622 */
    629623function bp_activation() {
     
    638632     * Fires during the activation of BuddyPress.
    639633     *
    640      * Use as of (1.6.0)
     634     * Use as of 1.6.0.
    641635     *
    642636     * @since 1.6.0
     
    644638    do_action( 'bp_activation' );
    645639
    646     // @deprecated as of (1.6)
     640    // @deprecated as of 1.6.0
    647641    do_action( 'bp_loader_activate' );
    648642}
     
    654648 *
    655649 * @since 1.6.0
    656  *
    657650 */
    658651function bp_deactivation() {
     
    672665     * Fires during the deactivation of BuddyPress.
    673666     *
    674      * Use as of (1.6.0)
     667     * Use as of 1.6.0.
    675668     *
    676669     * @since 1.6.0
     
    678671    do_action( 'bp_deactivation' );
    679672
    680     // @deprecated as of (1.6)
     673    // @deprecated as of 1.6.0
    681674    do_action( 'bp_loader_deactivate' );
    682675}
     
    688681 *
    689682 * @since 1.6.0
    690  *
    691683 */
    692684function bp_uninstall() {
  • trunk/src/bp-core/bp-core-wpabstraction.php

    r10497 r10899  
    5353         * @param string $option_name Option name to fetch.
    5454         * @param bool   $default     Whether or not default.
    55          *
    5655         * @return mixed
    5756         */
     
    7372         * @param string $option_name  Option name to add.
    7473         * @param mixed  $option_value Option value to add.
    75          *
    7674         * @return mixed
    7775         */
     
    9391         * @param string $option_name Option name to update.
    9492         * @param mixed  $value       Option value to update.
    95          *
    9693         * @return mixed
    9794         */
     
    112109         * @param int    $blog_id     Blog ID to delete for. Not used.
    113110         * @param string $option_name Option name to delete.
    114          *
    115111         * @return mixed
    116112         */
     
    131127         * @param mixed $new_blog   New blog to switch to. Not used.
    132128         * @param null  $deprecated Whether or not deprecated. Not used.
    133          *
    134129         * @return int
    135130         */
     
    166161         * @param int  $user_id ID of the user. Not used.
    167162         * @param bool $all     Whether or not to return all. Not used.
    168          *
    169163         * @return false
    170164         */
     
    187181         * @param string $value      Value. Not used.
    188182         * @param null   $deprecated Whether or not deprecated. Not used.
    189          *
    190183         * @return true
    191184         */
  • trunk/src/bp-core/classes/class-bp-admin.php

    r10893 r10899  
    940940     * @since 2.6.0
    941941     *
    942      * @param  array $columns Current column data.
     942     * @param array $columns Current column data.
    943943     * @return array
    944944     */
  • trunk/src/bp-core/classes/class-bp-attachment-avatar.php

    r10825 r10899  
    6262     *
    6363     * @since 2.3.0
    64      *
    6564     */
    6665    public function set_upload_dir() {
     
    8281     * @since 2.3.0
    8382     *
    84      *
    85      * @param  array $file the temporary file attributes (before it has been moved).
     83     * @param array $file the temporary file attributes (before it has been moved).
    8684     * @return array the file with extra errors if needed.
    8785     */
     
    110108     * @since 2.3.0
    111109     * @since 2.4.0 Add the $ui_available_width parameter, to inform about the Avatar UI width.
    112      *
    113110     *
    114111     * @param string $file               The absolute path to the file.
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r10825 r10899  
    198198     * @since 2.3.0
    199199     *
    200      *
    201      * @param  array       $file              The appropriate entry the from $_FILES superglobal.
    202      * @param  string      $upload_dir_filter A specific filter to be applied to 'upload_dir' (optional).
    203      * @param  string|null $time              Optional. Time formatted in 'yyyy/mm'. Default null.
     200     * @param array       $file              The appropriate entry the from $_FILES superglobal.
     201     * @param string      $upload_dir_filter A specific filter to be applied to 'upload_dir' (optional).
     202     * @param string|null $time              Optional. Time formatted in 'yyyy/mm'. Default null.
    204203     * @return array On success, returns an associative array of file attributes.
    205204     *               On failure, returns an array containing the error message
     
    208207    public function upload( $file, $upload_dir_filter = '', $time = null ) {
    209208        /**
    210          * Upload action and the file input name are required parameters
     209         * Upload action and the file input name are required parameters.
     210         *
    211211         * @see BP_Attachment:__construct()
    212212         */
     
    321321     * @since 2.3.0
    322322     *
    323      * @param  array $file The temporary file attributes (before it has been moved).
     323     * @param array $file The temporary file attributes (before it has been moved).
    324324     * @return array The file.
    325325     */
     
    346346     *       regarding to context
    347347     *
    348      * @param  array $upload_dir The original Uploads dir.
     348     * @param array $upload_dir The original Uploads dir.
    349349     * @return array The upload directory data.
    350350     */
     
    523523     * Get full data for an image
    524524     *
    525      * @since  2.4.0
    526      *
    527      * @param  string $file Absolute path to the uploaded image.
     525     * @since 2.4.0
     526     *
     527     * @param string $file Absolute path to the uploaded image.
    528528     * @return bool|array   An associate array containing the width, height and metadatas.
    529529     *                      False in case an important image attribute is missing.
     
    575575         * Filter here to add/remove/edit data to the image full data
    576576         *
    577          * @since  2.4.0
     577         * @since 2.4.0
    578578         *
    579          * @param  array $image_data An associate array containing the width, height and metadatas.
     579         * @param array $image_data An associate array containing the width, height and metadatas.
    580580         */
    581581        return apply_filters( 'bp_attachments_get_image_data', $image_data );
     
    585585     * Edit an image file to resize it or rotate it
    586586     *
    587      * @since  2.4.0
     587     * @since 2.4.0
    588588     *
    589589     * @param string $attachment_type The attachment type (eg: avatar or cover_image). Required.
  • trunk/src/bp-core/classes/class-bp-core-nav.php

    r10873 r10899  
    55 * @package BuddyPress
    66 * @subpackage Core
    7  * @since  2.6.0
     7 * @since 2.6.0
    88 */
    99
     
    5757     * @since 2.6.0
    5858     *
    59      * @param  string $key The requested nav slug.
     59     * @param string $key The requested nav slug.
    6060     * @return bool True if the nav item is set, false otherwise.
    6161     */
     
    6969     * @since 2.6.0
    7070     *
    71      * @param  string $key The requested nav slug.
     71     * @param string $key The requested nav slug.
    7272     * @return mixed The value corresponding to the requested nav item.
    7373     */
     
    8585     * @since 2.6.0
    8686     *
    87      * @param  string $key   The requested nav slug.
    88      * @param  mixed   $value The value of the nav item.
     87     * @param string $key   The requested nav slug.
     88     * @param mixed  $value The value of the nav item.
    8989     */
    9090    public function __set( $key, $value ) {
     
    101101     * @since 2.6.0
    102102     *
    103      * @param  string $key The nav item slug to get. Optional.
     103     * @param string $key The nav item slug to get. Optional.
    104104     * @return mixed       An array of nav item, a single nav item, or null if none found.
    105105     */
     
    321321     * @since 2.6.0
    322322     *
    323      * @param  array $args Filters to select the specific primary items. See wp_list_filter().
    324      * @param  bool  $sort True to sort the nav items. False otherwise.
     323     * @param array $args Filters to select the specific primary items. See wp_list_filter().
     324     * @param bool  $sort True to sort the nav items. False otherwise.
    325325     * @return array The list of primary objects nav
    326326     */
     
    328328        $params = wp_parse_args( $args, array( 'primary' => true ) );
    329329
    330         // This parameter is not overridable
     330        // This parameter is not overridable.
    331331        if ( empty( $params['primary'] ) ) {
    332332            return false;
     
    351351     * @since 2.6.0
    352352     *
    353      * @param  array $args Filters to select the specific secondary items. See wp_list_filter().
    354      * @param  bool  $sort True to sort the nav items. False otherwise.
     353     * @param array $args Filters to select the specific secondary items. See wp_list_filter().
     354     * @param bool  $sort True to sort the nav items. False otherwise.
    355355     * @return array The list of secondary objects nav
    356356     */
     
    358358        $params = wp_parse_args( $args, array( 'parent_slug' => '' ) );
    359359
    360         // No need to search children if the parent is not set
     360        // No need to search children if the parent is not set.
    361361        if ( empty( $params['parent_slug'] ) && empty( $params['secondary'] ) ) {
    362362            return false;
     
    388388        if ( $primary_nav_items ) {
    389389            foreach( $primary_nav_items as $key_nav => $primary_nav ) {
    390                 // Try to get the children
     390                // Try to get the children.
    391391                $children = $this->get_secondary( array( 'parent_slug' => $primary_nav->slug, 'user_has_access' => true ) );
    392392
  • trunk/src/bp-core/classes/class-bp-core-oembed-extension.php

    r10861 r10899  
    55 * @package BuddyPress
    66 * @subpackage Core
     7 * @since 2.6.0
    78 */
    89
     
    7273     * @since 2.6.0
    7374     *
     75     * @param string $url URL to validate.
    7476     * @return int Your item ID
    7577     */
     
    8183     * @since 2.6.0
    8284     *
    83      * @param  int  $item_id Your item ID to do checks against.
     85     * @param int $item_id Your item ID to do checks against.
    8486     * @return array Should contain 'content', 'title', 'author_url', 'author_name' as array
    8587     *               keys. 'author_url' and 'author_name' is optional; the rest are required.
     
    9597     * @since 2.6.0
    9698     *
    97      * @param  int    $item_id Your item ID to do checks against.
     99     * @param int $item_id Your item ID to do checks against.
    98100     * @return string Fallback HTML you want to output.
    99101     */
     
    123125     *
    124126     * @param int $item_id The item ID to do checks for.
    125      * @return string
    126127     */
    127128    protected function set_iframe_title( $item_id ) {}
     
    146147        $url = bp_get_requested_url();
    147148
    148         // Remove querystring from bp_get_requested_url()
     149        // Remove querystring from bp_get_requested_url().
    149150        if ( false !== strpos( bp_get_requested_url(), '?' ) ) {
    150151            $url = substr( bp_get_requested_url(), 0, strpos( bp_get_requested_url(), '?' ) );
     
    240241     * @since 2.6.0
    241242     *
    242      * @param  string $template File path to current embed template.
     243     * @param string $template File path to current embed template.
    243244     * @return string
    244245     */
     
    264265     *
    265266     * @since 2.6.0
     267     *
     268     * @param string $slug Template slug.
     269     * @param string $name Template name.
    266270     */
    267271    public function content_buffer_start( $slug, $name ) {
     
    281285     *
    282286     * @since 2.6.0
     287     *
     288     * @param string $name Template name.
    283289     */
    284290    public function content_buffer_end( $name ) {
     
    319325     * @since 2.6.0
    320326     *
    321      * @param  string $retval Current discovery links.
     327     * @param string $retval Current discovery links.
    322328     * @return string
    323329     */
     
    354360     * @link http://oembed.com/ View the 'Response parameters' section for more details.
    355361     *
    356      * @param  array $item  Custom oEmbed response data.
    357      * @param  int   $width The requested width.
     362     * @param array $item  Custom oEmbed response data.
     363     * @param int   $width The requested width.
    358364     * @return array
    359365     */
     
    404410     * @since 2.6.0
    405411     *
    406      * @param  WP_REST_Request $request Full data about the request.
     412     * @param WP_REST_Request $request Full data about the request.
    407413     * @return WP_Error|array oEmbed response data or WP_Error on failure.
    408414     */
     
    509515     * @see bp_activity_embed_rest_route_callback()
    510516     *
    511      * @param  string $retval Current embed URL
     517     * @param string $retval Current embed URL.
    512518     * @return string
    513519     */
     
    521527
    522528        // This is for the 'WordPress Embed' block
    523         // @see bp_activity_embed_comments_button()
     529        // @see bp_activity_embed_comments_button().
    524530        if ( 'the_permalink' !== current_filter() ) {
    525531            $url = add_query_arg( 'embed', 'true', trailingslashit( $url ) );
     
    541547     * @since 2.6.0
    542548     *
    543      * @param  string $retval Current embed HTML
     549     * @param string $retval Current embed HTML.
    544550     * @return string
    545551     */
     
    568574        }
    569575
    570         // Remove default <blockquote>
     576        // Remove default <blockquote>.
    571577        $retval = substr( $retval, strpos( $retval, '</blockquote>' ) + 13 );
    572578
     
    595601     * @see add_oembed_discovery_links()
    596602     *
    597      * @param  string $retval Current oEmbed endpoint URL
     603     * @param string $retval Current oEmbed endpoint URL.
    598604     * @return string
    599605     */
Note: See TracChangeset for help on using the changeset viewer.