Changeset 10899
- Timestamp:
- 06/23/2016 06:31:58 AM (8 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-attachments.php
r10707 r10899 964 964 * add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_filter', 10, 1 ); 965 965 * 966 * @since 966 * @since 2.4.0 967 967 * 968 968 * @param array $settings The cover image settings … … 991 991 992 992 /** 993 * Get cover image Width and Height 993 * Get cover image Width and Height. 994 994 * 995 995 * @since 2.4.0 -
trunk/src/bp-core/bp-core-avatars.php
r10825 r10899 649 649 * 650 650 * @param string $default_grav The avatar default. 651 * @param array $paramsThe avatar's data.651 * @param array $params The avatar's data. 652 652 */ 653 653 $default_grav = apply_filters( 'bp_core_avatar_default', $default_grav, $params ); … … 727 727 * @since 2.5.1 728 728 * 729 * @param bool $value Whether or not to delete the avatar.729 * @param bool $value Whether or not to delete the avatar. 730 730 * @param array $args { 731 731 * Array of function parameters. … … 806 806 * @since 2.3.0 807 807 * 808 * @return string|null A json object containing success data if the avatar was deleted808 * @return string|null A JSON object containing success data if the avatar was deleted, 809 809 * error message otherwise. 810 810 */ … … 949 949 * @since 2.3.0 950 950 * 951 * @return string|null A jsonobject containing success data if the upload succeeded952 * 951 * @return string|null A JSON object containing success data if the upload succeeded 952 * error message otherwise. 953 953 */ 954 954 function bp_avatar_ajax_upload() { … … 960 960 /** 961 961 * Sending the json response will be different if 962 * the current Plupload runtime is html4 962 * the current Plupload runtime is html4. 963 963 */ 964 964 $is_html4 = false; … … 1171 1171 /** 1172 1172 * 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 avatar1177 * item_id - Item ID1178 * original_file - The absolute path to the original avatar file1179 * crop_w - Crop width1180 * crop_h - Crop height1181 * crop_x - The horizontal starting point of the crop1182 * crop_y - The vertical starting point of the crop1183 1173 * 1184 1174 * @since 1.1.0 … … 1247 1237 * @since 2.3.0 1248 1238 * 1249 * @return string|null A jsonobject containing success data if the crop/capture succeeded1250 * 1239 * @return string|null A JSON object containing success data if the crop/capture succeeded 1240 * error message otherwise. 1251 1241 */ 1252 1242 function bp_avatar_ajax_set() { … … 1512 1502 * 1513 1503 * @since 2.3.0 1504 * 1505 * @return array 1514 1506 */ 1515 1507 function bp_core_get_allowed_avatar_types() { … … 1538 1530 * 1539 1531 * @since 2.3.0 1532 * 1533 * @return array 1540 1534 */ 1541 1535 function bp_core_get_allowed_avatar_mimes() { … … 1944 1938 * notices, we need to make sure this 'week' query var is reset to 0. 1945 1939 * 1946 * @since 1940 * @since 2.2.0 1947 1941 * 1948 1942 * @param WP_Query|null $posts_query The main query object. … … 1978 1972 * Checks whether Avatar UI should be loaded. 1979 1973 * 1980 * @since 1974 * @since 2.3.0 1981 1975 * 1982 1976 * @return bool True if Avatar UI should load, false otherwise. … … 2010 2004 * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false()) 2011 2005 * 2012 * @since 2006 * @since 2.3.0 2013 2007 * 2014 2008 * @param bool $retval Whether or not to load the Avatar UI. … … 2020 2014 * Checks whether the Webcam Avatar UI part should be loaded. 2021 2015 * 2022 * @since 2016 * @since 2.3.0 2023 2017 * 2024 2018 * @global $is_safari … … 2041 2035 * Bail when the browser does not support getUserMedia. 2042 2036 * 2043 * @see 2037 * @see http://caniuse.com/#feat=stream 2044 2038 */ 2045 2039 if ( $is_safari || $is_IE || ( $is_chrome && ! is_ssl() ) ) { … … 2061 2055 * Template function to load the Avatar UI javascript templates. 2062 2056 * 2063 * @since 2057 * @since 2.3.0 2064 2058 */ 2065 2059 function bp_avatar_get_templates() { … … 2077 2071 * help users to get the avatar UI. 2078 2072 * 2079 * @since 2073 * @since 2.3.0 2080 2074 */ 2081 2075 function bp_avatar_template_check() { -
trunk/src/bp-core/bp-core-buddybar.php
r10876 r10899 34 34 * item is clicked. 35 35 * } 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'. 37 37 * @return bool|null Returns false on failure. 38 38 */ … … 108 108 * item is clicked. 109 109 * } 110 * @param string $component Optional. Component that the nav belongs to.110 * @param string $component Optional. Component that the nav belongs to. 111 111 * @return bool|BP_Nav_Item Returns false on failure, new nav item on success. 112 112 */ … … 322 322 } 323 323 324 // Edit the screen function for the parent nav 324 // Edit the screen function for the parent nav. 325 325 $bp->members->nav->edit_nav( array( 326 326 'screen_function' => &$r['screen_function'], … … 395 395 * Admin Bar menu for group admins. Default: false. 396 396 * } 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'. 398 398 * @return bool|null Returns false on failure. 399 399 */ … … 406 406 * a) the 'parent_slug' is the same as the slug of the current group, or 407 407 * 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. 409 409 */ 410 410 $group_slug = bp_get_current_group_slug(); … … 475 475 * Default: false. 476 476 * } 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 itemon 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. 479 479 */ 480 480 function bp_core_create_subnav_link( $args = '', $component = 'members' ) { … … 569 569 * Default: false. 570 570 * } 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'. 572 572 * @return bool|null Returns false on failure. 573 573 */ -
trunk/src/bp-core/bp-core-caps.php
r10825 r10899 21 21 * @since 2.1.0 22 22 * 23 * @return array23 * @return object 24 24 */ 25 25 function bp_get_current_blog_roles() { … … 57 57 * 58 58 * @since 1.6.0 59 *60 59 */ 61 60 function bp_add_caps() { … … 90 89 * 91 90 * @since 1.6.0 92 *93 91 */ 94 92 function bp_remove_caps() { … … 219 217 * 220 218 * @since 1.6.0 221 *222 * @global BuddyPress $bp Global BuddyPress settings object.223 *224 219 */ 225 220 function bp_set_current_user_default_role() { … … 273 268 } 274 269 275 // Backward compatibility for older bp_current_user_can() checks 270 // Backward compatibility for older bp_current_user_can() checks. 276 271 if ( empty( $args ) ) { 277 272 $args = null; -
trunk/src/bp-core/bp-core-catchuri.php
r10879 r10899 219 219 * Filter the portion of the URI that is the displayed user's slug. 220 220 * 221 * eg. example.com/ADMIN (when root profiles is enabled)221 * Eg. example.com/ADMIN (when root profiles is enabled) 222 222 * example.com/members/ADMIN (when root profiles isn't enabled) 223 223 * … … 554 554 * 555 555 * @param string $member_slug The current member slug. 556 * @return string $member_slug The current member slug. 556 557 */ 557 558 function bp_core_members_shortlink_redirector( $member_slug ) { 559 558 560 /** 559 561 * Shortlink slug to redirect to logged-in user. 560 562 * 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}/* 562 564 * 563 565 * @since 2.6.0 564 566 * 565 * @ varstring $slug Defaults to 'me'.567 * @param string $slug Defaults to 'me'. 566 568 */ 567 569 $me_slug = apply_filters( 'bp_core_members_shortlink_slug', 'me' ); … … 636 638 637 639 $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 access640 '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. 641 643 'message' => __( 'You must log in to access the page you requested.', 'buddypress' ) 642 644 ); … … 655 657 656 658 /* 657 * @ignore Ignore these filters and use 'bp_core_no_access' above 659 * @ignore Ignore these filters and use 'bp_core_no_access' above. 658 660 */ 659 661 $mode = apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message ); … … 665 667 switch ( $mode ) { 666 668 667 // Option to redirect to wp-login.php 669 // Option to redirect to wp-login.php. 668 670 // Error message is displayed with bp_core_no_access_wp_login_error(). 669 671 case 2 : … … 676 678 break; 677 679 678 // Redirect to root with "redirect_to" parameter 680 // Redirect to root with "redirect_to" parameter. 679 681 // Error message is displayed with bp_core_add_message(). 680 682 case 1 : … … 940 942 * 941 943 * @since 1.6.0 942 *943 944 */ 944 945 function _bp_maybe_remove_redirect_canonical() { -
trunk/src/bp-core/bp-core-cssjs.php
r10825 r10899 36 36 'bp-jquery-scroll-to' => array( 'file' => "{$url}jquery-scroll-to{$min}.js", 'dependencies' => array( 'jquery' ), 'footer' => false ), 37 37 38 // 2.138 // Version 2.1. 39 39 'jquery-caret' => array( 'file' => "{$url}jquery.caret{$min}.js", 'dependencies' => array( 'jquery' ), 'footer' => true ), 40 40 'jquery-atwho' => array( 'file' => "{$url}jquery.atwho{$min}.js", 'dependencies' => array( 'jquery', 'jquery-caret' ), 'footer' => true ), 41 41 42 // 2.342 // Version 2.3. 43 43 'bp-plupload' => array( 'file' => "{$url}bp-plupload{$min}.js", 'dependencies' => array( 'plupload', 'jquery', 'json2', 'wp-backbone' ), 'footer' => true ), 44 44 'bp-avatar' => array( 'file' => "{$url}avatar{$min}.js", 'dependencies' => array( 'jcrop' ), 'footer' => true ), 45 45 'bp-webcam' => array( 'file' => "{$url}webcam{$min}.js", 'dependencies' => array( 'bp-avatar' ), 'footer' => true ), 46 46 47 // 2.447 // Version 2.4. 48 48 'bp-cover-image' => array( 'file' => "{$url}cover-image{$min}.js", 'dependencies' => array(), 'footer' => true ), 49 49 … … 107 107 108 108 /** 109 * Load the JS for "Are you sure?" .confirm links.109 * Load the JS for "Are you sure?" confirm links. 110 110 * 111 111 * @since 1.1.0 … … 129 129 * Enqueues the css and js required by the Avatar UI. 130 130 * 131 * @since 131 * @since 2.3.0 132 132 */ 133 133 function bp_core_avatar_scripts() { … … 149 149 * Enqueues the css and js required by the Cover Image UI. 150 150 * 151 * @since 151 * @since 2.4.0 152 152 */ 153 153 function bp_core_cover_image_scripts() { … … 362 362 363 363 /** 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. 365 365 * 366 366 * @since 2.4.0 367 367 * 368 * @param 368 * @param bool $return True to get the inline css. 369 369 * @return string|array the inline css or an associative array containing 370 370 * the css rules and the style handle -
trunk/src/bp-core/bp-core-customizer-email.php
r10814 r10899 2 2 /** 3 3 * BuddyPress Customizer implementation for email. 4 *5 * @since 2.5.06 4 * 7 5 * @package BuddyPress 8 6 * @subpackage Core 7 * @since 2.5.0 9 8 */ 10 9 … … 65 64 $wp_customize->add_control( new $args['class']( $wp_customize, $control_id, $args ) ); 66 65 } 67 68 66 69 67 /* … … 91 89 ); 92 90 93 // Include the preview loading style 91 // Include the preview loading style. 94 92 add_action( 'wp_footer', array( $wp_customize, 'customize_preview_loading_style' ) ); 95 93 } … … 113 111 * @since 2.5.0 114 112 * 115 * @param $activeWhether the Customizer section is active.113 * @param bool $active Whether the Customizer section is active. 116 114 * @param WP_Customize_Section $section {@see WP_Customize_Section} instance. 117 115 * @return bool -
trunk/src/bp-core/bp-core-dependency.php
r10843 r10899 216 216 * @link https://buddypress.trac.wordpress.org/ticket/6046 217 217 * @link https://core.trac.wordpress.org/ticket/24169 218 *219 218 */ 220 219 function bp_setup_current_user() { … … 407 406 * 408 407 * @since 1.6.0 409 *410 408 */ 411 409 function bp_template_redirect() { … … 427 425 * 428 426 * @since 1.5.0 429 *430 427 */ 431 428 function bp_register_theme_directory() { … … 447 444 * 448 445 * @since 1.7.0 449 *450 446 */ 451 447 function bp_register_theme_packages() { … … 463 459 * 464 460 * @since 1.6.0 465 *466 461 */ 467 462 function bp_enqueue_scripts() { … … 497 492 * 498 493 * @since 1.8.0 499 *500 494 */ 501 495 function bp_add_rewrite_tags() { … … 513 507 * 514 508 * @since 1.9.0 515 *516 509 */ 517 510 function bp_add_rewrite_rules() { … … 529 522 * 530 523 * @since 1.9.0 531 *532 524 */ 533 525 function bp_add_permastructs() { … … 548 540 * 549 541 * @since 1.6.0 550 *551 542 */ 552 543 function bp_setup_theme() { … … 571 562 * 572 563 * @since 1.6.0 573 *574 564 */ 575 565 function bp_after_setup_theme() { … … 700 690 * 701 691 * @since 1.9.0 702 *703 692 */ 704 693 function bp_post_request() { … … 743 732 * 744 733 * @since 1.9.0 745 *746 734 */ 747 735 function bp_get_request() { -
trunk/src/bp-core/bp-core-filters.php
r10825 r10899 309 309 * @since 1.6.0 310 310 * 311 311 * @param bool $value Whether or not to redirect. 312 312 * @param string $redirect_to Sanitized URL to be redirected to. 313 313 * @param string $redirect_to_raw Unsanitized URL to be redirected to. … … 350 350 * @param string $prop Email property to check against. 351 351 * @param string $transform Either 'raw' or 'replace-tokens'. 352 * @return string $retval Modified email content. 352 353 */ 353 354 function bp_email_plaintext_entity_decode( $retval, $prop, $transform ) { … … 546 547 * @global object $bp BuddyPress global settings. 547 548 * 548 * @param 549 * @param 550 * @param 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. 551 552 * @return string New page title. 552 553 */ … … 596 597 * Filters the older 'wp_title' page title for BuddyPress pages. 597 598 * 598 * @since 599 * 600 * @param 601 * @param 602 * @param 603 * @param 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). 604 605 */ 605 606 return apply_filters( 'bp_modify_page_title', $new_title, $title, $sep, $seplocation ); … … 649 650 * Filters BuddyPress title parts that will be used into the document title. 650 651 * 651 * @since 652 * 653 * @param array $bp_titleThe BuddyPress page title parts.654 * @param array $titleThe 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. 655 656 */ 656 657 return apply_filters( 'bp_modify_document_title_parts', $bp_title, $title ); … … 750 751 * Populate BuddyPress user nav items for the customizer. 751 752 * 752 * @since 753 * 754 * @param 755 * @param 756 * @param 757 * @param 758 * @return array 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. 759 760 */ 760 761 function bp_customizer_nav_menus_get_items( $items = array(), $type = '', $object = '', $page = 0 ) { … … 787 788 * Set BuddyPress item navs for the customizer. 788 789 * 789 * @since 790 * 791 * @param 790 * @since 2.3.3 791 * 792 * @param array $item_types An associative array structured for the customizer. 792 793 * @return array $item_types An associative array structured for the customizer. 793 794 */ … … 853 854 * @since 2.1.0 854 855 * 855 * @param 856 * @param 856 * @param string $edit_link The edit link. 857 * @param int $post_id Post ID. 857 858 * @return bool|string Will be a boolean (false) if $post_id is 0. Will be a string (the unchanged edit link) 858 859 * otherwise … … 900 901 * 901 902 * @global array $wp_registered_widgets Current registered widgets. 902 * @param array $params Current sidebar params. 903 * 904 * @param array $params Current sidebar params. 903 905 * @return array 904 906 */ … … 952 954 * @since 2.5.0 953 955 * 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. 957 959 * @return string Updated value. 958 960 */ … … 991 993 * @since 2.5.0 992 994 * 993 * @param array $headers994 * @param string $propertyName 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. 997 999 * @return array 998 1000 */ … … 1010 1012 * @since 2.5.0 1011 1013 * 1012 * @param array $tokensEmail tokens.1013 * @param string $property_name Unused.1014 * @param string $transformUnused.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. 1016 1018 * @return array 1017 1019 */ -
trunk/src/bp-core/bp-core-functions.php
r10843 r10899 1674 1674 * @since 2.6.0 1675 1675 * 1676 * @param 1677 * @param 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 1678 1678 * BP_Media_Extractor class for more info. 1679 1679 * @return array|bool If media exists, will return array of media metadata. Else, boolean false. … … 3190 3190 * @since 2.5.0 3191 3191 * 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. 3194 3194 * @return string 3195 3195 */ … … 3228 3228 /** 3229 3229 * Get a list of emails for populating the email post type. 3230 * t3230 * 3231 3231 * @since 2.5.1 3232 3232 * -
trunk/src/bp-core/bp-core-options.php
r10825 r10899 126 126 * 127 127 * @since 1.6.0 128 *129 128 */ 130 129 function bp_add_options() { … … 157 156 * 158 157 * @since 1.6.0 159 *160 158 */ 161 159 function bp_delete_options() { … … 185 183 * 186 184 * @since 1.6.0 187 *188 185 */ 189 186 function bp_setup_option_filters() { … … 490 487 * @since 2.3.0 491 488 * 492 * @param 489 * @param string $option Name of the option key. 493 490 * @return mixed Value, if found. 494 491 */ … … 754 751 * 755 752 * @since 1.6.0 756 *757 753 * 758 754 * @param bool|string $default Optional. Default: '0'. -
trunk/src/bp-core/bp-core-taxonomy.php
r10871 r10899 52 52 * @since 2.6.0 53 53 * 54 * @param string $taxonomy Taxonomy slug to check for. 54 55 * @return int 55 56 */ … … 62 63 * @since 2.6.0 63 64 * 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. 66 67 */ 67 68 return (int) apply_filters( 'bp_get_taxonomy_term_site_id', $site_id, $taxonomy ); -
trunk/src/bp-core/bp-core-template-loader.php
r10889 r10899 71 71 * 72 72 * @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 73 77 */ 74 78 function bp_get_asset_template_part( $slug, $name = null ) { … … 157 161 * @since 2.6.0 158 162 * 159 * @param stringRelative filename to search for.163 * @param string $filename Relative filename to search for. 160 164 * @return array|bool Array of asset data if one is located (includes absolute filepath and URI). 161 165 * Boolean false on failure. -
trunk/src/bp-core/bp-core-template.php
r10874 r10899 2400 2400 * Eg http://example.com/members/joe/profile/change-cover-image/ (or a subpage thereof). 2401 2401 * 2402 * @since 2402 * @since 2.4.0 2403 2403 * 2404 2404 * @return bool True if the current page is a user's profile edit cover image page. … … 3155 3155 * @since 2.4.3 3156 3156 * 3157 * @param array $bp_title_parts Current BuddyPress title parts3157 * @param array $bp_title_parts Current BuddyPress title parts. 3158 3158 * @return array 3159 3159 */ … … 3725 3725 * Prints the Recipient Salutation. 3726 3726 * 3727 * @since 3728 * 3729 * @param 3727 * @since 2.5.0 3728 * 3729 * @param array $settings Email Settings. 3730 3730 */ 3731 3731 function bp_email_the_salutation( $settings = array() ) { … … 3736 3736 * Gets the Recipient Salutation. 3737 3737 * 3738 * @since 3739 * 3740 * @param array$settings Email Settings.3738 * @since 2.5.0 3739 * 3740 * @param array $settings Email Settings. 3741 3741 * @return string The Recipient Salutation. 3742 3742 */ … … 3747 3747 * Filters The Recipient Salutation inside the Email Template. 3748 3748 * 3749 * @since 3749 * @since 2.5.0 3750 3750 * 3751 3751 * @param string $value The Recipient Salutation. -
trunk/src/bp-core/bp-core-theme-compatibility.php
r10836 r10899 320 320 * @since 2.4.0 321 321 * 322 * @param 323 * @param 322 * @param string $theme_id The theme id (eg: legacy). 323 * @param array $feature An associative array (eg: array( name => 'feature_name', 'settings' => array() )). 324 324 */ 325 325 function bp_set_theme_compat_feature( $theme_id, $feature = array() ) { … … 380 380 * @since 2.4.0 381 381 * 382 * @param 383 * @return object 382 * @param string $feature The feature (eg: cover_image). 383 * @return object The feature settings. 384 384 */ 385 385 function bp_get_theme_compat_feature( $feature = '' ) { … … 398 398 399 399 /** 400 * Setup the theme's features 400 * Setup the theme's features. 401 401 * 402 402 * Note: BP Legacy's buddypress-functions.php is not loaded in WP Administration … … 647 647 648 648 /** 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. 650 650 * 651 651 * @see https://bbpress.trac.wordpress.org/ticket/1973 -
trunk/src/bp-core/bp-core-update.php
r10825 r10899 140 140 * 141 141 * @since 1.6.0 142 *143 142 */ 144 143 function bp_version_bump() { … … 196 195 $switched_to_root_blog = false; 197 196 198 // Make sure the current blog is set to the root blog 197 // Make sure the current blog is set to the root blog. 199 198 if ( ! bp_is_root_blog() ) { 200 199 switch_to_blog( bp_get_root_blog_id() ); … … 219 218 bp_core_install(); 220 219 221 // 1.5.0220 // Version 1.5.0. 222 221 if ( $raw_db_version < 1801 ) { 223 222 bp_update_to_1_5(); … … 225 224 } 226 225 227 // 1.6.0226 // Version 1.6.0. 228 227 if ( $raw_db_version < 6067 ) { 229 228 bp_update_to_1_6(); 230 229 } 231 230 232 // 1.9.0231 // Version 1.9.0. 233 232 if ( $raw_db_version < 7553 ) { 234 233 bp_update_to_1_9(); 235 234 } 236 235 237 // 1.9.2236 // Version 1.9.2. 238 237 if ( $raw_db_version < 7731 ) { 239 238 bp_update_to_1_9_2(); 240 239 } 241 240 242 // 2.0.0241 // Version 2.0.0. 243 242 if ( $raw_db_version < 7892 ) { 244 243 bp_update_to_2_0(); 245 244 } 246 245 247 // 2.0.1246 // Version 2.0.1. 248 247 if ( $raw_db_version < 8311 ) { 249 248 bp_update_to_2_0_1(); 250 249 } 251 250 252 // 2.2.0251 // Version 2.2.0. 253 252 if ( $raw_db_version < 9181 ) { 254 253 bp_update_to_2_2(); 255 254 } 256 255 257 // 2.3.0256 // Version 2.3.0. 258 257 if ( $raw_db_version < 9615 ) { 259 258 bp_update_to_2_3(); 260 259 } 261 260 262 // 2.5.0261 // Version 2.5.0. 263 262 if ( $raw_db_version < 10440 ) { 264 263 bp_update_to_2_5(); … … 332 331 333 332 /** 334 * Remove unused metadata from database when upgrading from < 1.6. 333 * Remove unused metadata from database when upgrading from < 1.6.0. 335 334 * 336 335 * Database update methods based on version numbers. … … 381 380 382 381 /** 383 * Perform database updates for BP 1.9.2 382 * Perform database updates for BP 1.9.2. 384 383 * 385 384 * In 1.9, BuddyPress stopped registering its theme directory when it detected … … 441 440 * 442 441 * @since 2.0.1 443 *444 * @return void445 442 */ 446 443 function bp_update_to_2_0_1() { … … 540 537 * 541 538 * @since 2.2.0 542 *543 539 */ 544 540 function bp_cleanup_friendship_activities() { … … 556 552 * 557 553 * @internal Used internally to redirect BuddyPress to the about page on activation. 558 *559 554 */ 560 555 function bp_add_activation_redirect() { … … 625 620 * 626 621 * @since 1.6.0 627 *628 622 */ 629 623 function bp_activation() { … … 638 632 * Fires during the activation of BuddyPress. 639 633 * 640 * Use as of (1.6.0)634 * Use as of 1.6.0. 641 635 * 642 636 * @since 1.6.0 … … 644 638 do_action( 'bp_activation' ); 645 639 646 // @deprecated as of (1.6)640 // @deprecated as of 1.6.0 647 641 do_action( 'bp_loader_activate' ); 648 642 } … … 654 648 * 655 649 * @since 1.6.0 656 *657 650 */ 658 651 function bp_deactivation() { … … 672 665 * Fires during the deactivation of BuddyPress. 673 666 * 674 * Use as of (1.6.0)667 * Use as of 1.6.0. 675 668 * 676 669 * @since 1.6.0 … … 678 671 do_action( 'bp_deactivation' ); 679 672 680 // @deprecated as of (1.6)673 // @deprecated as of 1.6.0 681 674 do_action( 'bp_loader_deactivate' ); 682 675 } … … 688 681 * 689 682 * @since 1.6.0 690 *691 683 */ 692 684 function bp_uninstall() { -
trunk/src/bp-core/bp-core-wpabstraction.php
r10497 r10899 53 53 * @param string $option_name Option name to fetch. 54 54 * @param bool $default Whether or not default. 55 *56 55 * @return mixed 57 56 */ … … 73 72 * @param string $option_name Option name to add. 74 73 * @param mixed $option_value Option value to add. 75 *76 74 * @return mixed 77 75 */ … … 93 91 * @param string $option_name Option name to update. 94 92 * @param mixed $value Option value to update. 95 *96 93 * @return mixed 97 94 */ … … 112 109 * @param int $blog_id Blog ID to delete for. Not used. 113 110 * @param string $option_name Option name to delete. 114 *115 111 * @return mixed 116 112 */ … … 131 127 * @param mixed $new_blog New blog to switch to. Not used. 132 128 * @param null $deprecated Whether or not deprecated. Not used. 133 *134 129 * @return int 135 130 */ … … 166 161 * @param int $user_id ID of the user. Not used. 167 162 * @param bool $all Whether or not to return all. Not used. 168 *169 163 * @return false 170 164 */ … … 187 181 * @param string $value Value. Not used. 188 182 * @param null $deprecated Whether or not deprecated. Not used. 189 *190 183 * @return true 191 184 */ -
trunk/src/bp-core/classes/class-bp-admin.php
r10893 r10899 940 940 * @since 2.6.0 941 941 * 942 * @param 942 * @param array $columns Current column data. 943 943 * @return array 944 944 */ -
trunk/src/bp-core/classes/class-bp-attachment-avatar.php
r10825 r10899 62 62 * 63 63 * @since 2.3.0 64 *65 64 */ 66 65 public function set_upload_dir() { … … 82 81 * @since 2.3.0 83 82 * 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). 86 84 * @return array the file with extra errors if needed. 87 85 */ … … 110 108 * @since 2.3.0 111 109 * @since 2.4.0 Add the $ui_available_width parameter, to inform about the Avatar UI width. 112 *113 110 * 114 111 * @param string $file The absolute path to the file. -
trunk/src/bp-core/classes/class-bp-attachment.php
r10825 r10899 198 198 * @since 2.3.0 199 199 * 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. 204 203 * @return array On success, returns an associative array of file attributes. 205 204 * On failure, returns an array containing the error message … … 208 207 public function upload( $file, $upload_dir_filter = '', $time = null ) { 209 208 /** 210 * Upload action and the file input name are required parameters 209 * Upload action and the file input name are required parameters. 210 * 211 211 * @see BP_Attachment:__construct() 212 212 */ … … 321 321 * @since 2.3.0 322 322 * 323 * @param 323 * @param array $file The temporary file attributes (before it has been moved). 324 324 * @return array The file. 325 325 */ … … 346 346 * regarding to context 347 347 * 348 * @param 348 * @param array $upload_dir The original Uploads dir. 349 349 * @return array The upload directory data. 350 350 */ … … 523 523 * Get full data for an image 524 524 * 525 * @since 526 * 527 * @param 525 * @since 2.4.0 526 * 527 * @param string $file Absolute path to the uploaded image. 528 528 * @return bool|array An associate array containing the width, height and metadatas. 529 529 * False in case an important image attribute is missing. … … 575 575 * Filter here to add/remove/edit data to the image full data 576 576 * 577 * @since 577 * @since 2.4.0 578 578 * 579 * @param 579 * @param array $image_data An associate array containing the width, height and metadatas. 580 580 */ 581 581 return apply_filters( 'bp_attachments_get_image_data', $image_data ); … … 585 585 * Edit an image file to resize it or rotate it 586 586 * 587 * @since 587 * @since 2.4.0 588 588 * 589 589 * @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 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @since 7 * @since 2.6.0 8 8 */ 9 9 … … 57 57 * @since 2.6.0 58 58 * 59 * @param 59 * @param string $key The requested nav slug. 60 60 * @return bool True if the nav item is set, false otherwise. 61 61 */ … … 69 69 * @since 2.6.0 70 70 * 71 * @param 71 * @param string $key The requested nav slug. 72 72 * @return mixed The value corresponding to the requested nav item. 73 73 */ … … 85 85 * @since 2.6.0 86 86 * 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. 89 89 */ 90 90 public function __set( $key, $value ) { … … 101 101 * @since 2.6.0 102 102 * 103 * @param 103 * @param string $key The nav item slug to get. Optional. 104 104 * @return mixed An array of nav item, a single nav item, or null if none found. 105 105 */ … … 321 321 * @since 2.6.0 322 322 * 323 * @param 324 * @param 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. 325 325 * @return array The list of primary objects nav 326 326 */ … … 328 328 $params = wp_parse_args( $args, array( 'primary' => true ) ); 329 329 330 // This parameter is not overridable 330 // This parameter is not overridable. 331 331 if ( empty( $params['primary'] ) ) { 332 332 return false; … … 351 351 * @since 2.6.0 352 352 * 353 * @param 354 * @param 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. 355 355 * @return array The list of secondary objects nav 356 356 */ … … 358 358 $params = wp_parse_args( $args, array( 'parent_slug' => '' ) ); 359 359 360 // No need to search children if the parent is not set 360 // No need to search children if the parent is not set. 361 361 if ( empty( $params['parent_slug'] ) && empty( $params['secondary'] ) ) { 362 362 return false; … … 388 388 if ( $primary_nav_items ) { 389 389 foreach( $primary_nav_items as $key_nav => $primary_nav ) { 390 // Try to get the children 390 // Try to get the children. 391 391 $children = $this->get_secondary( array( 'parent_slug' => $primary_nav->slug, 'user_has_access' => true ) ); 392 392 -
trunk/src/bp-core/classes/class-bp-core-oembed-extension.php
r10861 r10899 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @since 2.6.0 7 8 */ 8 9 … … 72 73 * @since 2.6.0 73 74 * 75 * @param string $url URL to validate. 74 76 * @return int Your item ID 75 77 */ … … 81 83 * @since 2.6.0 82 84 * 83 * @param int$item_id Your item ID to do checks against.85 * @param int $item_id Your item ID to do checks against. 84 86 * @return array Should contain 'content', 'title', 'author_url', 'author_name' as array 85 87 * keys. 'author_url' and 'author_name' is optional; the rest are required. … … 95 97 * @since 2.6.0 96 98 * 97 * @param int$item_id Your item ID to do checks against.99 * @param int $item_id Your item ID to do checks against. 98 100 * @return string Fallback HTML you want to output. 99 101 */ … … 123 125 * 124 126 * @param int $item_id The item ID to do checks for. 125 * @return string126 127 */ 127 128 protected function set_iframe_title( $item_id ) {} … … 146 147 $url = bp_get_requested_url(); 147 148 148 // Remove querystring from bp_get_requested_url() 149 // Remove querystring from bp_get_requested_url(). 149 150 if ( false !== strpos( bp_get_requested_url(), '?' ) ) { 150 151 $url = substr( bp_get_requested_url(), 0, strpos( bp_get_requested_url(), '?' ) ); … … 240 241 * @since 2.6.0 241 242 * 242 * @param 243 * @param string $template File path to current embed template. 243 244 * @return string 244 245 */ … … 264 265 * 265 266 * @since 2.6.0 267 * 268 * @param string $slug Template slug. 269 * @param string $name Template name. 266 270 */ 267 271 public function content_buffer_start( $slug, $name ) { … … 281 285 * 282 286 * @since 2.6.0 287 * 288 * @param string $name Template name. 283 289 */ 284 290 public function content_buffer_end( $name ) { … … 319 325 * @since 2.6.0 320 326 * 321 * @param 327 * @param string $retval Current discovery links. 322 328 * @return string 323 329 */ … … 354 360 * @link http://oembed.com/ View the 'Response parameters' section for more details. 355 361 * 356 * @param 357 * @param 362 * @param array $item Custom oEmbed response data. 363 * @param int $width The requested width. 358 364 * @return array 359 365 */ … … 404 410 * @since 2.6.0 405 411 * 406 * @param 412 * @param WP_REST_Request $request Full data about the request. 407 413 * @return WP_Error|array oEmbed response data or WP_Error on failure. 408 414 */ … … 509 515 * @see bp_activity_embed_rest_route_callback() 510 516 * 511 * @param string $retval Current embed URL517 * @param string $retval Current embed URL. 512 518 * @return string 513 519 */ … … 521 527 522 528 // This is for the 'WordPress Embed' block 523 // @see bp_activity_embed_comments_button() 529 // @see bp_activity_embed_comments_button(). 524 530 if ( 'the_permalink' !== current_filter() ) { 525 531 $url = add_query_arg( 'embed', 'true', trailingslashit( $url ) ); … … 541 547 * @since 2.6.0 542 548 * 543 * @param string $retval Current embed HTML549 * @param string $retval Current embed HTML. 544 550 * @return string 545 551 */ … … 568 574 } 569 575 570 // Remove default <blockquote> 576 // Remove default <blockquote>. 571 577 $retval = substr( $retval, strpos( $retval, '</blockquote>' ) + 13 ); 572 578 … … 595 601 * @see add_oembed_discovery_links() 596 602 * 597 * @param string $retval Current oEmbed endpoint URL603 * @param string $retval Current oEmbed endpoint URL. 598 604 * @return string 599 605 */
Note: See TracChangeset
for help on using the changeset viewer.