Changeset 10108
- Timestamp:
- 09/13/2015 02:02:56 AM (10 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-actions.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Admin Actions. … … 19 18 */ 20 19 21 // Exit if accessed directly 20 // Exit if accessed directly. 22 21 defined( 'ABSPATH' ) || exit; 23 22 … … 63 62 * routine on that site. 64 63 * 65 * @since BuddyPress (1.7.0)64 * @since 1.7.0 66 65 * 67 66 * @param int $blog_id … … 84 83 * Fires the activation routine for a new site created in a multisite installation. 85 84 * 86 * @since BuddyPress (1.7.0)85 * @since 1.7.0 87 86 * 88 87 * @param int $blog_id ID of the blog being installed to. … … 104 103 * Piggy back admin_init action. 105 104 * 106 * @since BuddyPress (1.7.0)105 * @since 1.7.0 107 106 * @uses do_action() Calls 'bp_admin_init'. 108 107 */ … … 112 111 * Fires inside the bp_admin_init function. 113 112 * 114 * @since BuddyPress (1.6.0)113 * @since 1.6.0 115 114 */ 116 115 do_action( 'bp_admin_init' ); … … 120 119 * Piggy back admin_menu action. 121 120 * 122 * @since BuddyPress (1.7.0)121 * @since 1.7.0 123 122 * @uses do_action() Calls 'bp_admin_menu'. 124 123 */ … … 128 127 * Fires inside the bp_admin_menu function. 129 128 * 130 * @since BuddyPress (1.7.0)129 * @since 1.7.0 131 130 */ 132 131 do_action( 'bp_admin_menu' ); … … 136 135 * Piggy back admin_head action. 137 136 * 138 * @since BuddyPress (1.7.0)137 * @since 1.7.0 139 138 * @uses do_action() Calls 'bp_admin_head'. 140 139 */ … … 144 143 * Fires inside the bp_admin_head function. 145 144 * 146 * @since BuddyPress (1.6.0)145 * @since 1.6.0 147 146 */ 148 147 do_action( 'bp_admin_head' ); … … 152 151 * Piggy back admin_notices action. 153 152 * 154 * @since BuddyPress (1.7.0)153 * @since 1.7.0 155 154 * @uses do_action() Calls 'bp_admin_notices'. 156 155 */ … … 160 159 * Fires inside the bp_admin_notices function. 161 160 * 162 * @since BuddyPress (1.5.0)161 * @since 1.5.0 163 162 */ 164 163 do_action( 'bp_admin_notices' ); … … 168 167 * Piggy back admin_enqueue_scripts action. 169 168 * 170 * @since BuddyPress (1.7.0)169 * @since 1.7.0 171 170 * 172 171 * @uses do_action() Calls 'bp_admin_enqueue_scripts''. … … 180 179 * Fires inside the bp_admin_enqueue_scripts function. 181 180 * 182 * @since BuddyPress (1.7.0)181 * @since 1.7.0 183 182 * 184 183 * @param string $hook_suffix The current admin page, passed to admin_enqueue_scripts. … … 190 189 * Dedicated action to register BuddyPress importers. 191 190 * 192 * @since BuddyPress (1.7.0)191 * @since 1.7.0 193 192 * @uses do_action() Calls 'bp_admin_notices'. 194 193 */ … … 200 199 * Used to register a BuddyPress importer. 201 200 * 202 * @since BuddyPress (1.7.0)201 * @since 1.7.0 203 202 */ 204 203 do_action( 'bp_register_importers' ); … … 208 207 * Dedicated action to register admin styles. 209 208 * 210 * @since BuddyPress (1.7.0)209 * @since 1.7.0 211 210 * @uses do_action() Calls 'bp_admin_notices'. 212 211 */ … … 216 215 * Fires inside the bp_register_admin_style function. 217 216 * 218 * @since BuddyPress (1.7.0)217 * @since 1.7.0 219 218 */ 220 219 do_action( 'bp_register_admin_style' ); … … 224 223 * Dedicated action to register admin settings. 225 224 * 226 * @since BuddyPress (1.7.0)225 * @since 1.7.0 227 226 * @uses do_action() Calls 'bp_register_admin_settings'. 228 227 */ … … 232 231 * Fires inside the bp_register_admin_settings function. 233 232 * 234 * @since BuddyPress (1.6.0)233 * @since 1.6.0 235 234 */ 236 235 do_action( 'bp_register_admin_settings' ); -
trunk/src/bp-core/admin/bp-core-admin-components.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Admin Component Functions. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 15 14 * 16 15 * @package BuddyPress 17 * @since BuddyPress (1.6.0)16 * @since 1.6.0 18 17 * @uses bp_core_admin_component_options() 19 18 */ … … 45 44 * 46 45 * @package BuddyPress 47 * @since BuddyPress (1.6.0)46 * @since 1.6.0 48 47 * @todo Use settings API 49 48 */ … … 56 55 * Filters the array of available components. 57 56 * 58 * @since BuddyPress (1.5.0)57 * @since 1.5.0 59 58 * 60 59 * @param mixed $value Active components. … … 238 237 * Handle saving the Component settings. 239 238 * 240 * @since BuddyPress (1.6.0)239 * @since 1.6.0 241 240 * @todo Use settings API when it supports saving network settings 242 241 */ … … 297 296 * ones. 298 297 * 299 * @since BuddyPress (1.7.0)298 * @since 1.7.0 300 299 * 301 300 * @param array $submitted This is the array of component settings coming from the POST … … 343 342 * well as to do some processing on settings data submitted from those screens. 344 343 * 345 * @since BuddyPress (1.7.0)344 * @since 1.7.0 346 345 * 347 346 * @param string $type 'all', 'optional', 'retired', 'required'. … … 437 436 * Filters the list of component information. 438 437 * 439 * @since BuddyPress (2.0.0)438 * @since 2.0.0 440 439 * 441 440 * @param array $components Array of component information. -
trunk/src/bp-core/admin/bp-core-admin-functions.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Common Admin Functions. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 33 32 * @global array $_registered_pages 34 33 * @global array $submenu 35 * @since BuddyPress (1.6.0)34 * @since 1.6.0 36 35 */ 37 36 function bp_core_admin_backpat_menu() { … … 72 71 * @global string $plugin_page 73 72 * @global array $submenu 74 * @since BuddyPress (1.6.0)73 * @since 1.6.0 75 74 */ 76 75 function bp_core_modify_admin_menu_highlight() { … … 94 93 * 95 94 * @see bp_core_admin_backpat_menu() 96 * @since BuddyPress (1.6.0)95 * @since 1.6.0 97 96 * @todo Add convenience links into the markup once new positions are finalised. 98 97 */ … … 120 119 * boxes. 121 120 * 122 * @since BuddyPress (1.5.0)121 * @since 1.5.0 123 122 * 124 123 * @uses bp_current_user_can() to check current user permissions before showing the notices. … … 165 164 * loaded in time. 166 165 * 167 * @since BuddyPress (1.5.0)166 * @since 1.5.0 168 167 * 169 168 * @param string $notice The notice you are adding to the queue. … … 200 199 * @global WPDB $wpdb WordPress DB object 201 200 * @global WP_Rewrite $wp_rewrite 202 * @since BuddyPress (1.2.0)201 * @since 1.2.0 203 202 */ 204 203 function bp_core_activation_notice() { … … 330 329 * Redirect user to BuddyPress's What's New page on activation. 331 330 * 332 * @since BuddyPress (1.7.0)331 * @since 1.7.0 333 332 * 334 333 * @internal Used internally to redirect BuddyPress to the about page on activation. … … 371 370 * Output the tabs in the admin area. 372 371 * 373 * @since BuddyPress (1.5.0)372 * @since 1.5.0 374 373 * 375 374 * @param string $active_tab Name of the tab that is active. Optional. … … 383 382 * Filters the admin tabs to be displayed. 384 383 * 385 * @since BuddyPress (1.9.0)384 * @since 1.9.0 386 385 * 387 386 * @param array $value Array of tabs to output to the admin area. … … 401 400 * Fires after the output of tabs for the admin area. 402 401 * 403 * @since BuddyPress (1.5.0)402 * @since 1.5.0 404 403 */ 405 404 do_action( 'bp_admin_tabs' ); … … 409 408 * Get the data for the tabs in the admin area. 410 409 * 411 * @since BuddyPress (2.2.0)410 * @since 2.2.0 412 411 * 413 412 * @param string $active_tab Name of the tab that is active. Optional. … … 447 446 * Filters the tab data used in our wp-admin screens. 448 447 * 449 * @since BuddyPress (2.2.0)448 * @since 2.2.0 450 449 * 451 450 * @param array $tabs Tab data. … … 459 458 * adds contextual help to BuddyPress admin pages. 460 459 * 461 * @since BuddyPress (1.7.0)460 * @since 1.7.0 462 461 * @todo Make this part of the BP_Component class and split into each component 463 462 * … … 551 550 * renders contextual help content to contextual help tabs. 552 551 * 553 * @since BuddyPress (1.7.0)552 * @since 1.7.0 554 553 * 555 554 * @param string $tab … … 594 593 * Add a separator to the WordPress admin menus. 595 594 * 596 * @since BuddyPress (1.7.0)595 * @since 1.7.0 597 596 * 598 597 * @uses bp_current_user_can() To check users capability on root blog. … … 629 628 * Tell WordPress we have a custom menu order. 630 629 * 631 * @since BuddyPress (1.7.0)630 * @since 1.7.0 632 631 * @uses bp_current_user_can() To check users capability on root blog. 633 632 * … … 649 648 * Move our custom separator above our custom post types. 650 649 * 651 * @since BuddyPress (1.7.0)650 * @since 1.7.0 652 651 * @uses bp_current_user_can() To check users capability on root blog. 653 652 * … … 672 671 * Filters the custom admin menus. 673 672 * 674 * @since BuddyPress (1.7.0)673 * @since 1.7.0 675 674 * 676 675 * @param array $value Empty array. … … 721 720 * reconciles the two values and returns a single action being performed. 722 721 * 723 * @since BuddyPress (1.7.0)722 * @since 1.7.0 724 723 * 725 724 * @return string … … 742 741 * Register meta box and associated JS for BuddyPress WP Nav Menu. 743 742 * 744 * @since BuddyPress (1.9.0)743 * @since 1.9.0 745 744 */ 746 745 function bp_admin_wp_nav_menu_meta_box() { … … 757 756 * Build and populate the BuddyPress accordion on Appearance > Menus. 758 757 * 759 * @since BuddyPress (1.9.0)758 * @since 1.9.0 760 759 * 761 760 * @global $nav_menu_selected_id … … 823 822 * Note: These restrictions are only enforced if JavaScript is enabled. 824 823 * 825 * @since BuddyPress (1.9.0)824 * @since 1.9.0 826 825 */ 827 826 function bp_admin_wp_nav_menu_restrict_items() { … … 844 843 * Add "Mark as Spam/Ham" button to user row actions. 845 844 * 846 * @since BuddyPress (2.0.0)845 * @since 2.0.0 847 846 * 848 847 * @param array $actions User row action links. … … 890 889 * Catch requests to mark individual users as spam/ham from users.php. 891 890 * 892 * @since BuddyPress (2.0.0)891 * @since 2.0.0 893 892 */ 894 893 function bp_core_admin_user_manage_spammers() { … … 945 944 * Inline script that adds the 'site-spammed' class to spammed users. 946 945 * 947 * @since BuddyPress (2.0.0)946 * @since 2.0.0 948 947 */ 949 948 function bp_core_admin_user_spammed_js() { -
trunk/src/bp-core/admin/bp-core-admin-schema.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress DB schema. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Get the DB schema to use for BuddyPress components. 15 14 * 16 * @since BuddyPress (1.1.0)15 * @since 1.1.0 17 16 * 18 17 * @global $wpdb $wpdb … … 33 32 * routines on, typically the first time a component is activated in Settings. 34 33 * 35 * @since BuddyPress (1.0.0)34 * @since 1.0.0 36 35 * 37 36 * @param array|bool $active_components Components to install. … … 88 87 * Install database tables for the Notifications component. 89 88 * 90 * @since BuddyPress (1.0.0)89 * @since 1.0.0 91 90 * 92 91 * @uses bp_core_set_charset() … … 132 131 * Install database tables for the Activity component. 133 132 * 134 * @since BuddyPress (1.0.0)133 * @since 1.0.0 135 134 * 136 135 * @uses bp_core_set_charset() … … 185 184 * Install database tables for the Notifications component. 186 185 * 187 * @since BuddyPress (1.0.0)186 * @since 1.0.0 188 187 * 189 188 * @uses bp_core_set_charset() … … 213 212 * Install database tables for the Groups component. 214 213 * 215 * @since BuddyPress (1.0.0)214 * @since 1.0.0 216 215 * 217 216 * @uses bp_core_set_charset() … … 273 272 * Install database tables for the Messages component. 274 273 * 275 * @since BuddyPress (1.0.0)274 * @since 1.0.0 276 275 * 277 276 * @uses bp_core_set_charset() … … 333 332 * Install database tables for the Profiles component. 334 333 * 335 * @since BuddyPress (1.0.0)334 * @since 1.0.0 336 335 * 337 336 * @uses bp_core_set_charset() … … 423 422 * Install database tables for the Sites component. 424 423 * 425 * @since BuddyPress (1.0.0)424 * @since 1.0.0 426 425 * 427 426 * @uses bp_core_set_charset() … … 459 458 * Install the signups table. 460 459 * 461 * @since BuddyPress (2.0.0)460 * @since 2.0.0 462 461 * 463 462 * @global $wpdb … … 503 502 * own sign-ups table; Eg: Gravity Forms User Registration Add On. 504 503 * 505 * @since BuddyPress (2.0.1)504 * @since 2.0.1 506 505 * 507 506 * @see pre_schema_upgrade() -
trunk/src/bp-core/admin/bp-core-admin-settings.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Admin Settings. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Main settings section description for the settings page. 15 14 * 16 * @since BuddyPress (1.6.0)15 * @since 1.6.0 17 16 */ 18 17 function bp_admin_setting_callback_main_section() { } … … 21 20 * Admin bar for logged out users setting field. 22 21 * 23 * @since BuddyPress (1.6.0)22 * @since 1.6.0 24 23 * 25 24 * @uses bp_form_option() To output the option value. … … 37 36 * Allow members to delete their accounts setting field. 38 37 * 39 * @since BuddyPress (1.6.0)38 * @since 1.6.0 40 39 * 41 40 * @uses checked() To display the checked attribute. … … 55 54 * Groups settings section description for the settings page. 56 55 * 57 * @since BuddyPress (1.6.0)56 * @since 1.6.0 58 57 */ 59 58 function bp_admin_setting_callback_activity_section() { } … … 62 61 * Allow Akismet setting field. 63 62 * 64 * @since BuddyPress (1.6.0)63 * @since 1.6.0 65 64 * 66 65 * @uses checked() To display the checked attribute. … … 78 77 * Allow activity comments on blog posts and forum posts. 79 78 * 80 * @since BuddyPress (1.6.0)79 * @since 1.6.0 81 80 */ 82 81 function bp_admin_setting_callback_blogforum_comments() { … … 92 91 * Allow Heartbeat to refresh activity stream. 93 92 * 94 * @since BuddyPress (2.0.0)93 * @since 2.0.0 95 94 */ 96 95 function bp_admin_setting_callback_heartbeat() { … … 110 109 * function to flip the boolean before saving the intval. 111 110 * 112 * @since BuddyPress (1.6.0)111 * @since 1.6.0 113 112 * 114 113 * @param bool $value … … 125 124 * Profile settings section description for the settings page. 126 125 * 127 * @since BuddyPress (1.6.0)126 * @since 1.6.0 128 127 */ 129 128 function bp_admin_setting_callback_xprofile_section() { } … … 132 131 * Enable BP->WP profile syncing field. 133 132 * 134 * @since BuddyPress (1.6.0)133 * @since 1.6.0 135 134 * 136 135 * @uses bp_form_option() To output the option value. … … 148 147 * Allow members to upload avatars field. 149 148 * 150 * @since BuddyPress (1.6.0)149 * @since 1.6.0 151 150 * 152 151 * @uses checked() To display the checked attribute. … … 166 165 * Groups settings section description for the settings page. 167 166 * 168 * @since BuddyPress (1.6.0)167 * @since 1.6.0 169 168 */ 170 169 function bp_admin_setting_callback_groups_section() { } … … 173 172 * Allow all users to create groups field. 174 173 * 175 * @since BuddyPress (1.6.0)174 * @since 1.6.0 176 175 * 177 176 * @uses checked() To display the checked attribute. … … 190 189 * 'Enable group avatars' field markup. 191 190 * 192 * @since BuddyPress (2.3.0)191 * @since 2.3.0 193 192 */ 194 193 function bp_admin_setting_callback_group_avatar_uploads() { … … 204 203 * Forums settings section description for the settings page. 205 204 * 206 * @since BuddyPress (1.6.0)205 * @since 1.6.0 207 206 */ 208 207 function bp_admin_setting_callback_bbpress_section() { } … … 211 210 * bb-config.php location field. 212 211 * 213 * @since BuddyPress (1.6.0)212 * @since 1.6.0 214 213 * @uses checked() To display the checked attribute. 215 214 * @uses bp_get_option() To get the config location. … … 240 239 * The main settings page 241 240 * 242 * @since BuddyPress (1.6.0)241 * @since 1.6.0 243 242 * 244 243 * @uses screen_icon() To display the screen icon. … … 277 276 * Save our settings. 278 277 * 279 * @since BuddyPress (1.6.0)278 * @since 1.6.0 280 279 */ 281 280 function bp_core_admin_settings_save() { … … 324 323 * Output settings API option. 325 324 * 326 * @since BuddyPress (1.6.0)325 * @since 1.6.0 327 326 * 328 327 * @uses bp_get_bp_form_option() … … 338 337 * Return settings API option 339 338 * 340 * @since BuddyPress (1.6.0)339 * @since 1.6.0 341 340 * 342 341 * @uses bp_get_option() … … 361 360 * Filters the slug value in the form field. 362 361 * 363 * @since BuddyPress (1.6.0)362 * @since 1.6.0 364 363 * 365 364 * @param string $value Value being returned for the requested option. … … 377 376 * Filters the settings API option. 378 377 * 379 * @since BuddyPress (1.6.0)378 * @since 1.6.0 380 379 * 381 380 * @param string $value Value being returned for the requested option. -
trunk/src/bp-core/admin/bp-core-admin-slugs.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Admin Slug Functions. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Renders the page mapping admin panel. 15 14 * 16 * @since BuddyPress (1.6.0)15 * @since 1.6.0 17 16 * @todo Use settings API 18 17 * @uses bp_core_admin_component_options() … … 45 44 * 46 45 * @package BuddyPress 47 * @since BuddyPress (1.6.0)46 * @since 1.6.0 48 47 * @todo Use settings API 49 48 */ … … 76 75 * Filters the loaded components needing directory page association to a WordPress page. 77 76 * 78 * @since BuddyPress (1.5.0)77 * @since 1.5.0 79 78 * 80 79 * @param array $directory_pages Array of available components to set associations for. … … 130 129 * Allows plugins to add their own directory associations. 131 130 * 132 * @since BuddyPress (1.5.0)131 * @since 1.5.0 133 132 */ 134 133 do_action( 'bp_active_external_directories' ); ?> … … 152 151 * Filters the default static pages for BuddyPress setup. 153 152 * 154 * @since BuddyPress (1.6.0)153 * @since 1.6.0 155 154 * 156 155 * @param array $static_pages Array of static default static pages. … … 203 202 * Fires after the display of default static pages for BuddyPress setup. 204 203 * 205 * @since BuddyPress (1.5.0)204 * @since 1.5.0 206 205 */ 207 206 do_action( 'bp_active_external_pages' ); ?> … … 217 216 * Handle saving of the BuddyPress slugs. 218 217 * 219 * @since BuddyPress (1.6.0)218 * @since 1.6.0 220 219 * @todo Use settings API 221 220 */ -
trunk/src/bp-core/admin/bp-core-admin-tools.php
r10024 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Tools panel. 5 4 * 6 * @since BuddyPress (2.0.0) 7 */ 5 * @since 2.0.0 6 * 7 * @package BuddyPress 8 * @subpackage Core 9 */ 10 11 // Exit if accessed directly. 12 defined( 'ABSPATH' ) || exit; 8 13 9 14 /** 10 15 * Render the BuddyPress Tools page. 11 16 * 12 * @since BuddyPress (2.0.0)17 * @since 2.0.0 13 18 */ 14 19 function bp_core_admin_tools() { … … 58 63 * Handle the processing and feedback of the admin tools page. 59 64 * 60 * @since BuddyPress (2.0.0)65 * @since 2.0.0 61 66 */ 62 67 function bp_admin_repair_handler() { … … 148 153 * Filters the array of the repair list. 149 154 * 150 * @since BuddyPress (2.0.0)155 * @since 2.0.0 151 156 * 152 157 * @param array $repair_list Array of values for the Repair list options. … … 158 163 * Recalculate friend counts for each user. 159 164 * 160 * @since BuddyPress (2.0.0)165 * @since 2.0.0 161 166 * 162 167 * @return array … … 216 221 * Recalculate group counts for each user. 217 222 * 218 * @since BuddyPress (2.0.0)223 * @since 2.0.0 219 224 * 220 225 * @return array … … 263 268 * Recalculate user-to-blog relationships and useful blog meta data. 264 269 * 265 * @since BuddyPress (2.1.0)270 * @since 2.1.0 266 271 * 267 272 * @return array … … 295 300 * Recalculate the total number of active site members. 296 301 * 297 * @since BuddyPress (2.0.0)302 * @since 2.0.0 298 303 */ 299 304 function bp_admin_repair_count_members() { … … 309 314 * Re-runs the migration from usermeta introduced in BP 2.0. 310 315 * 311 * @since BuddyPress (2.0.0)316 * @since 2.0.0 312 317 */ 313 318 function bp_admin_repair_last_activity() { … … 320 325 * Assemble admin notices relating success/failure of repair processes. 321 326 * 322 * @since BuddyPress (2.0.0)327 * @since 2.0.0 323 328 * 324 329 * @param string $message Feedback message. … … 367 372 * BuddyPress tools. This displays the default content. 368 373 * 369 * @since BuddyPress (2.0.0)374 * @since 2.0.0 370 375 */ 371 376 function bp_core_admin_available_tools_page() { … … 379 384 * Fires inside the markup used to display the Available Tools page. 380 385 * 381 * @since BuddyPress (2.0.0)386 * @since 2.0.0 382 387 */ 383 388 do_action( 'bp_network_tool_box' ); ?> … … 390 395 * Render an introduction of BuddyPress tools on Available Tools page. 391 396 * 392 * @since BuddyPress (2.0.0)397 * @since 2.0.0 393 398 */ 394 399 function bp_core_admin_available_tools_intro() { -
trunk/src/bp-core/bp-core-admin.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * Main BuddyPress Admin Class. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 13 12 if ( !class_exists( 'BP_Admin' ) ) : 13 14 14 /** 15 15 * Load BuddyPress plugin admin area. … … 19 19 * @todo Break this apart into each applicable Component 20 20 * 21 * @since BuddyPress (1.6.0)21 * @since 1.6.0 22 22 */ 23 23 class BP_Admin { … … 76 76 * The main BuddyPress admin loader. 77 77 * 78 * @since BuddyPress (1.6.0)78 * @since 1.6.0 79 79 * 80 80 * @uses BP_Admin::setup_globals() Setup the globals needed. … … 92 92 * 93 93 * @access private 94 * @since BuddyPress (1.6.0)94 * @since 1.6.0 95 95 */ 96 96 private function setup_globals() { … … 114 114 * Include required files. 115 115 * 116 * @since BuddyPress (1.6.0)116 * @since 1.6.0 117 117 * @access private 118 118 */ … … 130 130 * 131 131 * @access private 132 * @since BuddyPress (1.6.0)132 * @since 1.6.0 133 133 * 134 134 * @uses add_action() To add various actions. … … 180 180 * Add the navigational menu elements. 181 181 * 182 * @since BuddyPress (1.6.0)182 * @since 1.6.0 183 183 * 184 184 * @uses add_management_page() To add the Recount page in Tools section. … … 305 305 * Register the settings. 306 306 * 307 * @since BuddyPress (1.6.0)307 * @since 1.6.0 308 308 * 309 309 * @uses add_settings_section() To add our own settings section. … … 401 401 * Add a link to BuddyPress About page to the admin bar. 402 402 * 403 * @since BuddyPress (1.9.0)403 * @since 1.9.0 404 404 * 405 405 * @param WP_Admin_Bar $wp_admin_bar As passed to 'admin_bar_menu'. … … 419 419 * Add Settings link to plugins area. 420 420 * 421 * @since BuddyPress (1.6.0)421 * @since 1.6.0 422 422 * 423 423 * @param array $links Links array in which we would prepend our link. … … 443 443 * Add some general styling to the admin area. 444 444 * 445 * @since BuddyPress (1.6.0)445 * @since 1.6.0 446 446 */ 447 447 public function admin_head() { … … 462 462 * Add some general styling to the admin area. 463 463 * 464 * @since BuddyPress (1.6.0)464 * @since 1.6.0 465 465 */ 466 466 public function enqueue_scripts() { … … 472 472 * Filters the BuddyPress Core Admin CSS file path. 473 473 * 474 * @since BuddyPress (1.6.0)474 * @since 1.6.0 475 475 * 476 476 * @param string $file File path for the admin CSS. … … 490 490 * Output the about screen. 491 491 * 492 * @since BuddyPress (1.7.0)492 * @since 1.7.0 493 493 */ 494 494 public function about_screen() { … … 628 628 * want to leverage api.wordpress.org eventually. 629 629 * 630 * @since BuddyPress (1.7.0)630 * @since 1.7.0 631 631 */ 632 632 public function credits_screen() { … … 778 778 * Output welcome text and badge for What's New and Credits pages. 779 779 * 780 * @since BuddyPress (2.2.0)780 * @since 2.2.0 781 781 */ 782 782 public static function welcome_text() { … … 802 802 * Output tab navigation for `What's New` and `Credits` pages. 803 803 * 804 * @since BuddyPress (2.2.0)804 * @since 2.2.0 805 805 * @param string $tab 806 806 */ … … 826 826 * @see bp_do_activation_redirect() 827 827 * 828 * @since BuddyPress (2.2.0)828 * @since 2.2.0 829 829 * 830 830 * @return bool … … 837 837 * Return a user-friendly version-number string, for use in translations. 838 838 * 839 * @since BuddyPress (2.2.0)839 * @since 2.2.0 840 840 * 841 841 * @return string … … 870 870 * Setup BuddyPress Admin. 871 871 * 872 * @since BuddyPress (1.6.0)872 * @since 1.6.0 873 873 * 874 874 * @uses BP_Admin -
trunk/src/bp-core/bp-core-adminbar.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Core Toolbar. … … 10 9 */ 11 10 12 // Exit if accessed directly 11 // Exit if accessed directly. 13 12 defined( 'ABSPATH' ) || exit; 14 13 … … 16 15 * Add the secondary BuddyPress area to the my-account menu. 17 16 * 18 * @since BuddyPress (1.6.0)17 * @since 1.6.0 19 18 * 20 19 * @global WP_Admin_Bar $wp_admin_bar … … 53 52 * Handle the Toolbar/BuddyBar business. 54 53 * 55 * @since BuddyPress (1.2.0)54 * @since 1.2.0 56 55 * 57 56 * @global string $wp_version … … 103 102 * the `bp_init` action in `bp-core-actions.php`. 104 103 * 105 * @since BuddyPress (1.5.0)104 * @since 1.5.0 106 105 */ 107 106 function bp_core_load_admin_bar_css() { … … 113 112 * Enqueue supplemental WordPress Toolbar styling. 114 113 * 115 * @since BuddyPress (2.1.0)114 * @since 2.1.0 116 115 * 117 116 * @see bp_core_register_common_styles() -
trunk/src/bp-core/bp-core-attachments.php
r10091 r10108 17 17 * match with our needs. 18 18 * 19 * @since BuddyPress (2.3.0)19 * @since 2.3.0 20 20 * 21 21 * @return bool True if WordPress is 3.9+, false otherwise. … … 28 28 * Get the BuddyPress Plupload settings. 29 29 * 30 * @since BuddyPress (2.3.0)30 * @since 2.3.0 31 31 * 32 32 * @return array list of BuddyPress Plupload settings. … … 86 86 * Builds localization strings for the BuddyPress Uploader scripts. 87 87 * 88 * @since BuddyPress (2.3.0)88 * @since 2.3.0 89 89 * 90 90 * @return array Plupload default localization strings. … … 125 125 * to set specific script data. 126 126 * 127 * @since BuddyPress (2.3.0)127 * @since 2.3.0 128 128 * 129 129 * @param string $class name of the class extending BP_Attachment (eg: BP_Attachment_Avatar). … … 244 244 * Use this filter to add a navigation to a custom tool to set the object's avatar. 245 245 * 246 * @since BuddyPress (2.3.0)246 * @since 2.3.0 247 247 * 248 248 * @param array $avatar_nav An associative array of available nav items where each item is an array organized this way: … … 300 300 * to avoid the scripts to be loaded more than once. 301 301 * 302 * @since BuddyPress (2.3.0)302 * @since 2.3.0 303 303 */ 304 304 do_action( 'bp_attachments_enqueue_scripts' ); … … 308 308 * Check the current user's capability to edit an avatar for a given object. 309 309 * 310 * @since BuddyPress (2.3.0)310 * @since 2.3.0 311 311 * 312 312 * @param string $capability The capability to check. … … 353 353 * Send a JSON response back to an Ajax upload request. 354 354 * 355 * @since BuddyPress (2.3.0)355 * @since 2.3.0 356 356 * 357 357 * @param bool $success True for a success, false otherwise. … … 385 385 * Get an Attachment template part. 386 386 * 387 * @since BuddyPress (2.3.0)387 * @since 2.3.0 388 388 * 389 389 * @param string $slug Template part slug. eg 'uploader' for 'uploader.php'. -
trunk/src/bp-core/bp-core-avatars.php
r10041 r10108 4 4 * 5 5 * @package BuddyPress 6 * @subpackage Core 6 7 */ 7 8 … … 50 51 * Set up global variables related to avatars. 51 52 * 52 * @since BuddyPress (1.5.0)53 * @since 1.5.0 53 54 */ 54 55 function bp_core_set_avatar_globals() { … … 92 93 * Fires at the end of the core avatar globals setup. 93 94 * 94 * @since BuddyPress (1.5.0)95 * @since 1.5.0 95 96 */ 96 97 do_action( 'bp_core_set_avatar_globals' ); … … 237 238 * Filters the ID of the item being requested. 238 239 * 239 * @since BuddyPress (1.1.0)240 * @since 1.1.0 240 241 * 241 242 * @param string $value ID of avatar item being requested. … … 278 279 * Filters the avatar directory to use. 279 280 * 280 * @since BuddyPress (1.1.0)281 * @since 1.1.0 281 282 * 282 283 * @param string $value Name of the subdirectory where the requested avatar should be found. … … 314 315 * Filters the alt attribute value to be applied to avatar. 315 316 * 316 * @since BuddyPress (1.5.0)317 * @since 1.5.0 317 318 * 318 319 * @param string $value alt to be applied to avatar. … … 339 340 * Filters the title attribute value to be applied to avatar. 340 341 * 341 * @since BuddyPress (1.5.0)342 * @since 1.5.0 342 343 * 343 344 * @param string $value Title to be applied to avatar. … … 358 359 * Filters the ID attribute to be applied to avatar. 359 360 * 360 * @since BuddyPress (2.2.0)361 * @since 2.2.0 361 362 * 362 363 * @param string $value ID to be applied to avatar. … … 394 395 * Filters the classes to be applied to the avatar. 395 396 * 396 * @since BuddyPress (1.6.0)397 * @since 1.6.0 397 398 * 398 399 * @param array|string $value Class(es) to be applied to the avatar. … … 431 432 * Filters the avatar folder directory URL. 432 433 * 433 * @since BuddyPress (1.1.0)434 * @since 1.1.0 434 435 * 435 436 * @param string $value Path to the avatar folder URL. … … 443 444 * Filters the avatar folder directory path. 444 445 * 445 * @since BuddyPress (1.1.0)446 * @since 1.1.0 446 447 * 447 448 * @param string $value Path to the avatar folder directory. … … 518 519 * Filters an avatar URL wrapped in an <img> element. 519 520 * 520 * @since BuddyPress (1.1.0)521 * @since 1.1.0 521 522 * 522 523 * @param string $value Full <img> element for an avatar. … … 538 539 * Filters a locally uploaded avatar URL. 539 540 * 540 * @since BuddyPress (1.2.5)541 * @since 1.2.5 541 542 * 542 543 * @param string $avatar_url URL for a locally uploaded avatar. … … 551 552 * Filters whether or not to skip Gravatar check. 552 553 * 553 * @since BuddyPress (1.5.0)554 * @since 1.5.0 554 555 * 555 556 * @param bool $value Whether or not to skip Gravatar. … … 566 567 * Filters the Mystery person avatar src value. 567 568 * 568 * @since BuddyPress (1.2.0)569 * @since 1.2.0 569 570 * 570 571 * @param string $value Avatar value. … … 590 591 * Filters the Gravatar email to use. 591 592 * 592 * @since BuddyPress (1.1.0)593 * @since 1.1.0 593 594 * 594 595 * @param string $value Email to use in Gravatar request. … … 601 602 * Filters the Gravatar URL path. 602 603 * 603 * @since BuddyPress (1.0.2)604 * @since 1.0.2 604 605 * 605 606 * @param string $value Gravatar URL path. … … 621 622 * This is a variable filter dependent on the avatar type being requested. 622 623 * 623 * @since BuddyPress (1.5.0)624 * @since 1.5.0 624 625 * 625 626 * @param string $value Default avatar for non-gravatar requests. … … 714 715 * Fires after deleting an existing avatar. 715 716 * 716 * @since BuddyPress (1.1.0)717 * @since 1.1.0 717 718 * 718 719 * @param array $args Array of arguments used for avatar deletion. … … 726 727 * Ajax delete an avatar for a given object and item id. 727 728 * 728 * @since BuddyPress (2.3.0)729 * @since 2.3.0 729 730 * 730 731 * @return string|null A json object containing success data if the avatar was deleted … … 802 803 * If you want to override this function, make sure you return false. 803 804 * 804 * @since BuddyPress (1.2.4)805 * @since 1.2.4 805 806 * 806 807 * @param bool $value Whether or not to crop. … … 860 861 * Ajax upload an avatar. 861 862 * 862 * @since BuddyPress (2.3.0)863 * @since 2.3.0 863 864 * 864 865 * @return string|null A json object containing success data if the upload succeeded … … 928 929 * Filter here to deal with other components. 929 930 * 930 * @since BuddyPress (2.3.0)931 * @since 2.3.0 931 932 * 932 933 * @var array $bp_params the BuddyPress Ajax parameters. … … 1009 1010 * Handle avatar webcam capture. 1010 1011 * 1011 * @since BuddyPress (2.3.0)1012 * @since 2.3.0 1012 1013 * 1013 1014 * @param string $data Base64 encoded image. … … 1033 1034 * Filters the Avatar folder directory. 1034 1035 * 1035 * @since BuddyPress (2.3.0)1036 * @since 2.3.0 1036 1037 * 1037 1038 * @param string $avatar_dir Directory for storing avatars. … … 1060 1061 * Fires if the new avatar was successfully captured. 1061 1062 * 1062 * @since BuddyPress (2.3.0)1063 * @since 2.3.0 1063 1064 */ 1064 1065 do_action( 'xprofile_avatar_uploaded' ); … … 1121 1122 * If you want to override this function, make sure you return false. 1122 1123 * 1123 * @since BuddyPress (1.2.4)1124 * @since 1.2.4 1124 1125 * 1125 1126 * @param bool $value Whether or not to crop. … … 1145 1146 * Ajax set an avatar for a given object and item id. 1146 1147 * 1147 * @since BuddyPress (2.3.0)1148 * @since 2.3.0 1148 1149 * 1149 1150 * @return string|null A json object containing success data if the crop/capture succeeded … … 1356 1357 * Get allowed avatar types. 1357 1358 * 1358 * @since BuddyPress (2.3.0)1359 * @since 2.3.0 1359 1360 */ 1360 1361 function bp_core_get_allowed_avatar_types() { … … 1364 1365 * Filters the list of allowed image types. 1365 1366 * 1366 * @since BuddyPress (2.3.0)1367 * @since 2.3.0 1367 1368 * 1368 1369 * @param array $allowed_types List of image types. … … 1382 1383 * Get allowed avatar mime types. 1383 1384 * 1384 * @since BuddyPress (2.3.0)1385 * @since 2.3.0 1385 1386 */ 1386 1387 function bp_core_get_allowed_avatar_mimes() { … … 1422 1423 * Fetch data from the BP root blog's upload directory. 1423 1424 * 1424 * @since BuddyPress (1.8.0)1425 * @since 1.8.0 1425 1426 * 1426 1427 * @param string $type The variable we want to return from the $bp->avatars object. … … 1509 1510 * Filters the absolute upload path for the WP installation. 1510 1511 * 1511 * @since BuddyPress (1.2.0)1512 * @since 1.2.0 1512 1513 * 1513 1514 * @param string $value Absolute upload path for the WP installation. … … 1528 1529 * Filters the raw base URL for root site upload location. 1529 1530 * 1530 * @since BuddyPress (1.2.0)1531 * @since 1.2.0 1531 1532 * 1532 1533 * @param string $value Raw base URL for the root site upload location. … … 1538 1539 * Check if a given user ID has an uploaded avatar. 1539 1540 * 1540 * @since BuddyPress (1.0.0)1541 * @since 1.0.0 1541 1542 * 1542 1543 * @param int $user_id ID of the user whose avatar is being checked. … … 1556 1557 * Filters whether or not a user has an uploaded avatar. 1557 1558 * 1558 * @since BuddyPress (1.6.0)1559 * @since 1.6.0 1559 1560 * 1560 1561 * @param bool $retval Whether or not a user has an uploaded avatar. … … 1567 1568 * Utility function for fetching an avatar dimension setting. 1568 1569 * 1569 * @since BuddyPress (1.5.0)1570 * @since 1.5.0 1570 1571 * 1571 1572 * @param string $type Dimension type you're fetching dimensions for. 'thumb' … … 1583 1584 * Filters the avatar dimension setting. 1584 1585 * 1585 * @since BuddyPress (1.5.0)1586 * @since 1.5.0 1586 1587 * 1587 1588 * @param int|bool $dim Dimension setting for the type. … … 1595 1596 * Get the 'thumb' avatar width setting. 1596 1597 * 1597 * @since BuddyPress (1.5.0)1598 * @since 1.5.0 1598 1599 * 1599 1600 * @return int The 'thumb' width. … … 1604 1605 * Filters the 'thumb' avatar width setting. 1605 1606 * 1606 * @since BuddyPress (1.5.0)1607 * @since 1.5.0 1607 1608 * 1608 1609 * @param int $value Value for the 'thumb' avatar width setting. … … 1614 1615 * Get the 'thumb' avatar height setting. 1615 1616 * 1616 * @since BuddyPress (1.5.0)1617 * @since 1.5.0 1617 1618 * 1618 1619 * @return int The 'thumb' height. … … 1623 1624 * Filters the 'thumb' avatar height setting. 1624 1625 * 1625 * @since BuddyPress (1.5.0)1626 * @since 1.5.0 1626 1627 * 1627 1628 * @param int $value Value for the 'thumb' avatar height setting. … … 1633 1634 * Get the 'full' avatar width setting. 1634 1635 * 1635 * @since BuddyPress (1.5.0)1636 * @since 1.5.0 1636 1637 * 1637 1638 * @return int The 'full' width. … … 1642 1643 * Filters the 'full' avatar width setting. 1643 1644 * 1644 * @since BuddyPress (1.5.0)1645 * @since 1.5.0 1645 1646 * 1646 1647 * @param int $value Value for the 'full' avatar width setting. … … 1652 1653 * Get the 'full' avatar height setting. 1653 1654 * 1654 * @since BuddyPress (1.5.0)1655 * @since 1.5.0 1655 1656 * 1656 1657 * @return int The 'full' height. … … 1661 1662 * Filters the 'full' avatar height setting. 1662 1663 * 1663 * @since BuddyPress (1.5.0)1664 * @since 1.5.0 1664 1665 * 1665 1666 * @param int $value Value for the 'full' avatar height setting. … … 1671 1672 * Get the max width for original avatar uploads. 1672 1673 * 1673 * @since BuddyPress (1.5.0)1674 * @since 1.5.0 1674 1675 * 1675 1676 * @return int The max width for original avatar uploads. … … 1680 1681 * Filters the max width for original avatar uploads. 1681 1682 * 1682 * @since BuddyPress (1.5.0)1683 * @since 1.5.0 1683 1684 * 1684 1685 * @param int $value Value for the max width. … … 1690 1691 * Get the max filesize for original avatar uploads. 1691 1692 * 1692 * @since BuddyPress (1.5.0)1693 * @since 1.5.0 1693 1694 * 1694 1695 * @return int The max filesize for original avatar uploads. … … 1699 1700 * Filters the max filesize for original avatar uploads. 1700 1701 * 1701 * @since BuddyPress (1.5.0)1702 * @since 1.5.0 1702 1703 * 1703 1704 * @param int $value Value for the max filesize. … … 1709 1710 * Get the URL of the 'full' default avatar. 1710 1711 * 1711 * @since BuddyPress (1.5.0)1712 * @since 1.5.0 1712 1713 * 1713 1714 * @param string $type 'local' if the fallback should be the locally-hosted version … … 1734 1735 * Filters the URL of the 'full' default avatar. 1735 1736 * 1736 * @since BuddyPress (1.5.0)1737 * @since 1.5.0 1737 1738 * 1738 1739 * @param string $avatar URL of the default avatar. … … 1747 1748 * defined. 1748 1749 * 1749 * @since BuddyPress (1.5.0)1750 * @since 1.5.0 1750 1751 * 1751 1752 * @param string $type 'local' if the fallback should be the locally-hosted version … … 1772 1773 * Filters the URL of the 'thumb' default avatar. 1773 1774 * 1774 * @since BuddyPress (1.5.0)1775 * @since 1.5.0 1775 1776 * 1776 1777 * @param string $avatar URL of the default avatar. … … 1786 1787 * notices, we need to make sure this 'week' query var is reset to 0. 1787 1788 * 1788 * @since BuddyPress (2.2.0)1789 * @since 2.2.0 1789 1790 * 1790 1791 * @param WP_Query|null $posts_query the main query object. … … 1826 1827 * Checks whether Avatar UI should be loaded. 1827 1828 * 1828 * @since BuddyPress (2.3.0)1829 * @since 2.3.0 1829 1830 * 1830 1831 * @return bool True if Avatar UI should load, false otherwise. … … 1858 1859 * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false()) 1859 1860 * 1860 * @since BuddyPress (2.3.0)1861 * @since 2.3.0 1861 1862 * 1862 1863 * @param bool whether to load the Avatar UI. … … 1868 1869 * Checks whether the Webcam Avatar UI part should be loaded. 1869 1870 * 1870 * @since BuddyPress (2.3.0)1871 * @since 2.3.0 1871 1872 * 1872 1873 * @global $is_safari … … 1898 1899 * by returning false. 1899 1900 * 1900 * @since BuddyPress (2.3.0)1901 * @since 2.3.0 1901 1902 * 1902 1903 * @param bool whether to load Webcam Avatar UI part. … … 1908 1909 * Template function to load the Avatar UI javascript templates. 1909 1910 * 1910 * @since BuddyPress (2.3.0)1911 * @since 2.3.0 1911 1912 */ 1912 1913 function bp_avatar_get_templates() { … … 1924 1925 * help users to get the avatar UI. 1925 1926 * 1926 * @since BuddyPress (2.3.0)1927 * @since 2.3.0 1927 1928 */ 1928 1929 function bp_avatar_template_check() { -
trunk/src/bp-core/bp-core-buddybar.php
r10039 r10108 1 1 <?php 2 3 2 /** 4 3 * Core BuddyPress Navigational Functions. … … 9 8 */ 10 9 11 // Exit if accessed directly 10 // Exit if accessed directly. 12 11 defined( 'ABSPATH' ) || exit; 13 12 … … 66 65 * should be used. 67 66 * 68 * @since BuddyPress (1.5.0)67 * @since 1.5.0 69 68 * 70 69 * @param array $r Parsed arguments for the nav item. … … 78 77 * Add a link to the main BuddyPress navigation array. 79 78 * 80 * @since BuddyPress (2.4.0)79 * @since 2.4.0 81 80 * 82 81 * @param array|string $args { … … 150 149 * Fires after a link is added to the main BuddyPress navigation array. 151 150 * 152 * @since BuddyPress (2.4.0)151 * @since 2.4.0 153 152 * 154 153 * @param array $r Parsed arguments for the nav item. … … 162 161 * Register a screen function for an item in the main nav array. 163 162 * 164 * @since BuddyPress (2.4.0)163 * @since 2.4.0 165 164 * 166 165 * @param array|string $args { … … 248 247 * Filters the default component subnav item. 249 248 * 250 * @since BuddyPress (1.5.0)249 * @since 1.5.0 251 250 * 252 251 * @param string $value The slug of the default subnav item … … 263 262 * navigation is registered. 264 263 * 265 * @since BuddyPress (2.4.0)264 * @since 2.4.0 266 265 * 267 266 * @param array $r Parsed arguments for the nav item. … … 591 590 * For a given subnav item, either hook the screen function or generate redirect arguments, as necessary. 592 591 * 593 * @since BuddyPress (2.1.0)592 * @since 2.1.0 594 593 * 595 594 * @param array $subnav_item The subnav array added to bp_options_nav in `bp_core_new_subnav_item()`. … … 723 722 * Check whether a given nav item has subnav items. 724 723 * 725 * @since BuddyPress (1.5.0)724 * @since 1.5.0 726 725 * 727 726 * @param string $nav_item The slug of the top-level nav item whose subnav items you're checking. … … 741 740 * Filters whether or not a given nav item has subnav items. 742 741 * 743 * @since BuddyPress (1.5.0)742 * @since 1.5.0 744 743 * 745 744 * @param bool $has_subnav Whether or not there is any subnav items. … … 822 821 * This is a direct copy of WP's private _get_admin_bar_pref() 823 822 * 824 * @since BuddyPress (1.5.0)823 * @since 1.5.0 825 824 * 826 825 * @uses get_user_option() -
trunk/src/bp-core/bp-core-cache.php
r10039 r10108 9 9 */ 10 10 11 // Exit if accessed directly 11 // Exit if accessed directly. 12 12 defined( 'ABSPATH' ) || exit; 13 13 … … 30 30 * Fires before the pruning of WP Super Cache. 31 31 * 32 * @since BuddyPress (1.0.0)32 * @since 1.0.0 33 33 */ 34 34 do_action( 'bp_core_clear_cache' ); … … 62 62 * Clear the directory_pages cache when one of the pages is updated. 63 63 * 64 * @since BuddyPress (2.0.0)64 * @since 2.0.0 65 65 * 66 66 * @param int $post_id ID of the page that was saved. … … 89 89 * Clear the directory_pages cache when the bp-pages option is updated. 90 90 * 91 * @since BuddyPress (2.0.0)91 * @since 2.0.0 92 92 * 93 93 * @param string $option Option name. … … 103 103 * Clear the root_blog_options cache when any of its options are updated. 104 104 * 105 * @since BuddyPress (2.0.0)105 * @since 2.0.0 106 106 * 107 107 * @param string $option Option name. … … 130 130 * Determine which items from a list do not have cached values. 131 131 * 132 * @since BuddyPress (2.0.0)132 * @since 2.0.0 133 133 * 134 134 * @param array $item_ids ID list. … … 159 159 * in the context of template loops. 160 160 * 161 * @since BuddyPress (1.6.0)161 * @since 1.6.0 162 162 * 163 163 * @global object $wpdb WordPress database object for queries.. -
trunk/src/bp-core/bp-core-caps.php
r10052 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Capabilities. … … 19 18 * WordPress's RBAC, so should our capability functions here. 20 19 * 21 * @since BuddyPress (2.1.0)20 * @since 2.1.0 22 21 * 23 22 * @return array … … 34 33 * Filters the list of editable roles. 35 34 * 36 * @since BuddyPress (2.1.0)35 * @since 2.1.0 37 36 * 38 37 * @param array $roles List of roles. … … 43 42 * Filters the array of roles from the currently loaded blog. 44 43 * 45 * @since BuddyPress (2.1.0)44 * @since 2.1.0 46 45 * 47 46 * @param array $roles Available roles. … … 56 55 * This is called on plugin activation. 57 56 * 58 * @since BuddyPress (1.6.0)57 * @since 1.6.0 59 58 * 60 59 * @uses get_role() To get the administrator, default and moderator roles. … … 82 81 * This is called on plugin activation. 83 82 * 84 * @since BuddyPress (1.6.0)83 * @since 1.6.0 85 84 */ 86 85 do_action( 'bp_add_caps' ); … … 92 91 * This is called on plugin deactivation. 93 92 * 94 * @since BuddyPress (1.6.0)93 * @since 1.6.0 95 94 * 96 95 * @uses get_role() To get the administrator and default roles. … … 118 117 * This is called on plugin deactivation. 119 118 * 120 * @since BuddyPress (1.6.0)119 * @since 1.6.0 121 120 */ 122 121 do_action( 'bp_remove_caps' ); … … 126 125 * Map community caps to built in WordPress caps. 127 126 * 128 * @since BuddyPress (1.6.0)127 * @since 1.6.0 129 128 * 130 129 * @see WP_User::has_cap() for description of the arguments passed to the … … 145 144 * Filters the community caps mapping to be built in WordPress caps. 146 145 * 147 * @since BuddyPress (1.6.0)146 * @since 1.6.0 148 147 * 149 148 * @param array $caps Returns the user's actual capabilities. … … 158 157 * Return community capabilities. 159 158 * 160 * @since BuddyPress (1.6.0)159 * @since 1.6.0 161 160 * 162 161 * @uses apply_filters() Calls 'bp_get_community_caps' with the capabilities. … … 172 171 * Filters community capabilities. 173 172 * 174 * @since BuddyPress (1.6.0)173 * @since 1.6.0 175 174 * 176 175 * @param array $caps Array of capabilities to add. Empty by default. … … 182 181 * Return an array of capabilities based on the role that is being requested. 183 182 * 184 * @since BuddyPress (1.6.0)183 * @since 1.6.0 185 184 * 186 185 * @uses apply_filters() Allow return value to be filtered. … … 217 216 * Filters the array of capabilities based on the role that is being requested. 218 217 * 219 * @since BuddyPress (1.6.0)218 * @since 1.6.0 220 219 * 221 220 * @param array $caps Array of capabilities to return. … … 231 230 * already have a role or capability on. 232 231 * 233 * @since BuddyPress (1.6.0)232 * @since 1.6.0 234 233 * 235 234 * @global BuddyPress $bp Global BuddyPress settings object. … … 266 265 * Check whether the current user has a given capability. 267 266 * 268 * @since BuddyPress (1.6.0)269 * @since BuddyPress (2.4.0)Second argument modified to accept an array, rather than `$blog_id`.267 * @since 1.6.0 268 * @since 2.4.0 Second argument modified to accept an array, rather than `$blog_id`. 270 269 * 271 270 * @param string $capability Capability or role name. … … 304 303 * Filters whether or not the current user has a given capability. 305 304 * 306 * @since BuddyPress (1.6.0)307 * @since BuddyPress (2.4.0)Pass `$args` variable.305 * @since 1.6.0 306 * @since 2.4.0 Pass `$args` variable. 308 307 * 309 308 * @param bool $retval Whether or not the current user has the capability. … … 334 333 * 335 334 * @access private 336 * @since BuddyPress (1.6.0)335 * @since 1.6.0 337 336 * 338 337 * @see WP_User::has_cap() … … 374 373 * This is called on plugin activation. 375 374 * 376 * @since BuddyPress (1.6.0)375 * @since 1.6.0 377 376 * @deprecated 1.7.0 378 377 */ … … 386 385 * This is called on plugin deactivation. 387 386 * 388 * @since BuddyPress (1.6.0)387 * @since 1.6.0 389 388 * @deprecated 1.7.0 390 389 */ … … 400 399 * sites that have global communities enabled. 401 400 * 402 * @since BuddyPress (1.6)401 * @since 1.6.0 403 402 * @deprecated 1.7.0 404 403 */ … … 410 409 * The moderator role for BuddyPress users. 411 410 * 412 * @since BuddyPress (1.6.0)411 * @since 1.6.0 413 412 * @deprecated 1.7.0 414 413 */ -
trunk/src/bp-core/bp-core-catchuri.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress URI catcher. … … 11 10 */ 12 11 13 // Exit if accessed directly 12 // Exit if accessed directly. 14 13 defined( 'ABSPATH' ) || exit; 15 14 … … 31 30 * - $bp->action_variables: array ['group', 5] 32 31 * 33 * @since BuddyPress (1.0.0)32 * @since 1.0.0 34 33 */ 35 34 function bp_core_set_uri_globals() { … … 59 58 * Filters the BuddyPress global URI path. 60 59 * 61 * @since BuddyPress (1.0.0)60 * @since 1.0.0 62 61 * 63 62 * @param string $path Path to set. … … 340 339 * Are root profiles enabled and allowed? 341 340 * 342 * @since BuddyPress (1.6.0)341 * @since 1.6.0 343 342 * 344 343 * @return bool True if yes, false if no. … … 354 353 * Filters whether or not root profiles are enabled and allowed. 355 354 * 356 * @since BuddyPress (1.6.0)355 * @since 1.6.0 357 356 * 358 357 * @param bool $retval Whether or not root profiles are available. … … 407 406 * Allows plugins to alter where the template files are located. 408 407 * 409 * @since BuddyPress (1.1.0)408 * @since 1.1.0 410 409 * 411 410 * @param string $template Located template path. … … 423 422 * Fires before the loading of a located template file. 424 423 * 425 * @since BuddyPress (1.6.0)424 * @since 1.6.0 426 425 * 427 426 * @param string $located_template Template found to be loaded. … … 432 431 * Filters the selected template right before loading. 433 432 * 434 * @since BuddyPress (1.1.0)433 * @since 1.1.0 435 434 * 436 435 * @param string $located_template Template found to be loaded. … … 441 440 * Fires after the loading of a located template file. 442 441 * 443 * @since BuddyPress (1.6.0)442 * @since 1.6.0 444 443 * 445 444 * @param string $located_template Template found that was loaded. … … 466 465 * Fires if there are no found templates to load and theme compat is needed. 467 466 * 468 * @since BuddyPress (1.7.0)467 * @since 1.7.0 469 468 */ 470 469 do_action( 'bp_setup_theme_compat' ); … … 481 480 * Filters the path to redirect users to if XProfile is not enabled. 482 481 * 483 * @since BuddyPress (1.0.0)482 * @since 1.0.0 484 483 * 485 484 * @param string $value Path to redirect users to. … … 492 491 * Catch unauthorized access to certain BuddyPress pages and redirect accordingly. 493 492 * 494 * @since BuddyPress (1.5.0)493 * @since 1.5.0 495 494 */ 496 495 function bp_core_catch_no_access() { … … 517 516 * If authenticated, redirects user back to requested content by default. 518 517 * 519 * @since BuddyPress (1.5.0)518 * @since 1.5.0 520 519 * 521 520 * @param array|string $args { … … 550 549 * Filters the arguments used for user redirecting when visiting access controlled areas. 551 550 * 552 * @since BuddyPress (1.6.0)551 * @since 1.6.0 553 552 * 554 553 * @param array $r Array of parsed arguments for redirect determination. … … 604 603 * Hooks into the "bpnoaccess" action defined in bp_core_no_access(). 605 604 * 606 * @since BuddyPress (1.5.0)605 * @since 1.5.0 607 606 * 608 607 * @global string $error Error message to pass to wp-login.php. … … 614 613 * Filters the error message for wp-login.php when needing to log in before accessing. 615 614 * 616 * @since BuddyPress (1.5.0)615 * @since 1.5.0 617 616 * 618 617 * @param string $value Error message to display. … … 635 634 * example.com/groups/mygroup/home/. 636 635 * 637 * @since BuddyPress (1.6.0)636 * @since 1.6.0 638 637 * 639 638 * @see BP_Members_Component::setup_globals() where … … 648 647 * Filters whether or not to do canonical redirects on BuddyPress URLs. 649 648 * 650 * @since BuddyPress (1.6.0)649 * @since 1.6.0 651 650 * 652 651 * @param bool $value Whether or not to do canonical redirects. Default true. … … 697 696 * Output rel=canonical header tag for BuddyPress content. 698 697 * 699 * @since BuddyPress (1.6.0)698 * @since 1.6.0 700 699 */ 701 700 function bp_rel_canonical() { … … 709 708 * Get the canonical URL of the current page. 710 709 * 711 * @since BuddyPress (1.6.0)710 * @since 1.6.0 712 711 * 713 712 * @uses apply_filters() Filter bp_get_canonical_url to modify return value. … … 757 756 * Filters the logged in register page redirect URL. 758 757 * 759 * @since BuddyPress (1.5.1)758 * @since 1.5.1 760 759 * 761 760 * @param string $value URL to redirect logged in members to. … … 805 804 * Filters the canonical url of the current page. 806 805 * 807 * @since BuddyPress (1.6.0)806 * @since 1.6.0 808 807 * 809 808 * @param string $canonical_url Canonical URL of the current page. … … 816 815 * Return the URL as requested on the current page load by the user agent. 817 816 * 818 * @since BuddyPress (1.6.0)817 * @since 1.6.0 819 818 * 820 819 * @return string Requested URL string. … … 831 830 * Filters the URL as requested on the current page load by the user agent. 832 831 * 833 * @since BuddyPress (1.7.0)832 * @since 1.7.0 834 833 * 835 834 * @param string $value Requested URL string. … … 847 846 * notice in future versions of BuddyPress. 848 847 * 849 * @since BuddyPress (1.6.0)848 * @since 1.6.0 850 849 * 851 850 * @uses bp_is_blog_page() … … 879 878 * (and plugin authors!) should ignore it. 880 879 * 881 * @since BuddyPress (1.6.1)880 * @since 1.6.1 882 881 * 883 882 * @link https://buddypress.trac.wordpress.org/ticket/4329 … … 898 897 * notice in future versions of BuddyPress. 899 898 * 900 * @since BuddyPress (1.6.0)899 * @since 1.6.0 901 900 */ 902 901 function _bp_maybe_remove_rel_canonical() { -
trunk/src/bp-core/bp-core-component.php
r10052 r10108 23 23 * @subpackage Component 24 24 * 25 * @since BuddyPress (1.5.0)25 * @since 1.5.0 26 26 */ 27 27 class BP_Component { … … 96 96 * Placeholder text for component directory search box. 97 97 * 98 * @since BuddyPress (1.5.0)98 * @since 1.5.0 99 99 * @var string $search_string 100 100 */ … … 104 104 * Root slug for the component. 105 105 * 106 * @since BuddyPress (1.5.0)106 * @since 1.5.0 107 107 * @var string $root_slug 108 108 */ … … 112 112 * Metadata tables for the component (if applicable). 113 113 * 114 * @since BuddyPress (2.0.0)114 * @since 2.0.0 115 115 * 116 116 * @var array … … 121 121 * Global tables for the component (if applicable). 122 122 * 123 * @since BuddyPress (2.0.0)123 * @since 2.0.0 124 124 * 125 125 * @var array … … 132 132 * Component loader. 133 133 * 134 * @since BuddyPress (1.5.0)135 * @since BuddyPress (1.9.0)Added $params as a parameter.136 * @since BuddyPress (2.3.0)Added $params['features'] as a configurable value.134 * @since 1.5.0 135 * @since 1.9.0 Added $params as a parameter. 136 * @since 2.3.0 Added $params['features'] as a configurable value. 137 137 * 138 138 * @param string $id Unique ID. Letters, numbers, and underscores only. … … 185 185 * Set up component global variables. 186 186 * 187 * @since BuddyPress (1.5)187 * @since 1.5.0 188 188 * 189 189 * @uses apply_filters() Calls 'bp_{@link bp_Component::name}_id'. … … 228 228 * Filters the slug to be used for the permalink URI chunk after root. 229 229 * 230 * @since BuddyPress (1.5.0)230 * @since 1.5.0 231 231 * 232 232 * @param string $value Slug to use in permalink URI chunk. … … 237 237 * Filters the slug used for root directory. 238 238 * 239 * @since BuddyPress (1.5.0)239 * @since 1.5.0 240 240 * 241 241 * @param string $value Root directory slug. … … 246 246 * Filters the component's top-level directory if available. 247 247 * 248 * @since BuddyPress (1.5.0)248 * @since 1.5.0 249 249 * 250 250 * @param bool $value Whether or not there is a top-level directory. … … 255 255 * Filters the component's directory title. 256 256 * 257 * @since BuddyPress (2.0.0)257 * @since 2.0.0 258 258 * 259 259 * @param string $value Title to use for the directory. … … 264 264 * Filters the placeholder text for search inputs for component. 265 265 * 266 * @since BuddyPress (1.5.0)266 * @since 1.5.0 267 267 * 268 268 * @param string $value Name to use in search input placeholders. … … 273 273 * Filters the callable function that formats the component's notifications. 274 274 * 275 * @since BuddyPress (1.5.0)275 * @since 1.5.0 276 276 * 277 277 * @param string $value Function callback. … … 299 299 * This is a dynamic hook that is based on the component string ID. 300 300 * 301 * @since BuddyPress (1.5.0)301 * @since 1.5.0 302 302 */ 303 303 do_action( 'bp_' . $this->id . '_setup_globals' ); … … 327 327 * - ./bp-my_component/bp-my_component-actions.php 328 328 * 329 * @since BuddyPress (1.5.0)329 * @since 1.5.0 330 330 * 331 331 * @uses do_action() Calls 'bp_{@link bp_Component::name}includes'. … … 370 370 * This is a dynamic hook that is based on the component string ID. 371 371 * 372 * @since BuddyPress (1.5.0)372 * @since 1.5.0 373 373 */ 374 374 do_action( 'bp_' . $this->id . '_includes' ); … … 378 378 * Set up the actions. 379 379 * 380 * @since BuddyPress (1.5.0)380 * @since 1.5.0 381 381 * 382 382 * @uses add_action() To add various actions. … … 436 436 * This is a dynamic hook that is based on the component string ID. 437 437 * 438 * @since BuddyPress (1.5.0)438 * @since 1.5.0 439 439 */ 440 440 do_action( 'bp_' . $this->id . '_setup_actions' ); … … 444 444 * Set up the canonical URL stack for this component. 445 445 * 446 * @since BuddyPress (2.1.0)446 * @since 2.1.0 447 447 */ 448 448 public function setup_canonical_stack() {} … … 481 481 * This is a dynamic hook that is based on the component string ID. 482 482 * 483 * @since BuddyPress (1.5.0)483 * @since 1.5.0 484 484 */ 485 485 do_action( 'bp_' . $this->id . '_setup_nav' ); … … 515 515 * This is a dynamic hook that is based on the component string ID. 516 516 * 517 * @since BuddyPress (1.9.0)517 * @since 1.9.0 518 518 * 519 519 * @param array $wp_admin_nav Array of navigation items to add. … … 541 541 * This is a dynamic hook that is based on the component string ID. 542 542 * 543 * @since BuddyPress (1.5.0)543 * @since 1.5.0 544 544 */ 545 545 do_action( 'bp_' . $this->id . '_setup_admin_bar' ); … … 549 549 * Set up the component title. 550 550 * 551 * @since BuddyPress (1.5.0)551 * @since 1.5.0 552 552 * 553 553 * @uses do_action() Calls 'bp_{@link bp_Component::name}_setup_title'. … … 560 560 * This is a dynamic hook that is based on the component string ID. 561 561 * 562 * @since BuddyPress (1.5.0)562 * @since 1.5.0 563 563 */ 564 564 do_action( 'bp_' . $this->id . '_setup_title' ); … … 568 568 * Setup component-specific cache groups. 569 569 * 570 * @since BuddyPress (2.2.0)570 * @since 2.2.0 571 571 * 572 572 * @uses do_action() Calls 'bp_setup_{@link bp_Component::name}_cache_groups'. … … 579 579 * This is a dynamic hook that is based on the component string ID. 580 580 * 581 * @since BuddyPress (2.2.0)581 * @since 2.2.0 582 582 */ 583 583 do_action( 'bp_' . $this->id . '_setup_cache_groups' ); … … 587 587 * Register global tables for the component, so that it may use WordPress's database API. 588 588 * 589 * @since BuddyPress (2.0.0)589 * @since 2.0.0 590 590 * 591 591 * @param array $tables Table names to register. … … 600 600 * *all* tables, use the 'bp_core_get_table_prefix' filter instead. 601 601 * 602 * @since BuddyPress (1.6.0)602 * @since 1.6.0 603 603 */ 604 604 $tables = apply_filters( 'bp_' . $this->id . '_global_tables', $tables ); … … 619 619 * This is a dynamic hook that is based on the component string ID. 620 620 * 621 * @since BuddyPress (2.0.0)621 * @since 2.0.0 622 622 */ 623 623 do_action( 'bp_' . $this->id . '_register_global_tables' ); … … 630 630 * compatibility with the WordPress metadata API. 631 631 * 632 * @since BuddyPress (2.0.0)632 * @since 2.0.0 633 633 * 634 634 * @param array $tables Table names to register. … … 644 644 * *all* tables, use the 'bp_core_get_table_prefix' filter instead. 645 645 * 646 * @since BuddyPress (2.0.0)646 * @since 2.0.0 647 647 */ 648 648 $tables = apply_filters( 'bp_' . $this->id . '_meta_tables', $tables ); … … 666 666 * This is a dynamic hook that is based on the component string ID. 667 667 * 668 * @since BuddyPress (2.0.0)668 * @since 2.0.0 669 669 */ 670 670 do_action( 'bp_' . $this->id . '_register_meta_tables' ); … … 674 674 * Set up the component post types. 675 675 * 676 * @since BuddyPress (1.5.0)676 * @since 1.5.0 677 677 * 678 678 * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_post_types'. … … 685 685 * This is a dynamic hook that is based on the component string ID. 686 686 * 687 * @since BuddyPress (1.5.0)687 * @since 1.5.0 688 688 */ 689 689 do_action( 'bp_' . $this->id . '_register_post_types' ); … … 693 693 * Register component-specific taxonomies. 694 694 * 695 * @since BuddyPress (1.5.0)695 * @since 1.5.0 696 696 * 697 697 * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_taxonomies'. … … 704 704 * This is a dynamic hook that is based on the component string ID. 705 705 * 706 * @since BuddyPress (1.5.0)706 * @since 1.5.0 707 707 */ 708 708 do_action( 'bp_' . $this->id . '_register_taxonomies' ); … … 712 712 * Add any additional rewrite tags. 713 713 * 714 * @since BuddyPress (1.5.0)714 * @since 1.5.0 715 715 * 716 716 * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_tags'. … … 723 723 * This is a dynamic hook that is based on the component string ID. 724 724 * 725 * @since BuddyPress (1.5.0)725 * @since 1.5.0 726 726 */ 727 727 do_action( 'bp_' . $this->id . '_add_rewrite_tags' ); … … 731 731 * Add any additional rewrite rules. 732 732 * 733 * @since BuddyPress (1.9.0)733 * @since 1.9.0 734 734 * 735 735 * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_rules'. … … 742 742 * This is a dynamic hook that is based on the component string ID. 743 743 * 744 * @since BuddyPress (1.9.0)744 * @since 1.9.0 745 745 */ 746 746 do_action( 'bp_' . $this->id . '_add_rewrite_rules' ); … … 750 750 * Add any permalink structures. 751 751 * 752 * @since BuddyPress (1.9)752 * @since 1.9.0 753 753 * 754 754 * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_permastruct'. … … 761 761 * This is a dynamic hook that is based on the component string ID. 762 762 * 763 * @since BuddyPress (1.9.0)763 * @since 1.9.0 764 764 */ 765 765 do_action( 'bp_' . $this->id . '_add_permastructs' ); … … 769 769 * Allow components to parse the main query. 770 770 * 771 * @since BuddyPress (1.9)771 * @since 1.9.0 772 772 * 773 773 * @uses do_action() Calls 'bp_{@link bp_Component::name}_parse_query'. … … 782 782 * This is a dynamic hook that is based on the component string ID. 783 783 * 784 * @since BuddyPress (1.9.0)784 * @since 1.9.0 785 785 * 786 786 * @param object $query Main WP_Query object. Passed by reference. … … 792 792 * Generate any additional rewrite rules. 793 793 * 794 * @since BuddyPress (1.5)794 * @since 1.5.0 795 795 * 796 796 * @uses do_action() Calls 'bp_{@link bp_Component::name}_generate_rewrite_rules'. … … 803 803 * This is a dynamic hook that is based on the component string ID. 804 804 * 805 * @since BuddyPress (1.5.0)805 * @since 1.5.0 806 806 */ 807 807 do_action( 'bp_' . $this->id . '_generate_rewrite_rules' ); -
trunk/src/bp-core/bp-core-cssjs.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * Register scripts commonly used by BuddyPress. 14 14 * 15 * @since BuddyPress (2.1.0)15 * @since 2.1.0 16 16 */ 17 17 function bp_core_register_common_scripts() { … … 22 22 * Filters the BuddyPress Core javascript files to register. 23 23 * 24 * @since BuddyPress (2.1.0)24 * @since 2.1.0 25 25 * 26 26 * @param array $value Array of javascript file information to register. … … 57 57 * Register styles commonly used by BuddyPress. 58 58 * 59 * @since BuddyPress (2.1.0)59 * @since 2.1.0 60 60 */ 61 61 function bp_core_register_common_styles() { … … 66 66 * Filters the URL for the Admin Bar stylesheet. 67 67 * 68 * @since BuddyPress (1.1.0)68 * @since 1.1.0 69 69 * 70 70 * @param string $value URL for the Admin Bar stylesheet. … … 75 75 * Filters the BuddyPress Core stylesheet files to register. 76 76 * 77 * @since BuddyPress (2.1.0)77 * @since 2.1.0 78 78 * 79 79 * @param array $value Array of stylesheet file information to register. … … 123 123 * Enqueues the css and js required by the Avatar UI. 124 124 * 125 * @since BuddyPress (2.3.0)125 * @since 2.3.0 126 126 */ 127 127 function bp_core_avatar_scripts() { … … 158 158 * Filters the return value of getimagesize to determine if an image was uploaded. 159 159 * 160 * @since BuddyPress (1.1.0)160 * @since 1.1.0 161 161 * 162 162 * @param array $value Array of data found by getimagesize. … … 278 278 * Define the 'ajaxurl' JS variable, used by themes as an AJAX endpoint. 279 279 * 280 * @since BuddyPress (1.1.0)280 * @since 1.1.0 281 281 */ 282 282 function bp_core_add_ajax_url_js() { … … 295 295 * configurations. 296 296 * 297 * @since BuddyPress (1.7.0)297 * @since 1.7.0 298 298 * 299 299 * @return string AJAX endpoint URL. … … 304 304 * Filters the proper value for BuddyPress' ajaxurl. 305 305 * 306 * @since BuddyPress (1.7.0)306 * @since 1.7.0 307 307 * 308 308 * @param string $value Proper ajaxurl value for BuddyPress. … … 314 314 * Get the JavaScript dependencies for buddypress.js. 315 315 * 316 * @since BuddyPress (2.0.0)316 * @since 2.0.0 317 317 * 318 318 * @uses apply_filters() to allow other component to load extra dependencies. … … 325 325 * Filters the javascript dependencies for buddypress.js. 326 326 * 327 * @since BuddyPress (2.0.0)327 * @since 2.0.0 328 328 * 329 329 * @param array $value Array of javascript dependencies for buddypress.js. -
trunk/src/bp-core/bp-core-dependency.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * Plugin Dependency Action Hooks. … … 16 15 * 17 16 * @todo use anonymous functions when PHP minimum requirement allows (5.3) 17 * 18 * @package BuddyPress 19 * @subpackage Core 18 20 */ 19 21 … … 26 28 * Fires inside the 'bp_include' function, where plugins should include files. 27 29 * 28 * @since BuddyPress (1.2.5)30 * @since 1.2.5 29 31 */ 30 32 do_action( 'bp_include' ); … … 39 41 * Fires inside the 'bp_setup_components' function, where plugins should initialize components. 40 42 * 41 * @since BuddyPress (1.6.0)43 * @since 1.6.0 42 44 */ 43 45 do_action( 'bp_setup_components' ); … … 52 54 * Fires inside the 'bp_setup_canonical_stack' function, where plugins should set up their canonical URL. 53 55 * 54 * @since BuddyPress (2.1.0)56 * @since 2.1.0 55 57 */ 56 58 do_action( 'bp_setup_canonical_stack' ); … … 60 62 * Fire the 'bp_register_taxonomies' action, where plugins should register taxonomies. 61 63 * 62 * @since BuddyPress (2.2.0)64 * @since 2.2.0 63 65 */ 64 66 function bp_register_taxonomies() { … … 67 69 * Fires inside the 'bp_register_taxonomies' function, where plugins should register taxonomies. 68 70 * 69 * @since BuddyPress (2.2.0)71 * @since 2.2.0 70 72 */ 71 73 do_action( 'bp_register_taxonomies' ); … … 80 82 * Fires inside the 'bp_setup_globals' function, where plugins should initialize global settings. 81 83 * 82 * @since BuddyPress (1.2.0)84 * @since 1.2.0 83 85 */ 84 86 do_action( 'bp_setup_globals' ); … … 93 95 * Fires inside the 'bp_setup_nav' function, where plugins should register their navigation items. 94 96 * 95 * @since BuddyPress (1.2.0)97 * @since 1.2.0 96 98 */ 97 99 do_action( 'bp_setup_nav' ); … … 109 111 * This hook will only fire if bp_use_wp_admin_bar() returns true. 110 112 * 111 * @since BuddyPress (1.5.0)113 * @since 1.5.0 112 114 */ 113 115 do_action( 'bp_setup_admin_bar' ); … … 123 125 * Fires inside the 'bp_setup_title' function, where plugins should modify the page title. 124 126 * 125 * @since BuddyPress (1.5.0)127 * @since 1.5.0 126 128 */ 127 129 do_action( 'bp_setup_title' ); … … 136 138 * Fires inside the 'bp_register_widgets' function, where plugins should register widgets. 137 139 * 138 * @since BuddyPress (1.2.0)140 * @since 1.2.0 139 141 */ 140 142 do_action( 'bp_register_widgets' ); … … 144 146 * Fire the 'bp_register_member_types' action, where plugins should register member types. 145 147 * 146 * @since BuddyPress (2.3.0)148 * @since 2.3.0 147 149 */ 148 150 function bp_register_member_types() { … … 151 153 * Fires inside bp_register_member_types(), so plugins can register member types. 152 154 * 153 * @since BuddyPress (2.3.0)155 * @since 2.3.0 154 156 */ 155 157 do_action( 'bp_register_member_types' ); … … 159 161 * Fire the 'bp_setup_cache_groups' action, where cache groups are registered. 160 162 * 161 * @since BuddyPress (2.2.0)163 * @since 2.2.0 162 164 */ 163 165 function bp_setup_cache_groups() { … … 166 168 * Fires inside the 'bp_setup_cache_groups' function, where cache groups are registered. 167 169 * 168 * @since BuddyPress (2.2.0)170 * @since 2.2.0 169 171 */ 170 172 do_action( 'bp_setup_cache_groups' ); … … 193 195 * Fires to set up the current user setup process. 194 196 * 195 * @since BuddyPress (1.7.0)197 * @since 1.7.0 196 198 */ 197 199 do_action( 'bp_setup_current_user' ); … … 206 208 * Fires inside the 'bp_init' function, BuddyPress' main initialization hook. 207 209 * 208 * @since BuddyPress (1.2.0)210 * @since 1.2.0 209 211 */ 210 212 do_action( 'bp_init' ); … … 221 223 * Fires inside the 'bp_loaded' function, which fires after BP's core plugin files have been loaded. 222 224 * 223 * @since BuddyPress (1.2.5)225 * @since 1.2.5 224 226 */ 225 227 do_action( 'bp_loaded' ); … … 236 238 * Fires inside the 'bp_ready' function, which runs after BP is set up and the page is about to render. 237 239 * 238 * @since BuddyPress (1.6.0)240 * @since 1.6.0 239 241 */ 240 242 do_action( 'bp_ready' ); … … 252 254 * Fires inside the 'bp_actions' function, which runs just before rendering. 253 255 * 254 * @since BuddyPress (1.5.0)256 * @since 1.5.0 255 257 */ 256 258 do_action( 'bp_actions' ); … … 270 272 * Runs just after 'bp_actions'. Use this hook to attach your template loaders. 271 273 * 272 * @since BuddyPress (1.5.0)274 * @since 1.5.0 273 275 */ 274 276 do_action( 'bp_screens' ); … … 287 289 * Hooked to 'widgets_init'. 288 290 * 289 * @since BuddyPress (1.6.0)291 * @since 1.6.0 290 292 */ 291 293 do_action ( 'bp_widgets_init' ); … … 310 312 * who do not have the proper permission to access certain content. 311 313 * 312 * @since BuddyPress (1.6.0)314 * @since 1.6.0 313 315 * 314 316 * @uses do_action() … … 319 321 * Fires inside the 'bp_template_redirect' function. 320 322 * 321 * @since BuddyPress (1.6.0)323 * @since 1.6.0 322 324 */ 323 325 do_action( 'bp_template_redirect' ); … … 331 333 * The main action used registering theme directories. 332 334 * 333 * @since BuddyPress (1.5.0)335 * @since 1.5.0 334 336 * 335 337 * @uses do_action() … … 342 344 * The main action used registering theme directories. 343 345 * 344 * @since BuddyPress (1.7.0)346 * @since 1.7.0 345 347 */ 346 348 do_action( 'bp_register_theme_directory' ); … … 352 354 * The main action used registering theme packages. 353 355 * 354 * @since BuddyPress (1.7.0)356 * @since 1.7.0 355 357 * 356 358 * @uses do_action() … … 361 363 * Fires inside the 'bp_register_theme_packages' function. 362 364 * 363 * @since BuddyPress (1.7.0)365 * @since 1.7.0 364 366 */ 365 367 do_action( 'bp_register_theme_packages' ); … … 369 371 * Fire the 'bp_enqueue_scripts' action, where BP enqueues its CSS and JS. 370 372 * 371 * @since BuddyPress (1.6.0)373 * @since 1.6.0 372 374 * 373 375 * @uses do_action() Calls 'bp_enqueue_scripts'. … … 378 380 * Fires inside the 'bp_enqueue_scripts' function, where BP enqueues its CSS and JS. 379 381 * 380 * @since BuddyPress (1.6.0)382 * @since 1.6.0 381 383 */ 382 384 do_action ( 'bp_enqueue_scripts' ); … … 386 388 * Fire the 'bp_add_rewrite_tag' action, where BP adds its custom rewrite tags. 387 389 * 388 * @since BuddyPress (1.8.0)390 * @since 1.8.0 389 391 * 390 392 * @uses do_action() Calls 'bp_add_rewrite_tags'. … … 395 397 * Fires inside the 'bp_add_rewrite_tags' function, where BP adds its custom rewrite tags. 396 398 * 397 * @since BuddyPress (1.8.0)399 * @since 1.8.0 398 400 */ 399 401 do_action( 'bp_add_rewrite_tags' ); … … 403 405 * Fire the 'bp_add_rewrite_rules' action, where BP adds its custom rewrite rules. 404 406 * 405 * @since BuddyPress (1.9.0)407 * @since 1.9.0 406 408 * 407 409 * @uses do_action() Calls 'bp_add_rewrite_rules'. … … 412 414 * Fires inside the 'bp_add_rewrite_rules' function, where BP adds its custom rewrite rules. 413 415 * 414 * @since BuddyPress (1.9.0)416 * @since 1.9.0 415 417 */ 416 418 do_action( 'bp_add_rewrite_rules' ); … … 420 422 * Fire the 'bp_add_permastructs' action, where BP adds its BP-specific permalink structure. 421 423 * 422 * @since BuddyPress (1.9.0)424 * @since 1.9.0 423 425 * 424 426 * @uses do_action() Calls 'bp_add_permastructs'. … … 429 431 * Fires inside the 'bp_add_permastructs' function, where BP adds its BP-specific permalink structure. 430 432 * 431 * @since BuddyPress (1.9.0)433 * @since 1.9.0 432 434 */ 433 435 do_action( 'bp_add_permastructs' ); … … 440 442 * BuddyPress-specific functionality. 441 443 * 442 * @since BuddyPress (1.6.0)444 * @since 1.6.0 443 445 * 444 446 * @uses do_action() Calls 'bp_setup_theme'. … … 449 451 * Fires inside the 'bp_setup_theme' function. 450 452 * 451 * @since BuddyPress (1.6.0)453 * @since 1.6.0 452 454 */ 453 455 do_action ( 'bp_setup_theme' ); … … 464 466 * before our theme compatibility layer kicks in. 465 467 * 466 * @since BuddyPress (1.6.0)468 * @since 1.6.0 467 469 * 468 470 * @uses do_action() Calls 'bp_after_setup_theme'. … … 473 475 * Fires inside the 'bp_after_setup_theme' function. 474 476 * 475 * @since BuddyPress (1.7.0)477 * @since 1.7.0 476 478 */ 477 479 do_action ( 'bp_after_setup_theme' ); … … 483 485 * Fire the 'bp_request' filter, a piggy-back of WP's 'request'. 484 486 * 485 * @since BuddyPress (1.7.0)487 * @since 1.7.0 486 488 * 487 489 * @see WP::parse_request() for a description of parameters. … … 496 498 * Filters the query_vars for the current request. 497 499 * 498 * @since BuddyPress (1.7.0)500 * @since 1.7.0 499 501 * 500 502 * @param array $query_vars Array of query variables. … … 506 508 * Fire the 'bp_login_redirect' filter, a piggy-back of WP's 'login_redirect'. 507 509 * 508 * @since BuddyPress (1.7.0)510 * @since 1.7.0 509 511 * 510 512 * @param string $redirect_to See 'login_redirect'. … … 520 522 * Filters the URL to redirect to after login. 521 523 * 522 * @since BuddyPress (1.7.0)524 * @since 1.7.0 523 525 * 524 526 * @param string $redirect_to The redirect destination URL. … … 534 536 * Hooked to 'template_include'. 535 537 * 536 * @since BuddyPress (1.6.0)538 * @since 1.6.0 537 539 * 538 540 * @uses apply_filters() … … 547 549 * Filters the template to use with template_include. 548 550 * 549 * @since BuddyPress (1.6.0)551 * @since 1.6.0 550 552 * 551 553 * @param string $template The path of the template to include. … … 557 559 * Fire the 'bp_generate_rewrite_rules' action, where BP generates its rewrite rules. 558 560 * 559 * @since BuddyPress (1.7.0)561 * @since 1.7.0 560 562 * 561 563 * @uses do_action() Calls 'bp_generate_rewrite_rules' with {@link WP_Rewrite}. … … 568 570 * Fires inside the 'bp_generate_rewrite_rules' function. 569 571 * 570 * @since BuddyPress (1.7.0)572 * @since 1.7.0 571 573 * 572 574 * @param WP_Rewrite $wp_rewrite WP_Rewrite object. Passed by reference. … … 580 582 * Filter the allowed themes list for BuddyPress-specific themes. 581 583 * 582 * @since BuddyPress (1.7.0)584 * @since 1.7.0 583 585 * 584 586 * @uses apply_filters() Calls 'bp_allowed_themes' with the allowed themes list. … … 593 595 * Filters the allowed themes list for BuddyPress-specific themes. 594 596 * 595 * @since BuddyPress (1.7.0)597 * @since 1.7.0 596 598 * 597 599 * @param string $template The path of the template to include. … … 605 607 * The main action used for handling theme-side POST requests. 606 608 * 607 * @since BuddyPress (1.9.0)609 * @since 1.9.0 608 610 * @uses do_action() 609 611 */ … … 629 631 * the scope of the 'action' without needing to check it in your function. 630 632 * 631 * @since BuddyPress (1.9.0)633 * @since 1.9.0 632 634 */ 633 635 do_action( 'bp_post_request_' . $action ); … … 638 640 * Use this static action if you don't mind checking the 'action' yourself. 639 641 * 640 * @since BuddyPress (1.9.0)642 * @since 1.9.0 641 643 * 642 644 * @param string $action The action being run. … … 648 650 * The main action used for handling theme-side GET requests. 649 651 * 650 * @since BuddyPress (1.9.0)652 * @since 1.9.0 651 653 * @uses do_action() 652 654 */ … … 672 674 * the scope of the 'action' without needing to check it in your function. 673 675 * 674 * @since BuddyPress (1.9.0)676 * @since 1.9.0 675 677 */ 676 678 do_action( 'bp_get_request_' . $action ); … … 681 683 * Use this static action if you don't mind checking the 'action' yourself. 682 684 * 683 * @since BuddyPress (1.9.0)685 * @since 1.9.0 684 686 * 685 687 * @param string $action The action being run. -
trunk/src/bp-core/bp-core-filters.php
r10029 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Filters. … … 21 20 */ 22 21 23 // Exit if accessed directly 22 // Exit if accessed directly. 24 23 defined( 'ABSPATH' ) || exit; 25 24 … … 99 98 * Filters specific pages that shouldn't show up on page listings. 100 99 * 101 * @since BuddyPress (1.5.0)100 * @since 1.5.0 102 101 * 103 102 * @param array $pages Array of pages to exclude. … … 110 109 * Prevent specific pages (eg 'Activate') from showing in the Pages meta box of the Menu Administration screen. 111 110 * 112 * @since BuddyPress (2.0.0)111 * @since 2.0.0 113 112 * 114 113 * @uses bp_is_root_blog() checks if current blog is root blog. … … 157 156 * should highlight the WP page. 158 157 * 159 * @since BuddyPress (2.2.0)158 * @since 2.2.0 160 159 * 161 160 * @param array $retval CSS classes for the current menu page in the menu. … … 215 214 * current BP parent page during nav menu generation. 216 215 * 217 * @since BuddyPress (2.2.0)216 * @since 2.2.0 218 217 * 219 218 * @param array $retval CSS classes for the current nav menu item in the menu. … … 250 249 * Filters the "From" name in outgoing email to the site name. 251 250 * 252 * @since BuddyPress (1.2.0)251 * @since 1.2.0 253 252 * 254 253 * @param string $value Value to set the "From" name to. … … 326 325 * Allows plugins to have finer grained control of redirect upon login. 327 326 * 328 * @since BuddyPress (1.6.0)327 * @since 1.6.0 329 328 * 330 329 * @param bool $value Whether or not to redirect. … … 353 352 * Filters the URL to redirect users to upon successful login. 354 353 * 355 * @since BuddyPress (1.9.0)354 * @since 1.9.0 356 355 * 357 356 * @param string $value URL to redirect to. … … 460 459 * Filters the email that the notification is going to upon successful registration with blog. 461 460 * 462 * @since BuddyPress (1.2.0)461 * @since 1.2.0 463 462 * 464 463 * @param string $user_email The user's email address. … … 476 475 * Filters the subject that the notification uses upon successful registration with blog. 477 476 * 478 * @since BuddyPress (1.2.0)477 * @since 1.2.0 479 478 * 480 479 * @param string $subject The subject to use. … … 492 491 * Filters the message that the notification uses upon successful registration with blog. 493 492 * 494 * @since BuddyPress (1.2.0)493 * @since 1.2.0 495 494 * 496 495 * @param string $message The message to use. … … 514 513 * Fires after the sending of the notification to new users for successful registration with blog. 515 514 * 516 * @since BuddyPress (1.5.0)515 * @since 1.5.0 517 516 * 518 517 * @param string $admin_email Admin Email address for the site. … … 585 584 * Filters the email that the notification is going to upon successful registration without blog. 586 585 * 587 * @since BuddyPress (1.2.0)586 * @since 1.2.0 588 587 * 589 588 * @param string $user_email The user's email address. … … 598 597 * Filters the subject that the notification uses upon successful registration without blog. 599 598 * 600 * @since BuddyPress (1.2.0)599 * @since 1.2.0 601 600 * 602 601 * @param string $subject The subject to use. … … 611 610 * Filters the message that the notification uses upon successful registration without blog. 612 611 * 613 * @since BuddyPress (1.2.0)612 * @since 1.2.0 614 613 * 615 614 * @param string $message The message to use. … … 630 629 * Fires after the sending of the notification to new users for successful registration without blog. 631 630 * 632 * @since BuddyPress (1.5.0)631 * @since 1.5.0 633 632 * 634 633 * @param string $admin_email Admin Email address for the site. … … 650 649 * Filter the page title for BuddyPress pages. 651 650 * 652 * @since BuddyPress (1.5.0)651 * @since 1.5.0 653 652 * 654 653 * @see wp_title() … … 813 812 * Filters the page title for BuddyPress pages. 814 813 * 815 * @since BuddyPress (1.5.0)814 * @since 1.5.0 816 815 * 817 816 * @param string $new_title The BuddyPress page title. … … 849 848 * Add BuddyPress-specific items to the wp_nav_menu. 850 849 * 851 * @since BuddyPress (1.9.0)850 * @since 1.9.0 852 851 * 853 852 * @param WP_Post $menu_item The menu item. … … 939 938 * Populate BuddyPress user nav items for the customizer 940 939 * 941 * @since BuddyPress (2.3.3)940 * @since 2.3.3 942 941 * 943 942 * @param array $items The array of menu items … … 976 975 * Set BuddyPress item navs for the customizer 977 976 * 978 * @since BuddyPress (2.3.3) 979 * 980 * @param array $item_types an associative array structured for the customizer 977 * @since 2.3.3 978 * 979 * @param array $item_types An associative array structured for the customizer. 980 * @return array $item_types An associative array structured for the customizer. 981 981 */ 982 982 function bp_customizer_nav_menus_set_item_types( $item_types = array() ) { … … 1007 1007 * 'meta_id' with 'id. 1008 1008 * 1009 * @since BuddyPress (2.0.0)1009 * @since 2.0.0 1010 1010 * 1011 1011 * @access private Do not use. … … 1040 1040 * Filter the edit post link to avoid its display in BuddyPress pages. 1041 1041 * 1042 * @since BuddyPress (2.1.0)1042 * @since 2.1.0 1043 1043 * 1044 1044 * @param string $edit_link The edit link. … … 1060 1060 * mentions suggestions? 1061 1061 * 1062 * @since BuddyPress (2.2.0)1062 * @since 2.2.0 1063 1063 * 1064 1064 * @param bool $load_mentions True to load mentions assets, false otherwise. -
trunk/src/bp-core/bp-core-functions.php
r10046 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Common Functions. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 16 15 * Output the BuddyPress version. 17 16 * 18 * @since BuddyPress (1.6.0)17 * @since 1.6.0 19 18 * 20 19 * @uses bp_get_version() To get the BuddyPress version. … … 26 25 * Return the BuddyPress version. 27 26 * 28 * @since BuddyPress (1.6.0)27 * @since 1.6.0 29 28 * 30 29 * @return string The BuddyPress version. … … 37 36 * Output the BuddyPress database version. 38 37 * 39 * @since BuddyPress (1.6.0)38 * @since 1.6.0 40 39 * 41 40 * @uses bp_get_db_version() To get the BuddyPress database version. … … 47 46 * Return the BuddyPress database version. 48 47 * 49 * @since BuddyPress (1.6.0)48 * @since 1.6.0 50 49 * @return string The BuddyPress database version. 51 50 */ … … 57 56 * Output the BuddyPress database version. 58 57 * 59 * @since BuddyPress (1.6.0)58 * @since 1.6.0 60 59 * 61 60 * @uses bp_get_db_version_raw() To get the current database BuddyPress version. … … 67 66 * Return the BuddyPress database version. 68 67 * 69 * @since BuddyPress (1.6)68 * @since 1.6.0 70 69 * 71 70 * @return string The BuddyPress version direct from the database. … … 95 94 * Intended primarily for use in multinetwork installations. 96 95 * 97 * @since BuddyPress (1.2.6)96 * @since 1.2.6 98 97 * 99 98 * @param string $base_prefix Base prefix to use. … … 108 107 * your own awkward callback function for usort(). 109 108 * 110 * @since BuddyPress (2.2.0)109 * @since 2.2.0 111 110 * 112 111 * @param array $items The items to be sorted. Its constituent items can be either associative arrays or objects. … … 157 156 * $sorted_posts = bp_alpha_sort_by_key( $posts, 'post_name' ); 158 157 * 159 * @since BuddyPress (1.9.0)158 * @since 1.9.0 160 159 * 161 160 * @param array $items The items to be sorted. Its constituent items can be either associative arrays or objects. … … 185 184 * Filters the BuddyPress formatted number. 186 185 * 187 * @since BuddyPress (1.2.4)186 * @since 1.2.4 188 187 * 189 188 * @param string $value BuddyPress formatted value. … … 224 223 * For the second argument, $func_args, you should just pass the value of func_get_args(). 225 224 * 226 * @since BuddyPress (1.6)225 * @since 1.6.0 227 226 * 228 227 * @param array $old_args_keys Old argument indexs, keyed to their positions. … … 252 251 * are applied. 253 252 * 254 * @since BuddyPress (r7704)253 * @since r7704 255 254 * 256 255 * @param string|array $args Value to merge with $defaults. … … 279 278 * This is a dynamic filter dependent on the specified key. 280 279 * 281 * @since BuddyPress (2.0.0)280 * @since 2.0.0 282 281 * 283 282 * @param array $r Array of arguments to use. … … 299 298 * This is a dynamic filter dependent on the specified key. 300 299 * 301 * @since BuddyPress (2.0.0)300 * @since 2.0.0 302 301 * 303 302 * @param array $r Array of parsed arguments. … … 315 314 * responsible for limiting the resultset of a template loop. 316 315 * 317 * @since BuddyPress (2.2.0)316 * @since 2.2.0 318 317 * 319 318 * @param string $page_arg The $_REQUEST argument to look for. … … 346 345 * Everything else becomes 'ASC'. 347 346 * 348 * @since BuddyPress (1.8.0)347 * @since 1.8.0 349 348 * 350 349 * @param string $order The 'order' string, as passed to the SQL constructor. … … 365 364 * logic of the replacement, wpdb::esc_like(). 366 365 * 367 * @since BuddyPress (2.1.0)366 * @since 2.1.0 368 367 * 369 368 * @see wpdb::esc_like() for more details on proper use. … … 387 386 * Are we running username compatibility mode? 388 387 * 389 * @since BuddyPress (1.5.0)388 * @since 1.5.0 390 389 * 391 390 * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter. … … 400 399 * Filters whether or not to use username compatibility mode. 401 400 * 402 * @since BuddyPress (1.5.0)401 * @since 1.5.0 403 402 * 404 403 * @param bool $value Whether or not username compatibility mode should be used. … … 413 412 * of BP 1.5. For BP 1.6, the WP Toolbar is the default. 414 413 * 415 * @since BuddyPress (1.5.0)414 * @since 1.5.0 416 415 * 417 416 * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter. … … 436 435 * Filters whether or not to use the admin bar. 437 436 * 438 * @since BuddyPress (1.5.0)437 * @since 1.5.0 439 438 * 440 439 * @param bool $use_admin_bar Whether or not to use the admin bar. … … 448 447 * Returns an array of core component IDs. 449 448 * 450 * @since BuddyPress (2.1.0)449 * @since 2.1.0 451 450 * 452 451 * @return array … … 477 476 * Fetch a list of BP directory pages from the appropriate meta table. 478 477 * 479 * @since BuddyPress (1.5.0)478 * @since 1.5.0 480 479 * 481 480 * @param string $status 'active' to return only pages associated with active components, 'all' to return all saved … … 517 516 * Filters the list of BP directory pages from the appropriate meta table. 518 517 * 519 * @since BuddyPress (1.5.0)518 * @since 1.5.0 520 519 * 521 520 * @param array $page_ids Array of directory pages. … … 531 530 * bp_get_root_blog_id() and go through the setup process again. 532 531 * 533 * @since BuddyPress (1.5.0)532 * @since 1.5.0 534 533 * 535 534 * @param array $blog_page_ids The IDs of the WP pages corresponding to BP … … 543 542 * Get names and slugs for BuddyPress component directory pages. 544 543 * 545 * @since BuddyPress (1.5.0).544 * @since 1.5.0 546 545 * 547 546 * @return object Page names, IDs, and slugs. … … 601 600 * Filters the names and slugs for BuddyPress component directory pages. 602 601 * 603 * @since BuddyPress (1.5.0)602 * @since 1.5.0 604 603 * 605 604 * @param object $pages Object holding page names and slugs. … … 614 613 * content (eg, the 'groups' page created by BP). 615 614 * 616 * @since BuddyPress (1.7.0)615 * @since 1.7.0 617 616 * 618 617 * @param array $components Components to create pages for. … … 714 713 * @link https://buddypress.trac.wordpress.org/ticket/6226 715 714 * 716 * @since BuddyPress (2.2.0)715 * @since 2.2.0 717 716 * 718 717 * @param int $post_id Post ID. … … 754 753 * BP_MEMBERS_SLUG) to override specific component slugs. 755 754 * 756 * @since BuddyPress (1.5.0)755 * @since 1.5.0 757 756 * 758 757 * @param string $root_slug The root slug, which comes from $bp->pages->[component]->slug. … … 767 766 * Filters the default component slug from a WP page root_slug. 768 767 * 769 * @since BuddyPress (1.5.0)768 * @since 1.5.0 770 769 * 771 770 * @param string $slug Short slug for use in the middle of URLs. … … 858 857 * Determine whether BuddyPress should register the bp-themes directory. 859 858 * 860 * @since BuddyPress (1.9.0)859 * @since 1.9.0 861 860 * 862 861 * @return bool True if bp-themes should be registered, false otherwise. … … 885 884 * Filters whether BuddyPress should register the bp-themes directory. 886 885 * 887 * @since BuddyPress (1.9.0)886 * @since 1.9.0 888 887 * 889 888 * @param bool $register If bp-themes should be registered. … … 910 909 * Filters the domain for the root blog. 911 910 * 912 * @since BuddyPress (1.0.1)911 * @since 1.0.1 913 912 * 914 913 * @param string $domain The domain URL for the blog. … … 950 949 * reduced to '/foo/'. 951 950 * 952 * @since BuddyPress (2.3.0)951 * @since 2.3.0 953 952 * 954 953 * @return bool|string Returns false on error, a URL path on success. … … 1001 1000 * Filters the path of the current site. 1002 1001 * 1003 * @since BuddyPress (1.2.0)1002 * @since 1.2.0 1004 1003 * 1005 1004 * @param string $site_path URL to the current site. … … 1013 1012 * Get the current GMT time to save into the DB. 1014 1013 * 1015 * @since BuddyPress (1.2.6)1014 * @since 1.2.6 1016 1015 * 1017 1016 * @param bool $gmt True to use GMT (rather than local) time. Default: true. … … 1026 1025 * Filters the current GMT time to save into the DB. 1027 1026 * 1028 * @since BuddyPress (1.2.6)1027 * @since 1.2.6 1029 1028 * 1030 1029 * @param string $value Current GMT time. … … 1065 1064 * Filters whether or not to bypass BuddyPress' time_since calculations. 1066 1065 * 1067 * @since BuddyPress (1.7.0)1066 * @since 1.7.0 1068 1067 * 1069 1068 * @param bool $value Whether or not to bypass. … … 1079 1078 * Filters the value to use if the time since is unknown. 1080 1079 * 1081 * @since BuddyPress (1.5.0)1080 * @since 1.5.0 1082 1081 * 1083 1082 * @param string $value String representing the time since the older date. … … 1088 1087 * Filters the value to use if the time since is right now. 1089 1088 * 1090 * @since BuddyPress (1.5.0)1089 * @since 1.5.0 1091 1090 * 1092 1091 * @param string $value String representing the time since the older date. … … 1097 1096 * Filters the value to use if the time since is some time ago. 1098 1097 * 1099 * @since BuddyPress (1.5.0)1098 * @since 1.5.0 1100 1099 * 1101 1100 * @param string $value String representing the time since the older date. … … 1234 1233 * Filters the English-language representation of the time elapsed since a given date. 1235 1234 * 1236 * @since BuddyPress (1.7.0)1235 * @since 1.7.0 1237 1236 * 1238 1237 * @param string $output Final 'time since' string. … … 1328 1327 * Filters the 'template_notices' feedback message content. 1329 1328 * 1330 * @since BuddyPress (1.5.5)1329 * @since 1.5.5 1331 1330 * 1332 1331 * @param string $template_message Feedback message content. … … 1347 1346 * Fires after the display of any template_notices feedback messages. 1348 1347 * 1349 * @since BuddyPress (1.1.0)1348 * @since 1.1.0 1350 1349 */ 1351 1350 do_action( 'bp_core_render_message' ); … … 1403 1402 * Use this action to detect the very first activity for a given member. 1404 1403 * 1405 * @since BuddyPress (1.6.0)1404 * @since 1.6.0 1406 1405 * 1407 1406 * @param int $user_id ID of the user whose activity is recorded. … … 1443 1442 * Filters last activity string based on time since date given. 1444 1443 * 1445 * @since BuddyPress (1.2.0)1444 * @since 1.2.0 1446 1445 * 1447 1446 * @param string $last_active Last activity string based on time since date given. … … 1470 1469 * If using the WP functions, do not not hardcode your meta keys. 1471 1470 * 1472 * @since BuddyPress (1.5.0)1471 * @since 1.5.0 1473 1472 * 1474 1473 * @uses apply_filters() Filter 'bp_get_user_meta_key' to modify keys individually. … … 1483 1482 * Filters the meta_key for a given piece of user metadata. 1484 1483 * 1485 * @since BuddyPress (1.5.0)1484 * @since 1.5.0 1486 1485 * 1487 1486 * @param string $key The usermeta meta key. … … 1497 1496 * BP setups. 1498 1497 * 1499 * @since BuddyPress (1.5.0)1498 * @since 1.5.0 1500 1499 * 1501 1500 * @see get_user_meta() For complete details about parameters and return values. … … 1520 1519 * BP setups. 1521 1520 * 1522 * @since BuddyPress (1.5.0)1521 * @since 1.5.0 1523 1522 * 1524 1523 * @see update_user_meta() For complete details about parameters and return values. … … 1543 1542 * BP setups. 1544 1543 * 1545 * @since BuddyPress (1.5.0)1544 * @since 1.5.0 1546 1545 * 1547 1546 * @see delete_user_meta() For complete details about parameters and return values. … … 1563 1562 * Initializes {@link BP_Embed} after everything is loaded. 1564 1563 * 1565 * @since BuddyPress (1.5.0)1564 * @since 1.5.0 1566 1565 */ 1567 1566 function bp_embed_init() { … … 1579 1578 * Are oembeds allowed in activity items? 1580 1579 * 1581 * @since BuddyPress (1.5.0)1580 * @since 1.5.0 1582 1581 * 1583 1582 * @return bool False when activity embed support is disabled; true when … … 1589 1588 * Filters whether or not oEmbeds are allowed in activity items. 1590 1589 * 1591 * @since BuddyPress (1.5.0)1590 * @since 1.5.0 1592 1591 * 1593 1592 * @param bool $value Whether or not oEmbeds are allowed. … … 1599 1598 * Are oembeds allowed in activity replies? 1600 1599 * 1601 * @since BuddyPress (1.5.0)1600 * @since 1.5.0 1602 1601 * 1603 1602 * @return bool False when activity replies embed support is disabled; true … … 1609 1608 * Filters whether or not oEmbeds are allowed in activity replies. 1610 1609 * 1611 * @since BuddyPress (1.5.0)1610 * @since 1.5.0 1612 1611 * 1613 1612 * @param bool $value Whether or not oEmbeds are allowed. … … 1619 1618 * Are oembeds allowed in forum posts? 1620 1619 * 1621 * @since BuddyPress (1.5.0)1620 * @since 1.5.0 1622 1621 * 1623 1622 * @return bool False when forum post embed support is disabled; true when … … 1629 1628 * Filters whether or not oEmbeds are allowed in forum posts. 1630 1629 * 1631 * @since BuddyPress (1.5.0)1630 * @since 1.5.0 1632 1631 * 1633 1632 * @param bool $value Whether or not oEmbeds are allowed. … … 1639 1638 * Are oembeds allowed in private messages? 1640 1639 * 1641 * @since BuddyPress (1.5.0)1640 * @since 1.5.0 1642 1641 * 1643 1642 * @return bool False when private message embed support is disabled; true when … … 1649 1648 * Filters whether or not oEmbeds are allowed in private messages. 1650 1649 * 1651 * @since BuddyPress (1.5.0)1650 * @since 1.5.0 1652 1651 * 1653 1652 * @param bool $value Whether or not oEmbeds are allowed. … … 1661 1660 * Output the correct admin URL based on BuddyPress and WordPress configuration. 1662 1661 * 1663 * @since BuddyPress (1.5.0)1662 * @since 1.5.0 1664 1663 * 1665 1664 * @see bp_get_admin_url() For description of parameters. … … 1674 1673 * Return the correct admin URL based on BuddyPress and WordPress configuration. 1675 1674 * 1676 * @since BuddyPress (1.5.0)1675 * @since 1.5.0 1677 1676 * 1678 1677 * @uses bp_core_do_network_admin() … … 1709 1708 * to hook into certain areas of WordPress's admin. 1710 1709 * 1711 * @since BuddyPress (1.5.0)1710 * @since 1.5.0 1712 1711 * 1713 1712 * @uses bp_is_network_activated() … … 1729 1728 * Filters whether or not BuddyPress should appear in network admin. 1730 1729 * 1731 * @since BuddyPress (1.5.0)1730 * @since 1.5.0 1732 1731 * 1733 1732 * @param bool $retval Whether or not BuddyPress should be in the network admin. … … 1754 1753 * Filters the action name that BuddyPress nav setup callbacks should be hooked to. 1755 1754 * 1756 * @since BuddyPress (1.5.0)1755 * @since 1.5.0 1757 1756 * 1758 1757 * @param string $hook Action name to be attached to. … … 1766 1765 * Is this the root blog? 1767 1766 * 1768 * @since BuddyPress (1.5.0)1767 * @since 1.5.0 1769 1768 * 1770 1769 * @param int $blog_id Optional. Default: the ID of the current blog. … … 1790 1789 * Filters whether or not we're on the root blog. 1791 1790 * 1792 * @since BuddyPress (1.5.0)1791 * @since 1.5.0 1793 1792 * 1794 1793 * @param bool $is_root_blog Whether or not we're on the root blog. … … 1804 1803 * etc.). 1805 1804 * 1806 * @since BuddyPress (1.5.0)1805 * @since 1.5.0 1807 1806 * 1808 1807 * @return int The root site ID. … … 1813 1812 * Filters the ID for the root blog. 1814 1813 * 1815 * @since BuddyPress (1.5.0)1814 * @since 1.5.0 1816 1815 * 1817 1816 * @param int $root_blog_id ID for the root blog. … … 1843 1842 * down this road unless you specifically need to. 1844 1843 * 1845 * @since BuddyPress (1.5.0)1844 * @since 1.5.0 1846 1845 * 1847 1846 * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter. … … 1870 1869 * Filters whether or not we're running in multiblog mode. 1871 1870 * 1872 * @since BuddyPress (1.5.0)1871 * @since 1.5.0 1873 1872 * 1874 1873 * @param bool $retval Whether or not we're running multiblog mode. … … 1885 1884 * 'bp_is_network_activated' and override the auto-determined value. 1886 1885 * 1887 * @since BuddyPress (1.7.0)1886 * @since 1.7.0 1888 1887 * 1889 1888 * @return bool True if BuddyPress is network activated. … … 1906 1905 * Filters whether or not we're active at the network level. 1907 1906 * 1908 * @since BuddyPress (1.7.0)1907 * @since 1.7.0 1909 1908 * 1910 1909 * @param bool $retval Whether or not we're network activated. … … 1931 1930 * Filters the "is_directory" global value. 1932 1931 * 1933 * @since BuddyPress (1.5.0)1932 * @since 1.5.0 1934 1933 * 1935 1934 * @param bool $is_directory Whether or not we're "is_directory". … … 1955 1954 * Filters the "is_item_admin" global value. 1956 1955 * 1957 * @since BuddyPress (1.5.0)1956 * @since 1.5.0 1958 1957 * 1959 1958 * @param bool $is_item_admin Whether or not we're "is_item_admin". … … 1979 1978 * Filters the "is_item_mod" global value. 1980 1979 * 1981 * @since BuddyPress (1.5.0)1980 * @since 1.5.0 1982 1981 * 1983 1982 * @param bool $is_item_mod Whether or not we're "is_item_mod". … … 1990 1989 * Trigger a 404. 1991 1990 * 1992 * @since BuddyPress (1.5.0)1991 * @since 1.5.0 1993 1992 * 1994 1993 * @global WP_Query $wp_query WordPress query object. … … 2003 2002 * Fires inside the triggering of a 404. 2004 2003 * 2005 * @since BuddyPress (1.5.0)2004 * @since 1.5.0 2006 2005 * 2007 2006 * @param string $redirect Redirect type used to determine if redirect_canonical … … 2026 2025 * To avoid security exploits within the theme. 2027 2026 * 2028 * @since BuddyPress (1.6.0)2027 * @since 1.6.0 2029 2028 * 2030 2029 * @uses do_action() Calls 'bp_verify_nonce_request' on $action. … … 2073 2072 * Useful for configurations like reverse proxying. 2074 2073 * 2075 * @since BuddyPress (1.9.0)2074 * @since 1.9.0 2076 2075 * 2077 2076 * @param string $requested_url The requested URL. … … 2090 2089 * Fires at the end of the nonce verification check. 2091 2090 * 2092 * @since BuddyPress (1.6.0)2091 * @since 1.6.0 2093 2092 * 2094 2093 * @param string $action Action nonce. … … 2105 2104 * Return true|false if this is a POST request. 2106 2105 * 2107 * @since BuddyPress (1.9.0)2106 * @since 1.9.0 2108 2107 * @return bool 2109 2108 */ … … 2115 2114 * Return true|false if this is a GET request. 2116 2115 * 2117 * @since BuddyPress (1.9.0)2116 * @since 1.9.0 2118 2117 * @return bool 2119 2118 */ … … 2138 2137 * Filters the locale to be loaded for the language files. 2139 2138 * 2140 * @since BuddyPress (1.0.2)2139 * @since 1.0.2 2141 2140 * 2142 2141 * @param string $value Current locale for the install. … … 2147 2146 * Filters the locations to load language files from. 2148 2147 * 2149 * @since BuddyPress (2.2.0)2148 * @since 2.2.0 2150 2149 * 2151 2150 * @param array $value Array of directories to check for language files in. … … 2233 2232 * Filters the constructed url for use with site searching. 2234 2233 * 2235 * @since BuddyPress (1.0.0)2234 * @since 1.0.0 2236 2235 * 2237 2236 * @param string $value URL for use with site searching. … … 2262 2261 * prevents additional, unnecessary queries from running. 2263 2262 * 2264 * @since BuddyPress (2.1.0)2263 * @since 2.1.0 2265 2264 */ 2266 2265 function bp_remove_adjacent_posts_rel_link() { … … 2289 2288 * logged-in user. 2290 2289 * 2291 * @since BuddyPress (1.9.0)2290 * @since 1.9.0 2292 2291 * 2293 2292 * @return mixed A URL or an array of dummy pages. … … 2359 2358 * menu. 2360 2359 * 2361 * @since BuddyPress (1.9.0)2360 * @since 1.9.0 2362 2361 * 2363 2362 * @return mixed A URL or an array of dummy pages. … … 2430 2429 * proper URL for a given nav item slug (such as 'login' or 'messages'). 2431 2430 * 2432 * @since BuddyPress (1.9.0)2431 * @since 1.9.0 2433 2432 * 2434 2433 * @param string $slug The slug of the nav item: login, register, or one of the … … 2456 2455 * for similar kinds of future requirements, or those implemented by third-party developers. 2457 2456 * 2458 * @since BuddyPress (2.1.0)2457 * @since 2.1.0 2459 2458 * 2460 2459 * @param array $args … … 2486 2485 * if you've built a custom suggestions service. 2487 2486 * 2488 * @since BuddyPress (2.1.0)2487 * @since 2.1.0 2489 2488 * 2490 2489 * @param string $value Custom class to use. Default: none. … … 2511 2510 * Filters the available type of at-mentions. 2512 2511 * 2513 * @since BuddyPress (2.1.0)2512 * @since 2.1.0 2514 2513 * 2515 2514 * @param array|WP_Error $retval Array of results or WP_Error object. … … 2528 2527 * once to get what we need. 2529 2528 * 2530 * @since BuddyPress (2.3.0)2529 * @since 2.3.0 2531 2530 * 2532 2531 * @uses is_multisite() -
trunk/src/bp-core/bp-core-loader.php
r9936 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Core Loader. … … 10 9 */ 11 10 12 // Exit if accessed directly 11 // Exit if accessed directly. 13 12 defined( 'ABSPATH' ) || exit; 14 13 … … 18 17 * Start the members component creation process. 19 18 * 20 * @since BuddyPress (1.5.0)19 * @since 1.5.0 21 20 * 22 21 * @uses BP_Core::bootstrap() … … 38 37 * and optional components. 39 38 * 40 * @since BuddyPress (1.5.0)39 * @since 1.5.0 41 40 */ 42 41 private function bootstrap() { … … 48 47 * Allows plugins to run code ahead of the other components. 49 48 * 50 * @since BuddyPress (1.2.0)49 * @since 1.2.0 51 50 */ 52 51 do_action( 'bp_core_loaded' ); … … 57 56 * Filters the included and optional components. 58 57 * 59 * @since BuddyPress (1.5.0)58 * @since 1.5.0 60 59 * 61 60 * @param array $value Array of included and optional components. … … 66 65 * Filters the required components. 67 66 * 68 * @since BuddyPress (1.5.0)67 * @since 1.5.0 69 68 * 70 69 * @param array $value Array of required components. … … 81 80 * Filters the deactivated components. 82 81 * 83 * @since BuddyPress (1.0.0)82 * @since 1.0.0 84 83 * 85 84 * @param array $value Array of deactivated components. … … 137 136 * Fires after the loading of individual components. 138 137 * 139 * @since BuddyPress (2.0.0)138 * @since 2.0.0 140 139 */ 141 140 do_action( 'bp_core_components_included' ); … … 168 167 * amount of processing, meaning they cannot be set in the BuddyPress class. 169 168 * 170 * @since BuddyPress (1.5.0)169 * @since 1.5.0 171 170 * 172 171 * @see BP_Component::setup_globals() for description of parameters. … … 216 215 * Filters the default user Gravatar. 217 216 * 218 * @since BuddyPress (1.1.0)217 * @since 1.1.0 219 218 * 220 219 * @param string $value Default user Gravatar. … … 225 224 * Filters the default group Gravatar. 226 225 * 227 * @since BuddyPress (1.1.0)226 * @since 1.1.0 228 227 * 229 228 * @param string $value Default group Gravatar. … … 234 233 * Filters the default blog Gravatar. 235 234 * 236 * @since BuddyPress (1.1.0)235 * @since 1.1.0 237 236 * 238 237 * @param string $value Default blog Gravatar. … … 260 259 * Fires at the end of the setup of bp-core globals setting. 261 260 * 262 * @since BuddyPress (1.1.0)261 * @since 1.1.0 263 262 */ 264 263 do_action( 'bp_core_setup_globals' ); … … 268 267 * Setup cache groups 269 268 * 270 * @since BuddyPress (2.2.0)269 * @since 2.2.0 271 270 */ 272 271 public function setup_cache_groups() { … … 284 283 * Set up the BuddyPress Core component. 285 284 * 286 * @since BuddyPress (1.6.0)285 * @since 1.6.0 287 286 * 288 287 * @global BuddyPress $bp BuddyPress global settings object. -
trunk/src/bp-core/bp-core-moderation.php
r10012 r10108 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @since BuddyPress (1.6.0)8 */ 9 10 // Exit if accessed directly 7 * @since 1.6.0 8 */ 9 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 19 19 * of time. 20 20 * 21 * @since BuddyPress (1.6.0)21 * @since 1.6.0 22 22 * 23 23 * @uses current_user_can() To check if the current user can throttle. … … 53 53 * Check for moderation keys and too many links. 54 54 * 55 * @since BuddyPress (1.6.0)55 * @since 1.6.0 56 56 * 57 57 * @uses bp_current_author_ip() To get current user IP address. … … 70 70 * Filters whether or not to bypass checking for moderation keys and too many links. 71 71 * 72 * @since BuddyPress (2.2.0)72 * @since 2.2.0 73 73 * 74 74 * @param bool $value Whether or not to bypass checking. Default false. … … 127 127 * Filters the maximum amount of links allowed to include the user's URL. 128 128 * 129 * @since BuddyPress (1.6.0)129 * @since 1.6.0 130 130 * 131 131 * @param string $num_links How many links found. … … 188 188 * Check for blocked keys. 189 189 * 190 * @since BuddyPress (1.6.0)190 * @since 1.6.0 191 191 * 192 192 * @uses bp_current_author_ip() To get current user IP address. … … 205 205 * Filters whether or not to bypass checking for blocked keys. 206 206 * 207 * @since BuddyPress (2.2.0)207 * @since 2.2.0 208 208 * 209 209 * @param bool $value Whether or not to bypass checking. Default false. … … 296 296 * Get the current user's IP address. 297 297 * 298 * @since BuddyPress (1.6.0)298 * @since 1.6.0 299 299 * 300 300 * @return string IP address. … … 306 306 * Filters the current user's IP address. 307 307 * 308 * @since BuddyPress (1.6.0)308 * @since 1.6.0 309 309 * 310 310 * @param string $retval Current user's IP Address. … … 316 316 * Get the current user's user-agent. 317 317 * 318 * @since BuddyPress (1.6.0)318 * @since 1.6.0 319 319 * 320 320 * @return string User agent string. … … 332 332 * Filters the current user's user-agent. 333 333 * 334 * @since BuddyPress (1.6.0)334 * @since 1.6.0 335 335 * 336 336 * @param string $retval Current user's user-agent. -
trunk/src/bp-core/bp-core-options.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Options. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Get the default site options and their values. 15 14 * 16 * @since BuddyPress (1.6.0)15 * @since 1.6.0 17 16 * 18 17 * @return array Filtered option names and values. … … 107 106 * Filters the default options to be set upon activation. 108 107 * 109 * @since BuddyPress (1.6.0)108 * @since 1.6.0 110 109 * 111 110 * @param array $options Array of default options to set. … … 120 119 * Non-destructive, so existing settings will not be overridden. 121 120 * 122 * @since BuddyPress (1.6.0)121 * @since 1.6.0 123 122 * 124 123 * @uses bp_get_default_options() To get default options. … … 141 140 * Allows previously activated plugins to append their own options. 142 141 * 143 * @since BuddyPress (1.6.0)142 * @since 1.6.0 144 143 */ 145 144 do_action( 'bp_add_options' ); … … 154 153 * Currently unused. 155 154 * 156 * @since BuddyPress (1.6.0)155 * @since 1.6.0 157 156 * 158 157 * @uses bp_get_default_options() To get default options. … … 175 174 * Allows previously activated plugins to append their own options. 176 175 * 177 * @since BuddyPress (1.6.0)176 * @since 1.6.0 178 177 */ 179 178 do_action( 'bp_delete_options' ); … … 185 184 * Currently unused. 186 185 * 187 * @since BuddyPress (1.6.0)186 * @since 1.6.0 188 187 * 189 188 * @uses bp_get_default_options() To get default options. … … 206 205 * Allows previously activated plugins to append their own options. 207 206 * 208 * @since BuddyPress (1.6.0)207 * @since 1.6.0 209 208 */ 210 209 do_action( 'bp_setup_option_filters' ); … … 216 215 * Currently unused. 217 216 * 218 * @since BuddyPress (1.6.0)217 * @since 1.6.0 219 218 * 220 219 * @param bool $value Optional. Default value false. … … 248 247 * The 'bp_get_option' filter is primarily for backward-compatibility. 249 248 * 250 * @since BuddyPress (1.2.0)249 * @since 1.2.0 251 250 * 252 251 * @uses bp_get_root_blog_id() … … 264 263 * Filters the option value for the requested option. 265 264 * 266 * @since BuddyPress (1.2.0)265 * @since 1.2.0 267 266 * 268 267 * @param mixed $value The value for the option. … … 277 276 * settings data on the appropriate blog, given your current setup. 278 277 * 279 * @since BuddyPress (2.0.0)278 * @since 2.0.0 280 279 * 281 280 * @param string $option_name The option key to be set. … … 295 294 * setup. 296 295 * 297 * @since BuddyPress (1.5.0)296 * @since 1.5.0 298 297 * 299 298 * @uses bp_get_root_blog_id() … … 315 314 * setup. 316 315 * 317 * @since BuddyPress (1.5.0)316 * @since 1.5.0 318 317 * 319 318 * @uses bp_get_root_blog_id() … … 404 403 * Filters multisite options retrieved from sitemeta. 405 404 * 406 * @since BuddyPress (1.5.0)405 * @since 1.5.0 407 406 * 408 407 * @param array $value Array of multisite options from sitemeta table. … … 487 486 * Filters the global BP options. 488 487 * 489 * @since BuddyPress (1.5.0)488 * @since 1.5.0 490 489 * 491 490 * @param array $root_blog_options_meta Array of global BP options. … … 501 500 * See {@see bp_core_get_root_options()}. 502 501 * 503 * @since BuddyPress (2.3.0)502 * @since 2.3.0 504 503 * 505 504 * @param string $option Name of the option key. … … 527 526 * Is profile syncing disabled? 528 527 * 529 * @since BuddyPress (1.6.0)528 * @since 1.6.0 530 529 * 531 530 * @uses bp_get_option() To get the profile sync option. … … 541 540 * Filters whether or not profile syncing is disabled. 542 541 * 543 * @since BuddyPress (1.6.0)542 * @since 1.6.0 544 543 * 545 544 * @param bool $value Whether or not syncing is disabled. … … 551 550 * Is the Toolbar hidden for logged out users? 552 551 * 553 * @since BuddyPress (1.6.0)552 * @since 1.6.0 554 553 * 555 554 * @uses bp_get_option() To get the logged out Toolbar option. … … 566 565 * Filters whether or not the toolbar is hidden for logged out users. 567 566 * 568 * @since BuddyPress (1.6.0)567 * @since 1.6.0 569 568 * 570 569 * @param bool $value Whether or not the toolbar is hidden. … … 576 575 * Are members able to upload their own avatars? 577 576 * 578 * @since BuddyPress (1.6.0)577 * @since 1.6.0 579 578 * 580 579 * @uses bp_get_option() To get the avatar uploads option. … … 590 589 * Filters whether or not members are able to upload their own avatars. 591 590 * 592 * @since BuddyPress (1.6.0)591 * @since 1.6.0 593 592 * 594 593 * @param bool $value Whether or not members are able to upload their own avatars. … … 603 602 * found in the database. 604 603 * 605 * @since BuddyPress (2.3.0)604 * @since 2.3.0 606 605 * 607 606 * @param bool|null $default Optional. Fallback value if not found in the database. … … 624 623 * Filters whether or not members are able to upload group avatars. 625 624 * 626 * @since BuddyPress (2.3.0)625 * @since 2.3.0 627 626 * 628 627 * @param bool $disabled Whether or not members are able to upload their groups avatars. … … 635 634 * Are members able to delete their own accounts? 636 635 * 637 * @since BuddyPress (1.6.0)636 * @since 1.6.0 638 637 * 639 638 * @uses bp_get_option() To get the account deletion option. … … 650 649 * Filters whether or not members are able to delete their own accounts. 651 650 * 652 * @since BuddyPress (1.6.0)651 * @since 1.6.0 653 652 * 654 653 * @param bool $value Whether or not members are able to delete their own accounts. … … 660 659 * Are blog and forum activity stream comments disabled? 661 660 * 662 * @since BuddyPress (1.6.0)661 * @since 1.6.0 663 662 * 664 663 * @todo split and move into blog and forum components. … … 676 675 * Filters whether or not blog and forum activity stream comments are disabled. 677 676 * 678 * @since BuddyPress (1.6.0)677 * @since 1.6.0 679 678 * 680 679 * @param bool $value Whether or not blog and forum activity stream comments are disabled. … … 686 685 * Is group creation turned off? 687 686 * 688 * @since BuddyPress (1.6.0)687 * @since 1.6.0 689 688 * 690 689 * @todo Move into groups component. … … 701 700 * Filters whether or not group creation is turned off. 702 701 * 703 * @since BuddyPress (1.6.0)702 * @since 1.6.0 704 703 * 705 704 * @param bool $value Whether or not group creation is turned off. … … 711 710 * Should the old BuddyBar be forced in place of the WP admin bar? 712 711 * 713 * @since BuddyPress (1.6.0)712 * @since 1.6.0 714 713 * 715 714 * @uses bp_get_option() To get the BuddyBar option. … … 725 724 * Filters whether or not BuddyBar should be forced in place of WP Admin Bar. 726 725 * 727 * @since BuddyPress (1.6.0)726 * @since 1.6.0 728 727 * 729 728 * @param bool $value Whether or not BuddyBar should be forced in place of WP Admin Bar. … … 735 734 * Output the group forums root parent forum id. 736 735 * 737 * @since BuddyPress (1.6.0)736 * @since 1.6.0 738 737 * 739 738 * @param bool|string $default Optional. Default: '0'. … … 745 744 * Return the group forums root parent forum id. 746 745 * 747 * @since BuddyPress (1.6.0)746 * @since 1.6.0 748 747 * 749 748 * @uses bp_get_option() To get the root forum ID from the database. … … 758 757 * Filters the group forums root parent forum id. 759 758 * 760 * @since BuddyPress (1.6.0)759 * @since 1.6.0 761 760 * 762 761 * @param int $value The group forums root parent forum id. … … 768 767 * Check whether BuddyPress Group Forums are enabled. 769 768 * 770 * @since BuddyPress (1.6.0)769 * @since 1.6.0 771 770 * 772 771 * @uses bp_get_option() To get the group forums option. … … 782 781 * Filters whether or not BuddyPress Group Forums are enabled. 783 782 * 784 * @since BuddyPress (1.6.0)783 * @since 1.6.0 785 784 * 786 785 * @param bool $value Whether or not BuddyPress Group Forums are enabled. … … 792 791 * Check whether Akismet is enabled. 793 792 * 794 * @since BuddyPress (1.6.0)793 * @since 1.6.0 795 794 * 796 795 * @uses bp_get_option() To get the Akismet option. … … 806 805 * Filters whether or not Akismet is enabled. 807 806 * 808 * @since BuddyPress (1.6.0)807 * @since 1.6.0 809 808 * 810 809 * @param bool $value Whether or not Akismet is enabled. … … 816 815 * Check whether Activity Heartbeat refresh is enabled. 817 816 * 818 * @since BuddyPress (2.0.0)817 * @since 2.0.0 819 818 * 820 819 * @uses bp_get_option() To get the Heartbeat option. … … 830 829 * Filters whether or not Activity Heartbeat refresh is enabled. 831 830 * 832 * @since BuddyPress (2.0.0)831 * @since 2.0.0 833 832 * 834 833 * @param bool $value Whether or not Activity Heartbeat refresh is enabled. … … 840 839 * Get the current theme package ID. 841 840 * 842 * @since BuddyPress (1.7.0)841 * @since 1.7.0 843 842 * 844 843 * @uses get_option() To get the theme package option. … … 854 853 * Filters the current theme package ID. 855 854 * 856 * @since BuddyPress (1.7.0)855 * @since 1.7.0 857 856 * 858 857 * @param string $value The current theme package ID. -
trunk/src/bp-core/bp-core-taxonomy.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress taxonomy functions. … … 8 7 * must switch to the root blog before using the WP functions. 9 8 * 10 * @since BuddyPress (2.2.0) 9 * @since 2.2.0 10 * 11 * @package BuddyPress 12 * @subpackage Core 11 13 */ 14 15 // Exit if accessed directly. 16 defined( 'ABSPATH' ) || exit; 12 17 13 18 /** 14 19 * Register our default taxonomies. 15 20 * 16 * @since BuddyPress (2.2.0)21 * @since 2.2.0 17 22 */ 18 23 function bp_register_default_taxonomies() { … … 27 32 * Set taxonomy terms on a BuddyPress object. 28 33 * 29 * @since BuddyPress (2.2.0)34 * @since 2.2.0 30 35 * 31 36 * @see wp_set_object_terms() for a full description of function and parameters. … … 57 62 * Get taxonomy terms for a BuddyPress object. 58 63 * 59 * @since BuddyPress (2.2.0)64 * @since 2.2.0 60 65 * 61 66 * @see wp_get_object_terms() for a full description of function and parameters. … … 86 91 * Remove taxonomy terms on a BuddyPress object. 87 92 * 88 * @since BuddyPress (2.3.0)93 * @since 2.3.0 89 94 * 90 95 * @see wp_remove_object_terms() for a full description of function and parameters. -
trunk/src/bp-core/bp-core-template-loader.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Template Functions. … … 12 11 */ 13 12 14 // Exit if accessed directly 13 // Exit if accessed directly. 15 14 defined( 'ABSPATH' ) || exit; 16 15 … … 18 17 * Get a BuddyPress template part for display in a theme. 19 18 * 20 * @since BuddyPress (1.7.0)19 * @since 1.7.0 21 20 * 22 21 * @uses bp_locate_template() … … 38 37 * This is a variable hook that is dependent on the slug passed in. 39 38 * 40 * @since BuddyPress (1.7.0)39 * @since 1.7.0 41 40 * 42 41 * @param string $slug Template part slug requested. … … 55 54 * Filters the template parts to be loaded. 56 55 * 57 * @since BuddyPress (1.7.0)56 * @since 1.7.0 58 57 * 59 58 * @param array $templates Array of templates located. … … 74 73 * not found in either of those, it looks in the theme-compat folder last. 75 74 * 76 * @since BuddyPress (1.7.0)75 * @since 1.7.0 77 76 * 78 77 * @param string|array $template_names Template file(s) to search for, in order. … … 143 142 * with bp_locate_template(), this allows for easy template overrides. 144 143 * 145 * @since BuddyPress (1.7.0)144 * @since 1.7.0 146 145 * 147 146 * @param string $location_callback Callback function that returns the stack location. … … 165 164 * Deregister a previously registered template stack location. 166 165 * 167 * @since BuddyPress (1.7.0)166 * @since 1.7.0 168 167 * 169 168 * @see bp_register_template_stack() … … 194 193 * @see bp_register_template_stack() 195 194 * 196 * @since BuddyPress (1.7.0)195 * @since 1.7.0 197 196 * 198 197 * @global array $wp_filter Stores all of the filters. … … 241 240 * Filters the "template stack" list of registered directories where templates can be found. 242 241 * 243 * @since BuddyPress (1.7.0)242 * @since 1.7.0 244 243 * 245 244 * @param array $stack Array of registered directories for template locations. … … 251 250 * Put a template part into an output buffer, and return it. 252 251 * 253 * @since BuddyPress (1.7.0)252 * @since 1.7.0 254 253 * 255 254 * @see bp_get_template_part() for a description of $slug and $name params. … … 292 291 * locations without the use of the other get_*_template() functions. 293 292 * 294 * @since BuddyPress (1.7.0)293 * @since 1.7.0 295 294 * 296 295 * @uses bp_set_theme_compat_templates() … … 316 315 * bp_get_query_template. 317 316 * 318 * @since BuddyPress (1.7.0)317 * @since 1.7.0 319 318 * 320 319 * @param array $templates Array of template files already prepared. … … 334 333 * bp_get_query_template. 335 334 * 336 * @since BuddyPress (1.7.0)335 * @since 1.7.0 337 336 * 338 337 * @param string $template Path to the most appropriate found template file. … … 344 343 * Get the possible subdirectories to check for templates in. 345 344 * 346 * @since BuddyPress (1.7.0)345 * @since 1.7.0 347 346 * 348 347 * @param array $templates Templates we are looking for. … … 360 359 * Filters the possible subdirectories to check for templates in. 361 360 * 362 * @since BuddyPress (1.7.0)361 * @since 1.7.0 363 362 * 364 363 * @param array $locations Array of subfolders to look in. … … 371 370 * Add template locations to template files being searched for. 372 371 * 373 * @since BuddyPress (1.7.0)372 * @since 1.7.0 374 373 * 375 374 * @param array $stacks Array of template locations. … … 393 392 * Filters the template locations to template files being searched for. 394 393 * 395 * @since BuddyPress (1.7.0)394 * @since 1.7.0 396 395 * 397 396 * @param array $value Array of all template locations registered so far. … … 404 403 * Add checks for BuddyPress conditions to 'parse_query' action. 405 404 * 406 * @since BuddyPress (1.7.0)405 * @since 1.7.0 407 406 * 408 407 * @param WP_Query $posts_query … … 430 429 * Allow BuddyPress components to parse the main query. 431 430 * 432 * @since BuddyPress (1.7.0)431 * @since 1.7.0 433 432 * 434 433 * @param WP_Query $posts_query WP_Query instance. Passed by reference. … … 447 446 * from being stomped on accident. 448 447 * 449 * @since BuddyPress (1.7.0)448 * @since 1.7.0 450 449 * 451 450 * @param string $template … … 458 457 * Filters whether or not to override the template being loaded in parent/child themes. 459 458 * 460 * @since BuddyPress (1.7.0)459 * @since 1.7.0 461 460 * 462 461 * @param bool $value Whether or not there is a file override. Default false. … … 474 473 * Filters the final template being loaded in parent/child themes. 475 474 * 476 * @since BuddyPress (1.7.0)475 * @since 1.7.0 477 476 * 478 477 * @param string $template The path to the template file that is being used. … … 484 483 * Set the included template. 485 484 * 486 * @since BuddyPress (1.8.0)485 * @since 1.8.0 487 486 * 488 487 * @param mixed $template Default: false. … … 499 498 * Is a BuddyPress template being included? 500 499 * 501 * @since BuddyPress (1.8.0)500 * @since 1.8.0 502 501 * 503 502 * @return bool True if yes, false if no. … … 510 509 * Attempt to load a custom BP functions file, similar to each themes functions.php file. 511 510 * 512 * @since BuddyPress (1.7.0)511 * @since 1.7.0 513 512 * 514 513 * @global string $pagenow … … 545 544 * Get the templates to use as the endpoint for BuddyPress template parts. 546 545 * 547 * @since BuddyPress (1.7.0)546 * @since 1.7.0 548 547 * 549 548 * @return array Array of possible root level wrapper template files. -
trunk/src/bp-core/bp-core-template.php
r10039 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 81 81 * This is a dynamic filter that is dependent on the provided css_id value. 82 82 * 83 * @since BuddyPress (1.1.0)83 * @since 1.1.0 84 84 * 85 85 * @param string $value HTML list item for the submenu item. … … 113 113 * page. 114 114 * 115 * @since BuddyPress (2.0.0)115 * @since 2.0.0 116 116 * 117 117 * @param string $component … … 134 134 * Filters the directory title for a component. 135 135 * 136 * @since BuddyPress (2.0.0)136 * @since 2.0.0 137 137 * 138 138 * @param string $title Text to be used in <title> tag. … … 228 228 * Filters the current avatar upload step. 229 229 * 230 * @since BuddyPress (1.1.0)230 * @since 1.1.0 231 231 * 232 232 * @param string $step The current avatar upload step. … … 255 255 * Filters the URL of the avatar to crop. 256 256 * 257 * @since BuddyPress (1.1.0)257 * @since 1.1.0 258 258 * 259 259 * @param string $url URL for the avatar. … … 282 282 * Filters the relative file path to the avatar to crop. 283 283 * 284 * @since BuddyPress (1.1.0)284 * @since 1.1.0 285 285 * 286 286 * @param string $src Relative file path for the avatar. … … 311 311 * Returns the name of the BP site. Used in RSS headers. 312 312 * 313 * @since BuddyPress (1.6.0)313 * @since 1.6.0 314 314 */ 315 315 function bp_get_site_name() { … … 318 318 * Filters the name of the BP site. Used in RSS headers. 319 319 * 320 * @since BuddyPress (1.0.0)320 * @since 1.0.0 321 321 * 322 322 * @param string $value Current BP site name. … … 339 339 * and times together with timezone offsets and i18n. 340 340 * 341 * @since BuddyPress (1.1.0)341 * @since 1.1.0 342 342 * 343 343 * @param int|string $time The UNIX timestamp to be formatted. … … 399 399 * Filters the date based on a UNIX timestamp. 400 400 * 401 * @since BuddyPress (1.0.0)401 * @since 1.0.0 402 402 * 403 403 * @param string $formatted_date Formatted date from the timestamp. … … 437 437 * Filters the text used based on context of own profile or someone else's profile. 438 438 * 439 * @since BuddyPress (1.0.0)439 * @since 1.0.0 440 440 * 441 441 * @param string $youtext Context-determined string to display. … … 487 487 * Filters the "action" attribute for search forms. 488 488 * 489 * @since BuddyPress (1.0.0)489 * @since 1.0.0 490 490 * 491 491 * @param string $value Search form action url. … … 497 497 * Generate the basic search form as used in BP-Default's header. 498 498 * 499 * @since BuddyPress (1.0.0)499 * @since 1.0.0 500 500 * 501 501 * @return string HTML <select> element. … … 530 530 * Filters all of the component options available for search scope. 531 531 * 532 * @since BuddyPress (1.5.0)532 * @since 1.5.0 533 533 * 534 534 * @param array $options Array of options to add to select field. … … 544 544 * Filters the complete <select> input used for search scope. 545 545 * 546 * @since BuddyPress (1.0.0)546 * @since 1.0.0 547 547 * 548 548 * @param string $selection_box <select> input for selecting search scope. … … 554 554 * Output the default text for the search box for a given component. 555 555 * 556 * @since BuddyPress (1.5.0)556 * @since 1.5.0 557 557 * 558 558 * @see bp_get_search_default_text() … … 566 566 * Return the default text for the search box for a given component. 567 567 * 568 * @since BuddyPress (1.5.0)568 * @since 1.5.0 569 569 * 570 570 * @param string $component Component name. Default: current component. … … 601 601 * Filters the default text for the search box for a given component. 602 602 * 603 * @since BuddyPress (1.5.0)603 * @since 1.5.0 604 604 * 605 605 * @param string $default_text Default text for search box. … … 634 634 * Output the attributes for a form field. 635 635 * 636 * @since BuddyPress (2.2.0)636 * @since 2.2.0 637 637 * 638 638 * @param string $name The field name to output attributes for. … … 649 649 * manipulation. 650 650 * 651 * @since BuddyPress (2.2.0)651 * @since 2.2.0 652 652 * 653 653 * @param string $name The field name to get attributes for. … … 691 691 * Filter the attributes for a field before rendering output. 692 692 * 693 * @since BuddyPress (2.2.0)693 * @since 2.2.0 694 694 * 695 695 * @param array $attributes The field attributes. … … 729 729 * Filters the requested button output. 730 730 * 731 * @since BuddyPress (1.2.6)731 * @since 1.2.6 732 732 * 733 733 * @param string $contents Button context to be used. … … 788 788 * Filters the excerpt length to trim text to. 789 789 * 790 * @since BuddyPress (1.5.0)790 * @since 1.5.0 791 791 * 792 792 * @param int $length Length of returned string, including ellipsis. … … 797 797 * Filters the excerpt appended text value. 798 798 * 799 * @since BuddyPress (1.5.0)799 * @since 1.5.0 800 800 * 801 801 * @param string $value Text to append to the end of the excerpt. … … 950 950 * Filters the final generated excerpt. 951 951 * 952 * @since BuddyPress (1.1.0)952 * @since 1.1.0 953 953 * 954 954 * @param string $truncate Generated excerpt. … … 987 987 * Filters the total member count in your BP instance. 988 988 * 989 * @since BuddyPress (1.2.0)989 * @since 1.2.0 990 990 * 991 991 * @param int $value Member count. … … 1054 1054 * Filters whether registrations require activation on this installation. 1055 1055 * 1056 * @since BuddyPress (1.2.0)1056 * @since 1.2.0 1057 1057 * 1058 1058 * @param bool $value Whether registrations require activation. Default true. … … 1067 1067 * sanitize_option, we want to reverse this for the plain text arena of emails. 1068 1068 * 1069 * @since BuddyPress (1.7.0)1069 * @since 1.7.0 1070 1070 * 1071 1071 * @see https://buddypress.trac.wordpress.org/ticket/4401 … … 1098 1098 * Filters a client friendly version of the root blog name. 1099 1099 * 1100 * @since BuddyPress (1.7.0)1100 * @since 1.7.0 1101 1101 * 1102 1102 * @param string $subject Client friendy version of the root blog name. … … 1132 1132 * Allows templates to pass parameters into the template loops via AJAX. 1133 1133 * 1134 * @since BuddyPress (1.2.0)1134 * @since 1.2.0 1135 1135 * 1136 1136 * @param string $ajax_querystring Current query string. … … 1156 1156 * Filters the name of the current component. 1157 1157 * 1158 * @since BuddyPress (1.0.0)1158 * @since 1.0.0 1159 1159 * 1160 1160 * @param string|bool $current_component Current component if available or false. … … 1177 1177 * Filters the name of the current action. 1178 1178 * 1179 * @since BuddyPress (1.0.0)1179 * @since 1.0.0 1180 1180 * 1181 1181 * @param string $current_action Current action. … … 1198 1198 * Filters the name of the current item. 1199 1199 * 1200 * @since BuddyPress (1.1.0)1200 * @since 1.1.0 1201 1201 * 1202 1202 * @param string|bool $current_item Current item if available or false. … … 1220 1220 * Filters the value of $bp->action_variables. 1221 1221 * 1222 * @since BuddyPress (1.0.0)1222 * @since 1.0.0 1223 1223 * 1224 1224 * @param array|bool $action_variables Available action variables. … … 1230 1230 * Return the value of a given action variable. 1231 1231 * 1232 * @since BuddyPress (1.5.0)1232 * @since 1.5.0 1233 1233 * 1234 1234 * @param int $position The key of the action_variables array that you want. … … 1246 1246 * Filters the value of a given action variable. 1247 1247 * 1248 * @since BuddyPress (1.5.0)1248 * @since 1.5.0 1249 1249 * 1250 1250 * @param string|bool $action_variable Requested action variable based on position. … … 1278 1278 * Filters the "root domain", the URL of the BP root blog. 1279 1279 * 1280 * @since BuddyPress (1.2.4)1280 * @since 1.2.4 1281 1281 * 1282 1282 * @param string $domain URL of the BP root blog. … … 1288 1288 * Output the root slug for a given component. 1289 1289 * 1290 * @since BuddyPress (1.5.0)1290 * @since 1.5.0 1291 1291 * 1292 1292 * @param string $component The component name. … … 1320 1320 * from $bp->groups->root_slug. 1321 1321 * 1322 * @since BuddyPress (1.5.0)1322 * @since 1.5.0 1323 1323 * 1324 1324 * @param string $component Optional. Defaults to the current component. … … 1358 1358 * Filters the root slug for given component. 1359 1359 * 1360 * @since BuddyPress (1.5.0)1360 * @since 1.5.0 1361 1361 * 1362 1362 * @param string $root_slug Root slug for given component. … … 1369 1369 * Return the component name based on a root slug. 1370 1370 * 1371 * @since BuddyPress (1.5.0)1371 * @since 1.5.0 1372 1372 * 1373 1373 * @param string $root_slug Needle to our active component haystack. … … 1404 1404 * Filters whether or not a user has access. 1405 1405 * 1406 * @since BuddyPress (1.2.4)1406 * @since 1.2.4 1407 1407 * 1408 1408 * @param bool $has_access Whether or not user has access. … … 1414 1414 * Output the search slug. 1415 1415 * 1416 * @since BuddyPress (1.5.0)1416 * @since 1.5.0 1417 1417 * 1418 1418 * @uses bp_get_search_slug() … … 1424 1424 * Return the search slug. 1425 1425 * 1426 * @since BuddyPress (1.5.0)1426 * @since 1.5.0 1427 1427 * 1428 1428 * @return string The search slug. Default: 'search'. … … 1433 1433 * Filters the search slug. 1434 1434 * 1435 * @since BuddyPress (1.5.0)1435 * @since 1.5.0 1436 1436 * 1437 1437 * @const string BP_SEARCH_SLUG The search slug. Default "search". … … 1456 1456 * Filters the ID of the currently displayed user. 1457 1457 * 1458 * @since BuddyPress (1.0.0)1458 * @since 1.0.0 1459 1459 * 1460 1460 * @param int $id ID of the currently displayed user. … … 1479 1479 * Filters the ID of the currently logged-in user. 1480 1480 * 1481 * @since BuddyPress (1.0.0)1481 * @since 1.0.0 1482 1482 * 1483 1483 * @param int $id ID of the currently logged-in user. … … 1497 1497 * - the component's id, or 'canonical' name. 1498 1498 * 1499 * @since BuddyPress (1.5.0)1499 * @since 1.5.0 1500 1500 * 1501 1501 * @param string $component Name of the component being checked. … … 1566 1566 * Filters whether the current page belongs to the specified component. 1567 1567 * 1568 * @since BuddyPress (1.5.0)1568 * @since 1.5.0 1569 1569 * 1570 1570 * @param bool $is_current_component Whether or not the current page belongs to specified component. … … 1586 1586 * the current_action is 'members'. 1587 1587 * 1588 * @since BuddyPress (1.5.0)1588 * @since 1.5.0 1589 1589 * 1590 1590 * @param string $action The action being tested against. … … 1608 1608 * $action_variables[0] is 'group-settings'. 1609 1609 * 1610 * @since BuddyPress (1.5.0)1610 * @since 1.5.0 1611 1611 * 1612 1612 * @param string $action_variable The action_variable being tested against. … … 1637 1637 * Filters whether the current page matches a given action_variable. 1638 1638 * 1639 * @since BuddyPress (1.5.0)1639 * @since 1.5.0 1640 1640 * 1641 1641 * @param bool $is_action_variable Whether the current page matches a given action_variable. … … 1659 1659 * Filters whether or not an item is the current item. 1660 1660 * 1661 * @since BuddyPress (2.1.0)1661 * @since 2.1.0 1662 1662 * 1663 1663 * @param bool $retval Whether or not an item is the current item. … … 1683 1683 * Filters whether or not an item is the a single item. (group, user, etc) 1684 1684 * 1685 * @since BuddyPress (2.1.0)1685 * @since 2.1.0 1686 1686 * 1687 1687 * @param bool $retval Whether or not an item is a single item. … … 1707 1707 * Filters whether or not the logged-in user is an admin for the current item. 1708 1708 * 1709 * @since BuddyPress (2.1.0)1709 * @since 2.1.0 1710 1710 * 1711 1711 * @param bool $retval Whether or not the logged-in user is an admin. … … 1731 1731 * Filters whether or not the logged-in user is a mod for the current item. 1732 1732 * 1733 * @since BuddyPress (2.1.0)1733 * @since 2.1.0 1734 1734 * 1735 1735 * @param bool $retval Whether or not the logged-in user is a mod. … … 1754 1754 * Filters whether or not user is on a component directory page. 1755 1755 * 1756 * @since BuddyPress (2.1.0)1756 * @since 2.1.0 1757 1757 * 1758 1758 * @param bool $retval Whether or not user is on a component directory page. … … 1796 1796 * Filters whether or not a component's URL should be in the root, not under a member page. 1797 1797 * 1798 * @since BuddyPress (2.1.0)1798 * @since 2.1.0 1799 1799 * 1800 1800 * @param bool $retval Whether or not URL should be in the root. … … 1808 1808 * Corresponds to the setting in wp-admin's Settings > Reading screen. 1809 1809 * 1810 * @since BuddyPress (1.5.0)1810 * @since 1.5.0 1811 1811 * 1812 1812 * @global int $current_blog WordPress global for the current blog. … … 1844 1844 * Filters whether or not the specified BuddyPress component directory is set to be the front page. 1845 1845 * 1846 * @since BuddyPress (1.5.0)1846 * @since 1.5.0 1847 1847 * 1848 1848 * @param bool $value Whether or not the specified component directory is set as front page. … … 1874 1874 * Filters whether or not current page is a blog page or not. 1875 1875 * 1876 * @since BuddyPress (1.5.0)1876 * @since 1.5.0 1877 1877 * 1878 1878 * @param bool $is_blog_page Whether or not current page is a blog page. … … 1891 1891 * is unset. Thus the addition of the bp_is_user() check. 1892 1892 * 1893 * @since BuddyPress (1.7.0)1893 * @since 1.7.0 1894 1894 * 1895 1895 * @return bool True if it's a BuddyPress page, false otherwise. … … 1901 1901 * Filters whether or not this is a BuddyPress component. 1902 1902 * 1903 * @since BuddyPress (1.7.0)1903 * @since 1.7.0 1904 1904 * 1905 1905 * @param bool $retval Whether or not this is a BuddyPress component. … … 1913 1913 * Check whether a given component (or feature of a component) is active. 1914 1914 * 1915 * @since BuddyPress (1.2.0)See r2539.1916 * @since BuddyPress (2.3.0)Added $feature as a parameter.1915 * @since 1.2.0 See r2539. 1916 * @since 2.3.0 Added $feature as a parameter. 1917 1917 * 1918 1918 * @param string $component The component name. … … 1945 1945 * that you are checking of active status of. 1946 1946 * 1947 * @since BuddyPress (2.3.0)1947 * @since 2.3.0 1948 1948 * 1949 1949 * @param bool $retval … … 1956 1956 * Filters whether or not a given component has been activated by the admin. 1957 1957 * 1958 * @since BuddyPress (2.1.0)1958 * @since 2.1.0 1959 1959 * 1960 1960 * @param bool $retval Whether or not a given component has been activated by the admin. … … 2039 2039 * Check whether the current page is part of the Notifications component. 2040 2040 * 2041 * @since BuddyPress (1.9.0)2041 * @since 1.9.0 2042 2042 * 2043 2043 * @return bool True if the current page is part of the Notifications component. … … 2086 2086 * Is the current page the activity directory? 2087 2087 * 2088 * @since BuddyPress (2.0.0)2088 * @since 2.0.0 2089 2089 * 2090 2090 * @return True if the current page is the activity directory. … … 2112 2112 * Is the current page the members directory? 2113 2113 * 2114 * @since BuddyPress (2.0.0)2114 * @since 2.0.0 2115 2115 * 2116 2116 * @return True if the current page is the members directory. … … 2142 2142 * Filters whether or not current page is part of the profile for the logged-in user. 2143 2143 * 2144 * @since BuddyPress (1.2.4)2144 * @since 1.2.4 2145 2145 * 2146 2146 * @param bool $my_profile Whether or not current page is part of the profile for the logged-in user. … … 2272 2272 * Eg http://example.com/members/joe/forums/topics/. 2273 2273 * 2274 * @since BuddyPress (1.5.0)2274 * @since 1.5.0 2275 2275 * 2276 2276 * @return bool True if the current page is a user's Topics Started page. … … 2285 2285 * Eg http://example.com/members/joe/forums/replies/. 2286 2286 * 2287 * @since BuddyPress (1.5.0)2287 * @since 1.5.0 2288 2288 * 2289 2289 * @return bool True if the current page is a user's Replied To forums page. … … 2364 2364 * Eg http://example.com/members/joe/notifications/ (or a subpage thereof). 2365 2365 * 2366 * @since BuddyPress (1.9.0)2366 * @since 1.9.0 2367 2367 * 2368 2368 * @return bool True if the current page is a user's Notifications page. … … 2388 2388 * Eg http://example.com/members/joe/settings/general/. 2389 2389 * 2390 * @since BuddyPress (1.5.0)2390 * @since 1.5.0 2391 2391 * 2392 2392 * @return bool True if the current page is a user's General Settings page. … … 2401 2401 * Eg http://example.com/members/joe/settings/notifications/. 2402 2402 * 2403 * @since BuddyPress (1.5.0)2403 * @since 1.5.0 2404 2404 * 2405 2405 * @return bool True if the current page is a user's Notification Settings page. … … 2414 2414 * Eg http://example.com/members/joe/settings/delete-account/. 2415 2415 * 2416 * @since BuddyPress (1.5.0)2416 * @since 1.5.0 2417 2417 * 2418 2418 * @return bool True if the current page is a user's Delete Account page. … … 2427 2427 * Eg http://example.com/members/joe/settings/profile/. 2428 2428 * 2429 * @since BuddyPress (2.0.0)2429 * @since 2.0.0 2430 2430 * 2431 2431 * @return bool True if the current page is a user's Profile Settings page. … … 2440 2440 * Is the current page the groups directory ? 2441 2441 * 2442 * @since BuddyPress (2.0.0)2442 * @since 2.0.0 2443 2443 * 2444 2444 * @return True if the current page is the groups directory. … … 2629 2629 * Is the current page the blogs directory ? 2630 2630 * 2631 * @since BuddyPress (2.0.0)2631 * @since 2.0.0 2632 2632 * 2633 2633 * @return True if the current page is the blogs directory. … … 2977 2977 * Filters the BuddyPress classes to be added to body_class() 2978 2978 * 2979 * @since BuddyPress (1.1.0)2979 * @since 1.1.0 2980 2980 * 2981 2981 * @param array $classes Array of body classes to add. … … 2993 2993 * Hooked to the 'post_class' filter. 2994 2994 * 2995 * @since BuddyPress (2.1.0)2995 * @since 2.1.0 2996 2996 * 2997 2997 * @param array $wp_classes The post classes coming from WordPress. … … 3057 3057 * 3058 3058 * @access private 3059 * @since BuddyPress (1.7.0)3059 * @since 1.7.0 3060 3060 * 3061 3061 * @param array $a First item. … … 3079 3079 * Get the items registered in the primary and secondary BuddyPress navigation menus. 3080 3080 * 3081 * @since BuddyPress (1.7.0)3081 * @since 1.7.0 3082 3082 * 3083 3083 * @return array A multidimensional array of all navigation items. … … 3158 3158 * Filters the items registered in the primary and secondary BuddyPress navigation menus. 3159 3159 * 3160 * @since BuddyPress (1.7.0)3160 * @since 1.7.0 3161 3161 * 3162 3162 * @param array $menus Array of items registered in the primary and secondary BuddyPress navigation. … … 3168 3168 * Display a navigation menu. 3169 3169 * 3170 * @since BuddyPress (1.7.0)3170 * @since 1.7.0 3171 3171 * 3172 3172 * @param string|array $args { … … 3227 3227 * Filters the parsed bp_nav_menu arguments. 3228 3228 * 3229 * @since BuddyPress (1.7.0)3229 * @since 1.7.0 3230 3230 * 3231 3231 * @param array $args Array of parsed arguments. … … 3252 3252 * Filters the allowed tags for the wp_nav_menu_container. 3253 3253 * 3254 * @since BuddyPress (1.7.0)3254 * @since 1.7.0 3255 3255 * 3256 3256 * @param array $value Array of allowed tags. Default 'div' and 'nav'. … … 3270 3270 * Filters the BuddyPress menu objects. 3271 3271 * 3272 * @since BuddyPress (1.7.0)3272 * @since 1.7.0 3273 3273 * 3274 3274 * @param array $value Array of nav menu objects. … … 3302 3302 * Allow plugins to hook into the menu to add their own <li>'s 3303 3303 * 3304 * @since BuddyPress (1.7.0)3304 * @since 1.7.0 3305 3305 * 3306 3306 * @param array $items Array of nav menu items. … … 3322 3322 * Filters the final BuddyPress menu output. 3323 3323 * 3324 * @since BuddyPress (1.7.0)3324 * @since 1.7.0 3325 3325 * 3326 3326 * @param string $nav_menu Final nav menu output. -
trunk/src/bp-core/bp-core-theme-compatibility.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Core Theme Compatibility. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 32 31 * extending this class. 33 32 * 34 * @since BuddyPress (1.7.0)33 * @since 1.7.0 35 34 * 36 35 * @todo We should probably do something similar to BP_Component::start(). … … 60 59 * Pass the $properties to the object on creation. 61 60 * 62 * @since BuddyPress (1.7.0)61 * @since 1.7.0 63 62 * 64 63 * @param array $properties Array of properties for BP_Theme_Compat. … … 73 72 * Themes should use this method in their constructor. 74 73 * 75 * @since BuddyPress (1.7.0)74 * @since 1.7.0 76 75 */ 77 76 protected function start() { … … 92 91 * {@link BP_Legacy::setup_globals()} for an example. 93 92 * 94 * @since BuddyPress (1.7.0)93 * @since 1.7.0 95 94 */ 96 95 protected function setup_globals() {} … … 102 101 * {@link BP_Legacy::setup_actions()} for an example. 103 102 * 104 * @since BuddyPress (1.7.0)103 * @since 1.7.0 105 104 */ 106 105 protected function setup_actions() {} … … 109 108 * Set a theme's property. 110 109 * 111 * @since BuddyPress (1.7.0)110 * @since 1.7.0 112 111 * 113 112 * @param string $property Property name. … … 123 122 * Get a theme's property. 124 123 * 125 * @since BuddyPress (1.7.0)124 * @since 1.7.0 126 125 * 127 126 * @param string $property Property name. … … 140 139 * Set up the default theme compat theme. 141 140 * 142 * @since BuddyPress (1.7.0)141 * @since 1.7.0 143 142 * 144 143 * @param string $theme Optional. The unique ID identifier of a theme package. … … 162 161 * default and include their own BuddyPress compatibility layers for their themes. 163 162 * 164 * @since BuddyPress (1.7.0)163 * @since 1.7.0 165 164 * 166 165 * @uses apply_filters() … … 173 172 * Filters the ID of the theme package being used. 174 173 * 175 * @since BuddyPress (1.7.0)174 * @since 1.7.0 176 175 * 177 176 * @param string $id ID of the theme package in use. … … 186 185 * default and include their own BuddyPress compatibility layers for their themes. 187 186 * 188 * @since BuddyPress (1.7.0)187 * @since 1.7.0 189 188 * 190 189 * @uses apply_filters() … … 197 196 * Filters the name of the theme package being used. 198 197 * 199 * @since BuddyPress (1.7.0)198 * @since 1.7.0 200 199 * 201 200 * @param string $name Name of the theme package in use. … … 210 209 * default and include their own BuddyPress compatibility layers for their themes. 211 210 * 212 * @since BuddyPress (1.7.0)211 * @since 1.7.0 213 212 * 214 213 * @uses apply_filters() … … 221 220 * Filters the version of the theme package being used. 222 221 * 223 * @since BuddyPress (1.7.0)222 * @since 1.7.0 224 223 * 225 224 * @param string $version The version string of the theme package in use. … … 234 233 * their own BuddyPress compatibility layers for their themes. 235 234 * 236 * @since BuddyPress (1.7.0)235 * @since 1.7.0 237 236 * 238 237 * @uses apply_filters() … … 245 244 * Filters the absolute path of the theme package being used. 246 245 * 247 * @since BuddyPress (1.7.0)246 * @since 1.7.0 248 247 * 249 248 * @param string $dir The absolute path of the theme package in use. … … 259 258 * themes. 260 259 * 261 * @since BuddyPress (1.7.0)260 * @since 1.7.0 262 261 * 263 262 * @uses apply_filters() … … 270 269 * Filters the URL of the theme package being used. 271 270 * 272 * @since BuddyPress (1.7.0)271 * @since 1.7.0 273 272 * 274 273 * @param string $url URL of the theme package in use. … … 283 282 * do so using bp_detect_theme_compat_with_current_theme(). 284 283 * 285 * @since BuddyPress (1.9.0)284 * @since 1.9.0 286 285 * 287 286 * @uses bp_detect_theme_compat_with_current_theme() … … 297 296 * Filters whether or not to use theme compat for the active theme. 298 297 * 299 * @since BuddyPress (1.9.0)298 * @since 1.9.0 300 299 * 301 300 * @param bool $use_with_current_theme True if the current theme needs theme compatibility. … … 316 315 * presence as an indicator that theme compatibility is not required 317 316 * 318 * @since BuddyPress (1.9.0)317 * @since 1.9.0 319 318 * 320 319 * @return bool True if the current theme needs theme compatibility. … … 354 353 * Is the current page using theme compatibility? 355 354 * 356 * @since BuddyPress (1.7.0)355 * @since 1.7.0 357 356 * 358 357 * @return bool True if the current page uses theme compatibility. … … 371 370 * Set the flag that tells whether the current page is using theme compatibility. 372 371 * 373 * @since BuddyPress (1.7.0)372 * @since 1.7.0 374 373 * 375 374 * @param bool $set True to set the flag to true, false to set it to false. … … 389 388 * to override them, or see what files are being scanned for inclusion. 390 389 * 391 * @since BuddyPress (1.7.0)390 * @since 1.7.0 392 391 * 393 392 * @param array $templates The template stack. … … 407 406 * to override it, or see what file is being included. 408 407 * 409 * @since BuddyPress (1.7.0)408 * @since 1.7.0 410 409 * 411 410 * @param string $template The template currently in use. … … 425 424 * if BuddyPress was able to find a more appropriate template. 426 425 * 427 * @since BuddyPress (1.7.0)426 * @since 1.7.0 428 427 * 429 428 * @param string $template The template originally selected by WP. … … 440 439 * Check whether a given template is the one that WP originally selected to display current page. 441 440 * 442 * @since BuddyPress (1.7.0)441 * @since 1.7.0 443 442 * 444 443 * @param string $template The template name to check. … … 463 462 * {@link BuddyPress::register_theme_packages()}. 464 463 * 465 * @since BuddyPress (1.7.0)464 * @since 1.7.0 466 465 * 467 466 * @see BP_Theme_Compat for a description of the $theme parameter arguments. … … 501 500 * that template functions - things like is_page() - don't throw errors. 502 501 * 503 * @since BuddyPress (1.7.0)502 * @since 1.7.0 504 503 * 505 504 * @global WP_Query $wp_query WordPress database access object. … … 623 622 * Reset main query vars and filter 'the_content' to output a BuddyPress template part as needed. 624 623 * 625 * @since BuddyPress (1.7.0)624 * @since 1.7.0 626 625 * 627 626 * @uses bp_is_single_user() To check if page is single user. … … 661 660 * with some other template part. 662 661 * 663 * @since BuddyPress (1.7.0)662 * @since 1.7.0 664 663 */ 665 664 do_action( 'bp_template_include_reset_dummy_post_data' ); … … 701 700 * Filters the template name to include. 702 701 * 703 * @since BuddyPress (1.7.0)702 * @since 1.7.0 704 703 * 705 704 * @param string $template Template name. … … 715 714 * exist in the currently active theme. 716 715 * 717 * @since BuddyPress (1.7.0)716 * @since 1.7.0 718 717 * 719 718 * @param string $content Original post content. … … 735 734 * Filters the content to replace in the post. 736 735 * 737 * @since BuddyPress (1.7.0)736 * @since 1.7.0 738 737 * 739 738 * @param string $content Original post content. … … 761 760 * Are we currently replacing the_content? 762 761 * 763 * @since BuddyPress (1.8.0)762 * @since 1.8.0 764 763 * 765 764 * @return bool True if the_content is currently in the process of being … … 778 777 * restored later. 779 778 * 780 * @since BuddyPress (1.7.0)779 * @since 1.7.0 781 780 * 782 781 * @global WP_filter $wp_filter … … 834 833 * Restore filters that were removed using bp_remove_all_filters(). 835 834 * 836 * @since BuddyPress (1.7.0)835 * @since 1.7.0 837 836 * 838 837 * @global WP_filter $wp_filter … … 890 889 * Force comments_status to 'closed' for BuddyPress post types. 891 890 * 892 * @since BuddyPress (1.7.0)891 * @since 1.7.0 893 892 * 894 893 * @param bool $open True if open, false if closed. … … 904 903 * Filters whether or not to force comments_status to closed for BuddyPress post types. 905 904 * 906 * @since BuddyPress (1.7.0)905 * @since 1.7.0 907 906 * 908 907 * @param bool $retval Whether or not we are on a BuddyPress post type. … … 927 926 * wonkiness. 928 927 * 929 * @since BuddyPress (1.9.2)928 * @since 1.9.2 930 929 * 931 930 * @param string $retval The current post content. … … 948 947 * Restores the 'is_single' and 'is_page' flags if toggled by BuddyPress. 949 948 * 950 * @since BuddyPress (1.9.2)949 * @since 1.9.2 951 950 * 952 951 * @see bp_theme_compat_toggle_is_page() -
trunk/src/bp-core/bp-core-update.php
r10012 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Updater. … … 16 15 * If there is no raw DB version, we infer that this is the first installation. 17 16 * 18 * @since BuddyPress (1.7.0)17 * @since 1.7.0 19 18 * 20 19 * @uses get_option() … … 24 23 */ 25 24 function bp_is_install() { 26 25 return ! bp_get_db_version_raw(); 27 26 } 28 27 … … 34 33 * an update. 35 34 * 36 * @since BuddyPress (1.6.0)35 * @since 1.6.0 37 36 * 38 37 * @uses get_option() … … 43 42 function bp_is_update() { 44 43 45 46 47 48 49 50 51 52 53 44 // Current DB version of this site (per site in a multisite network) 45 $current_db = bp_get_option( '_bp_db_version' ); 46 $current_live = bp_get_db_version(); 47 48 // Compare versions (cast as int and bool to be safe) 49 $is_update = (bool) ( (int) $current_db < (int) $current_live ); 50 51 // Return the product of version comparison 52 return $is_update; 54 53 } 55 54 … … 57 56 * Determine whether BuddyPress is in the process of being activated. 58 57 * 59 * @since BuddyPress (1.6.0)58 * @since 1.6.0 60 59 * 61 60 * @uses buddypress() … … 66 65 */ 67 66 function bp_is_activation( $basename = '' ) { 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 67 $bp = buddypress(); 68 $action = false; 69 70 if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) ) { 71 $action = $_REQUEST['action']; 72 } elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) ) { 73 $action = $_REQUEST['action2']; 74 } 75 76 // Bail if not activating 77 if ( empty( $action ) || !in_array( $action, array( 'activate', 'activate-selected' ) ) ) { 78 return false; 79 } 80 81 // The plugin(s) being activated 82 if ( $action == 'activate' ) { 83 $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array(); 84 } else { 85 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); 86 } 87 88 // Set basename if empty 89 if ( empty( $basename ) && !empty( $bp->basename ) ) { 90 $basename = $bp->basename; 91 } 92 93 // Bail if no basename 94 if ( empty( $basename ) ) { 95 return false; 96 } 97 98 // Is BuddyPress being activated? 99 return in_array( $basename, $plugins ); 101 100 } 102 101 … … 104 103 * Determine whether BuddyPress is in the process of being deactivated. 105 104 * 106 * @since BuddyPress (1.6.0)105 * @since 1.6.0 107 106 * 108 107 * @uses buddypress() … … 113 112 */ 114 113 function bp_is_deactivation( $basename = '' ) { 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 114 $bp = buddypress(); 115 $action = false; 116 117 if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) ) { 118 $action = $_REQUEST['action']; 119 } elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) ) { 120 $action = $_REQUEST['action2']; 121 } 122 123 // Bail if not deactivating 124 if ( empty( $action ) || !in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) ) { 125 return false; 126 } 127 128 // The plugin(s) being deactivated 129 if ( 'deactivate' == $action ) { 130 $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array(); 131 } else { 132 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); 133 } 134 135 // Set basename if empty 136 if ( empty( $basename ) && !empty( $bp->basename ) ) { 137 $basename = $bp->basename; 138 } 139 140 // Bail if no basename 141 if ( empty( $basename ) ) { 142 return false; 143 } 144 145 // Is bbPress being deactivated? 146 return in_array( $basename, $plugins ); 148 147 } 149 148 … … 151 150 * Update the BP version stored in the database to the current version. 152 151 * 153 * @since BuddyPress (1.6.0)152 * @since 1.6.0 154 153 * 155 154 * @uses bp_get_db_version() To get BuddyPress's database version. … … 157 156 */ 158 157 function bp_version_bump() { 159 158 bp_update_option( '_bp_db_version', bp_get_db_version() ); 160 159 } 161 160 … … 163 162 * Set up the BuddyPress updater. 164 163 * 165 * @since BuddyPress (1.6.0)164 * @since 1.6.0 166 165 */ 167 166 function bp_setup_updater() { 168 167 169 170 171 172 173 174 168 // Are we running an outdated version of BuddyPress? 169 if ( ! bp_is_update() ) { 170 return; 171 } 172 173 bp_version_updater(); 175 174 } 176 175 … … 185 184 * to correct issues with BuddyPress metadata silently on software update. 186 185 * 187 * @since BuddyPress (1.7.0)186 * @since 1.7.0 188 187 */ 189 188 function bp_version_updater() { 190 189 191 192 193 194 195 196 197 * @since BuddyPress (1.7.0) 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 190 // Get the raw database version 191 $raw_db_version = (int) bp_get_db_version_raw(); 192 193 /** 194 * Filters the default components to activate for a new install. 195 * 196 * @since 1.7.0 197 * 198 * @param array $value Array of default components to activate. 199 */ 200 $default_components = apply_filters( 'bp_new_install_default_components', array( 201 'activity' => 1, 202 'members' => 1, 203 'settings' => 1, 204 'xprofile' => 1, 205 'notifications' => 1, 206 ) ); 207 208 require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' ); 209 210 // Install BP schema and activate only Activity and XProfile 211 if ( bp_is_install() ) { 212 213 // Apply schema and set Activity and XProfile components as active 214 bp_core_install( $default_components ); 215 bp_update_option( 'bp-active-components', $default_components ); 216 bp_core_add_page_mappings( $default_components, 'delete' ); 217 218 // Upgrades 219 } else { 220 221 // Run the schema install to update tables 222 bp_core_install(); 223 224 // 1.5.0 225 if ( $raw_db_version < 1801 ) { 226 bp_update_to_1_5(); 227 bp_core_add_page_mappings( $default_components, 'delete' ); 228 } 229 230 // 1.6.0 231 if ( $raw_db_version < 6067 ) { 232 bp_update_to_1_6(); 233 } 234 235 // 1.9.0 236 if ( $raw_db_version < 7553 ) { 237 bp_update_to_1_9(); 238 } 239 240 // 1.9.2 241 if ( $raw_db_version < 7731 ) { 242 bp_update_to_1_9_2(); 243 } 244 245 // 2.0.0 246 if ( $raw_db_version < 7892 ) { 247 bp_update_to_2_0(); 248 } 249 250 // 2.0.1 251 if ( $raw_db_version < 8311 ) { 252 bp_update_to_2_0_1(); 253 } 254 255 // 2.2.0 256 if ( $raw_db_version < 9181 ) { 257 bp_update_to_2_2(); 258 } 259 260 // 2.3.0 261 if ( $raw_db_version < 9615 ) { 262 bp_update_to_2_3(); 263 } 264 } 265 266 /** All done! *************************************************************/ 267 268 // Bump the version 269 bp_version_bump(); 271 270 } 272 271 … … 276 275 * `dbDelta()` cannot handle certain operations - like changing indexes - so we do it here instead. 277 276 * 278 * @since BuddyPress (2.3.0)277 * @since 2.3.0 279 278 */ 280 279 function bp_pre_schema_upgrade() { 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 280 global $wpdb; 281 282 $raw_db_version = (int) bp_get_db_version_raw(); 283 $bp_prefix = bp_core_get_table_prefix(); 284 285 // 2.3.0: Change index lengths to account for utf8mb4. 286 if ( $raw_db_version < 9695 ) { 287 // table_name => columns. 288 $tables = array( 289 $bp_prefix . 'bp_activity_meta' => array( 'meta_key' ), 290 $bp_prefix . 'bp_groups_groupmeta' => array( 'meta_key' ), 291 $bp_prefix . 'bp_messages_meta' => array( 'meta_key' ), 292 $bp_prefix . 'bp_notifications_meta' => array( 'meta_key' ), 293 $bp_prefix . 'bp_user_blogs_blogmeta' => array( 'meta_key' ), 294 $bp_prefix . 'bp_xprofile_meta' => array( 'meta_key' ), 295 ); 296 297 foreach ( $tables as $table_name => $indexes ) { 298 foreach ( $indexes as $index ) { 299 if ( $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", bp_esc_like( $table_name ) ) ) ) { 300 $wpdb->query( "ALTER TABLE {$table_name} DROP INDEX {$index}" ); 301 } 302 } 303 } 304 } 306 305 } 307 306 … … 313 312 * Database update methods based on version numbers. 314 313 * 315 * @since BuddyPress (1.7.0)314 * @since 1.7.0 316 315 */ 317 316 function bp_update_to_1_5() { 318 317 319 320 321 322 323 324 325 318 // Delete old database version options 319 delete_site_option( 'bp-activity-db-version' ); 320 delete_site_option( 'bp-blogs-db-version' ); 321 delete_site_option( 'bp-friends-db-version' ); 322 delete_site_option( 'bp-groups-db-version' ); 323 delete_site_option( 'bp-messages-db-version' ); 324 delete_site_option( 'bp-xprofile-db-version' ); 326 325 } 327 326 … … 331 330 * Database update methods based on version numbers. 332 331 * 333 * @since BuddyPress (1.7.0)332 * @since 1.7.0 334 333 */ 335 334 function bp_update_to_1_6() { 336 335 337 338 339 340 341 342 343 344 345 346 347 336 // Delete possible site options 337 delete_site_option( 'bp-db-version' ); 338 delete_site_option( '_bp_db_version' ); 339 delete_site_option( 'bp-core-db-version' ); 340 delete_site_option( '_bp-core-db-version' ); 341 342 // Delete possible blog options 343 delete_blog_option( bp_get_root_blog_id(), 'bp-db-version' ); 344 delete_blog_option( bp_get_root_blog_id(), 'bp-core-db-version' ); 345 delete_site_option( bp_get_root_blog_id(), '_bp-core-db-version' ); 346 delete_site_option( bp_get_root_blog_id(), '_bp_db_version' ); 348 347 } 349 348 … … 355 354 * component to the active components option to retain existing functionality. 356 355 * 357 * @since BuddyPress (1.9.0)356 * @since 1.9.0 358 357 */ 359 358 function bp_update_to_1_9() { 360 359 361 362 363 364 365 366 367 368 369 370 371 372 373 374 360 // Setup hardcoded keys 361 $active_components_key = 'bp-active-components'; 362 $notifications_component_id = 'notifications'; 363 364 // Get the active components 365 $active_components = bp_get_option( $active_components_key ); 366 367 // Add notifications 368 if ( ! in_array( $notifications_component_id, $active_components ) ) { 369 $active_components[ $notifications_component_id ] = 1; 370 } 371 372 // Update the active components option 373 bp_update_option( $active_components_key, $active_components ); 375 374 } 376 375 … … 389 388 * but legacy installations using the theme will continue to see it. 390 389 * 391 * @since BuddyPress (1.9.2)390 * @since 1.9.2 392 391 */ 393 392 function bp_update_to_1_9_2() { 394 395 396 393 if ( 'bp-default' === get_stylesheet() || 'bp-default' === get_template() ) { 394 update_site_option( '_bp_retain_bp_default', 1 ); 395 } 397 396 } 398 397 … … 404 403 * - Add values for all BuddyPress options to the options table. 405 404 * 406 * @since BuddyPress (2.0.0)405 * @since 2.0.0 407 406 */ 408 407 function bp_update_to_2_0() { 409 408 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 409 /** Install activity tables for 'last_activity' ***************************/ 410 411 bp_core_install_activity_streams(); 412 413 /** Migrate 'last_activity' data ******************************************/ 414 415 bp_last_activity_migrate(); 416 417 /** Migrate signups data **************************************************/ 418 419 if ( ! is_multisite() ) { 420 421 // Maybe install the signups table 422 bp_core_maybe_install_signups(); 423 424 // Run the migration script 425 bp_members_migrate_signups(); 426 } 427 428 /** Add BP options to the options table ***********************************/ 429 430 bp_add_options(); 432 431 } 433 432 … … 435 434 * 2.0.1 database upgrade routine. 436 435 * 437 * @since BuddyPress (2.0.1)436 * @since 2.0.1 438 437 * 439 438 * @return void … … 441 440 function bp_update_to_2_0_1() { 442 441 443 444 445 442 // We purposely call this during both the 2.0 upgrade and the 2.0.1 upgrade. 443 // Don't worry; it won't break anything, and safely handles all cases. 444 bp_core_maybe_install_signups(); 446 445 } 447 446 … … 453 452 * - Clean up hidden friendship activities. 454 453 * 455 * @since BuddyPress (2.2.0)454 * @since 2.2.0 456 455 */ 457 456 function bp_update_to_2_2() { 458 457 459 460 461 462 463 464 465 466 467 468 469 470 458 // Also handled by `bp_core_install()` 459 if ( bp_is_active( 'messages' ) ) { 460 bp_core_install_private_messaging(); 461 } 462 463 if ( bp_is_active( 'activity' ) ) { 464 bp_migrate_new_member_activity_component(); 465 466 if ( bp_is_active( 'friends' ) ) { 467 bp_cleanup_friendship_activities(); 468 } 469 } 471 470 } 472 471 … … 476 475 * - Add notifications meta table. 477 476 * 478 * @since BuddyPress (2.3.0)477 * @since 2.3.0 479 478 */ 480 479 function bp_update_to_2_3() { 481 480 482 483 484 485 481 // Also handled by `bp_core_install()` 482 if ( bp_is_active( 'notifications' ) ) { 483 bp_core_install_notifications(); 484 } 486 485 } 487 486 … … 489 488 * Updates the component field for new_members type. 490 489 * 491 * @since BuddyPress (2.2.0)490 * @since 2.2.0 492 491 * 493 492 * @global $wpdb … … 496 495 */ 497 496 function bp_migrate_new_member_activity_component() { 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 497 global $wpdb; 498 $bp = buddypress(); 499 500 // Update the component for the new_member type 501 $wpdb->update( 502 // Activity table 503 $bp->members->table_name_last_activity, 504 array( 505 'component' => $bp->members->id, 506 ), 507 array( 508 'component' => 'xprofile', 509 'type' => 'new_member', 510 ), 511 // Data sanitization format 512 array( 513 '%s', 514 ), 515 // WHERE sanitization format 516 array( 517 '%s', 518 '%s' 519 ) 520 ); 522 521 } 523 522 … … 525 524 * Remove all hidden friendship activities. 526 525 * 527 * @since BuddyPress (2.2.0)526 * @since 2.2.0 528 527 * 529 528 * @uses bp_activity_delete() to delete the corresponding friendship activities. 530 529 */ 531 530 function bp_cleanup_friendship_activities() { 532 533 534 535 536 531 bp_activity_delete( array( 532 'component' => buddypress()->friends->id, 533 'type' => 'friendship_created', 534 'hide_sitewide' => true, 535 ) ); 537 536 } 538 537 … … 540 539 * Redirect user to BP's What's New page on first page load after activation. 541 540 * 542 * @since BuddyPress (1.7.0)541 * @since 1.7.0 543 542 * 544 543 * @internal Used internally to redirect BuddyPress to the about page on activation. … … 548 547 function bp_add_activation_redirect() { 549 548 550 551 552 553 554 555 556 557 558 559 560 561 562 549 // Bail if activating from network, or bulk 550 if ( isset( $_GET['activate-multi'] ) ) { 551 return; 552 } 553 554 // Record that this is a new installation, so we show the right 555 // welcome message 556 if ( bp_is_install() ) { 557 set_transient( '_bp_is_new_install', true, 30 ); 558 } 559 560 // Add the transient to redirect 561 set_transient( '_bp_activation_redirect', true, 30 ); 563 562 } 564 563 … … 568 567 * Check if the signups table needs to be created or upgraded. 569 568 * 570 * @since BuddyPress (2.0.0)569 * @since 2.0.0 571 570 * 572 571 * @global WPDB $wpdb … … 575 574 */ 576 575 function bp_core_maybe_install_signups() { 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 576 global $wpdb; 577 578 // The table to run queries against 579 $signups_table = $wpdb->base_prefix . 'signups'; 580 581 // Suppress errors because users shouldn't see what happens next 582 $old_suppress = $wpdb->suppress_errors(); 583 584 // Never use bp_core_get_table_prefix() for any global users tables 585 $table_exists = (bool) $wpdb->get_results( "DESCRIBE {$signups_table};" ); 586 587 // Table already exists, so maybe upgrade instead? 588 if ( true === $table_exists ) { 589 590 // Look for the 'signup_id' column 591 $column_exists = $wpdb->query( "SHOW COLUMNS FROM {$signups_table} LIKE 'signup_id'" ); 592 593 // 'signup_id' column doesn't exist, so run the upgrade 594 if ( empty( $column_exists ) ) { 595 bp_core_upgrade_signups(); 596 } 597 598 // Table does not exist, and we are a single site, so install the multisite 599 // signups table using WordPress core's database schema. 600 } elseif ( ! is_multisite() ) { 601 bp_core_install_signups(); 602 } 603 604 // Restore previous error suppression setting 605 $wpdb->suppress_errors( $old_suppress ); 607 606 } 608 607 … … 614 613 * Runs on BuddyPress activation. 615 614 * 616 * @since BuddyPress (1.6.0)615 * @since 1.6.0 617 616 * 618 617 * @uses do_action() Calls 'bp_activation' hook. … … 620 619 function bp_activation() { 621 620 622 623 624 625 626 627 628 629 630 631 632 633 * @since BuddyPress (1.6.0) 634 635 636 637 638 621 // Force refresh theme roots. 622 delete_site_transient( 'theme_roots' ); 623 624 // Add options 625 bp_add_options(); 626 627 /** 628 * Fires during the activation of BuddyPress. 629 * 630 * Use as of (1.6.0) 631 * 632 * @since 1.6.0 633 */ 634 do_action( 'bp_activation' ); 635 636 // @deprecated as of (1.6) 637 do_action( 'bp_loader_activate' ); 639 638 } 640 639 … … 644 643 * Runs on BuddyPress deactivation. 645 644 * 646 * @since BuddyPress (1.6.0)645 * @since 1.6.0 647 646 * 648 647 * @uses do_action() Calls 'bp_deactivation' hook. … … 650 649 function bp_deactivation() { 651 650 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 * @since BuddyPress (1.6.0) 669 670 671 672 673 651 // Force refresh theme roots. 652 delete_site_transient( 'theme_roots' ); 653 654 // Switch to WordPress's default theme if current parent or child theme 655 // depend on bp-default. This is to prevent white screens of doom. 656 if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) { 657 switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); 658 update_option( 'template_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 659 update_option( 'stylesheet_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 660 } 661 662 /** 663 * Fires during the deactivation of BuddyPress. 664 * 665 * Use as of (1.6.0) 666 * 667 * @since 1.6.0 668 */ 669 do_action( 'bp_deactivation' ); 670 671 // @deprecated as of (1.6) 672 do_action( 'bp_loader_deactivate' ); 674 673 } 675 674 … … 679 678 * Runs when uninstalling BuddyPress. 680 679 * 681 * @since BuddyPress (1.6.0)680 * @since 1.6.0 682 681 * 683 682 * @uses do_action() Calls 'bp_uninstall' hook. … … 685 684 function bp_uninstall() { 686 685 687 688 689 690 * @since BuddyPress (1.6.0) 691 692 693 } 686 /** 687 * Fires during the uninstallation of BuddyPress. 688 * 689 * @since 1.6.0 690 */ 691 do_action( 'bp_uninstall' ); 692 } -
trunk/src/bp-core/bp-core-widgets.php
r10099 r10108 13 13 * Register bp-core widgets. 14 14 * 15 * @since BuddyPress (1.0.0)15 * @since 1.0.0 16 16 */ 17 17 function bp_core_register_widgets() { … … 23 23 * BuddyPress Login Widget. 24 24 * 25 * @since BuddyPress (1.9.0)25 * @since 1.9.0 26 26 */ 27 27 class BP_Core_Login_Widget extends WP_Widget { … … 55 55 * Filters the title of the Login widget. 56 56 * 57 * @since BuddyPress (1.9.0)58 * @since BuddyPress (2.3.0)Added 'instance' and 'id_base' to arguments passed to filter.57 * @since 1.9.0 58 * @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter. 59 59 * 60 60 * @param string $title The widget title. … … 74 74 * Fires before the display of widget content if logged in. 75 75 * 76 * @since BuddyPress (1.9.0)76 * @since 1.9.0 77 77 */ 78 78 do_action( 'bp_before_login_widget_loggedin' ); ?> … … 94 94 * Fires after the display of widget content if logged in. 95 95 * 96 * @since BuddyPress (1.9.0)96 * @since 1.9.0 97 97 */ 98 98 do_action( 'bp_after_login_widget_loggedin' ); ?> … … 105 105 * Fires before the display of widget content if logged out. 106 106 * 107 * @since BuddyPress (1.9.0)107 * @since 1.9.0 108 108 */ 109 109 do_action( 'bp_before_login_widget_loggedout' ); ?> … … 133 133 * Fires after the display of widget content if logged out. 134 134 * 135 * @since BuddyPress (1.9.0)135 * @since 1.9.0 136 136 */ 137 137 do_action( 'bp_after_login_widget_loggedout' ); ?> -
trunk/src/bp-core/bp-core-wpabstraction.php
r10039 r10108 18 18 * Parse the WordPress core version number into the major release. 19 19 * 20 * @since BuddyPress (1.5.2)20 * @since 1.5.2 21 21 * 22 22 * @global string $wp_version -
trunk/src/bp-core/classes/class-bp-attachment-avatar.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 15 15 * Extends BP Attachment to manage the avatar uploads. 16 16 * 17 * @since BuddyPress (2.3.0)17 * @since 2.3.0 18 18 */ 19 19 class BP_Attachment_Avatar extends BP_Attachment { … … 22 22 * Construct Upload parameters. 23 23 * 24 * @since BuddyPress (2.3.0)24 * @since 2.3.0 25 25 * 26 26 * @see BP_Attachment::__construct() for list of parameters … … 48 48 * Gets the available avatar types. 49 49 * 50 * @since BuddyPress (2.3.0)50 * @since 2.3.0 51 51 * 52 52 * @param array $allowed_types Array of allowed avatar types. … … 63 63 * Set Upload Dir data for avatars. 64 64 * 65 * @since BuddyPress (2.3.0)65 * @since 2.3.0 66 66 * 67 67 * @uses bp_core_avatar_upload_path() … … 86 86 * The error code is the index of $upload_error_strings. 87 87 * 88 * @since BuddyPress (2.3.0)88 * @since 2.3.0 89 89 * 90 90 * @uses bp_core_check_avatar_size() … … 117 117 * Maybe shrink the attachment to fit maximum allowed width. 118 118 * 119 * @since BuddyPress (2.3.0)119 * @since 2.3.0 120 120 * 121 121 * @uses bp_core_avatar_original_max_width() … … 166 166 * Check if the image dimensions are smaller than full avatar dimensions. 167 167 * 168 * @since BuddyPress (2.3.0)168 * @since 2.3.0 169 169 * 170 170 * @uses bp_core_avatar_full_width() … … 190 190 * Crop the avatar. 191 191 * 192 * @since BuddyPress (2.3.0)192 * @since 2.3.0 193 193 * 194 194 * @see BP_Attachment::crop for the list of parameters … … 287 287 * Get the user id to set its avatar. 288 288 * 289 * @since BuddyPress (2.3.0)289 * @since 2.3.0 290 290 * 291 291 * @return integer The user ID. … … 309 309 * Get the group id to set its avatar. 310 310 * 311 * @since BuddyPress (2.3.0)311 * @since 2.3.0 312 312 * 313 313 * @return integer The group ID. … … 326 326 * Build script datas for the Uploader UI. 327 327 * 328 * @since BuddyPress (2.3.0)328 * @since 2.3.0 329 329 * 330 330 * @return array The javascript localization data. … … 391 391 * e.g. Blavatar. 392 392 * 393 * @since BuddyPress (2.3.0)393 * @since 2.3.0 394 394 * 395 395 * @param array $value The avatar specific BuddyPress parameters. … … 412 412 * Use this filter to override/extend the avatar script data. 413 413 * 414 * @since BuddyPress (2.3.0)414 * @since 2.3.0 415 415 * 416 416 * @param array $script_data The avatar script data. -
trunk/src/bp-core/classes/class-bp-attachment.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 15 15 * Extend it to manage your component's uploads. 16 16 * 17 * @since BuddyPress (2.3.0)17 * @since 2.3.0 18 18 */ 19 19 abstract class BP_Attachment { … … 47 47 * Construct Upload parameters. 48 48 * 49 * @since BuddyPress (2.3.0)49 * @since 2.3.0 50 50 * 51 51 * @param array|string $args { … … 105 105 * Set upload path and url for the component. 106 106 * 107 * @since BuddyPress (2.3.0)107 * @since 2.3.0 108 108 * 109 109 * @uses bp_upload_dir() … … 144 144 * Used into the $overrides argument of BP_Attachment->upload() 145 145 * 146 * @since BuddyPress (2.3.0)146 * @since 2.3.0 147 147 * 148 148 * @param array $param A list of error messages to add to BuddyPress core ones. … … 179 179 * Include the WordPress core needed files. 180 180 * 181 * @since BuddyPress (2.3.0)181 * @since 2.3.0 182 182 */ 183 183 public function includes() { … … 194 194 * Upload the attachment. 195 195 * 196 * @since BuddyPress (2.3.0)196 * @since 2.3.0 197 197 * 198 198 * @param array $file The appropriate entry the from $_FILES superglobal. … … 294 294 * @see check_upload_mimes() 295 295 * 296 * @since BuddyPress (2.3.0)296 * @since 2.3.0 297 297 * 298 298 * @uses get_allowed_mime_types() … … 322 322 * @see BP_Attachment_Avatar->validate_upload() for an example of use 323 323 * 324 * @since BuddyPress (2.3.0)324 * @since 2.3.0 325 325 * 326 326 * @param array $file The temporary file attributes (before it has been moved). … … 345 345 * Default filter to save the attachments. 346 346 * 347 * @since BuddyPress (2.3.0)347 * @since 2.3.0 348 348 * 349 349 * @uses apply_filters() call 'bp_attachment_upload_dir' to eventually override the upload location … … 357 357 * Filters the component's upload directory. 358 358 * 359 * @since BuddyPress (2.3.0)359 * @since 2.3.0 360 360 * 361 361 * @param array $value Array containing the path, URL, and other helpful settings. … … 377 377 * (eg: add an .htaccess file) 378 378 * 379 * @since BuddyPress (2.3.0)379 * @since 2.3.0 380 380 * 381 381 * @uses wp_mkdir_p() … … 403 403 * Crop an image file. 404 404 * 405 * @since BuddyPress (2.3.0)405 * @since 2.3.0 406 406 * 407 407 * @param array $args { … … 505 505 * Override this method from your child class to build the script datas. 506 506 * 507 * @since BuddyPress (2.3.0)507 * @since 2.3.0 508 508 * 509 509 * @return array The javascript localization data. -
trunk/src/bp-core/classes/class-bp-button.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * API to create BuddyPress buttons. 14 14 * 15 * @since BuddyPress (1.2.6)15 * @since 1.2.6 16 16 * 17 17 * @param array $args { … … 153 153 * Builds the button based on class parameters. 154 154 * 155 * @since BuddyPress (1.2.6)155 * @since 1.2.6 156 156 * 157 157 * @param array|string $args See {@BP_Button}. … … 238 238 * allows button to be manipulated externally. 239 239 * 240 * @since BuddyPress (1.2.6)240 * @since 1.2.6 241 241 * 242 242 * @param string $contents HTML being used for the button. … … 251 251 * Return the markup for the generated button. 252 252 * 253 * @since BuddyPress (1.2.6)253 * @since 1.2.6 254 254 * 255 255 * @return string Button markup. … … 262 262 * Output the markup of button. 263 263 * 264 * @since BuddyPress (1.2.6)264 * @since 1.2.6 265 265 */ 266 266 public function display() { -
trunk/src/bp-core/classes/class-bp-core-notification.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 16 16 * 17 17 * @package BuddyPress Core 18 * @deprecated since BuddyPress (1.9.0)18 * @deprecated since 1.9.0 19 19 */ 20 20 class BP_Core_Notification { -
trunk/src/bp-core/classes/class-bp-core-user.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 119 119 * Profile information for the specific user. 120 120 * 121 * @since BuddyPress (1.2.0)121 * @since 1.2.0 122 122 * @var array 123 123 */ … … 380 380 * Filters the SQL used to query for paged users. 381 381 * 382 * @since BuddyPress (1.2.6)382 * @since 1.2.6 383 383 * 384 384 * @param string $value Concatenated SQL statement for the query. … … 412 412 * Filters the SQL used to query for total users. 413 413 * 414 * @since BuddyPress (1.2.6)414 * @since 1.2.6 415 415 * 416 416 * @param string $value Concatenated SQL statement for the query. … … 488 488 * Filters the SQL used to query for total user count by first letter. 489 489 * 490 * @since BuddyPress (1.0.0)490 * @since 1.0.0 491 491 * 492 492 * @param string $value SQL prepared statement for the user count query. … … 497 497 * Filters the SQL used to query for users by first letter. 498 498 * 499 * @since BuddyPress (1.0.0)499 * @since 1.0.0 500 500 * 501 501 * @param string $value SQL prepared statement for the user query. … … 556 556 * Use 'bp_core_user_get_specific_users_count_sql' instead. 557 557 * 558 * @deprecated BuddyPress (2.3.0)558 * @deprecated 2.3.0 559 559 * 560 560 * @param string $sql SQL string. … … 567 567 * Use this instead of the deprecated 'bp_core_get_specific_users_count_sql'. 568 568 * 569 * @since BuddyPress (2.3.0)569 * @since 2.3.0 570 570 * 571 571 * @param string $sql SQL string. … … 583 583 * Use 'bp_core_user_get_specific_users_paged_sql' instead. 584 584 * 585 * @deprecated BuddyPress (2.3.0)585 * @deprecated 2.3.0 586 586 * 587 587 * @param string $sql SQL string. … … 594 594 * Use this instead of the deprecated 'bp_core_get_specific_users_count_sql'. 595 595 * 596 * @since BuddyPress (2.3.0)596 * @since 2.3.0 597 597 * 598 598 * @param string $sql SQL string. … … 650 650 * Filters the SQL used to query for searched users count. 651 651 * 652 * @since BuddyPress (1.0.0)652 * @since 1.0.0 653 653 * 654 654 * @param string $value SQL statement for the searched users count query. … … 659 659 * Filters the SQL used to query for searched users. 660 660 * 661 * @since BuddyPress (1.0.0)661 * @since 1.0.0 662 662 * 663 663 * @param string $value SQL statement for the searched users query. … … 840 840 * existing entry. 841 841 * 842 * @since BuddyPress (2.0.0)842 * @since 2.0.0 843 843 * 844 844 * @param int $user_id ID of the user whose last_activity you are updating. … … 930 930 * Delete a user's last_activity value. 931 931 * 932 * @since BuddyPress (2.0.0)932 * @since 2.0.0 933 933 * 934 934 * @param int $user_id -
trunk/src/bp-core/classes/class-bp-date-query.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 16 16 * Extends the {@link WP_Date_Query} class for use with BuddyPress. 17 17 * 18 * @since BuddyPress (2.1.0)18 * @since 2.1.0 19 19 * 20 20 * @param array $date_query { -
trunk/src/bp-core/classes/class-bp-embed.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 15 15 * Extends WP_Embed class for use with BuddyPress. 16 16 * 17 * @since BuddyPress (1.5.0)17 * @since 1.5.0 18 18 * 19 19 * @see WP_Embed … … 58 58 * Filters the BuddyPress Core oEmbed setup. 59 59 * 60 * @since BuddyPress (1.5.0)60 * @since 1.5.0 61 61 * 62 62 * @param BP_Embed $this Current instance of the BP_Embed. Passed by reference. … … 107 107 * Filters the oEmbed handler result for the provided URL. 108 108 * 109 * @since BuddyPress (1.5.0)109 * @since 1.5.0 110 110 * 111 111 * @param string $return Handler callback for the oEmbed. … … 122 122 * Filters the embed object ID. 123 123 * 124 * @since BuddyPress (1.5.0)124 * @since 1.5.0 125 125 * 126 126 * @param int $value Value of zero. … … 131 131 * Filters whether or not oEmbed discovery is on. 132 132 * 133 * @since BuddyPress (1.5.0)133 * @since 1.5.0 134 134 * 135 135 * @param bool $value Current status of oEmbed discovery. … … 192 192 * Filters the cache value to be used in the oEmbed, if exists. 193 193 * 194 * @since BuddyPress (1.5.0)194 * @since 1.5.0 195 195 * 196 196 * @param string $cache Empty initial cache value. … … 209 209 * Filters the found cache for the provided URL. 210 210 * 211 * @since BuddyPress (1.5.0)211 * @since 1.5.0 212 212 * 213 213 * @param string $cache Cached HTML markup for embed. … … 228 228 * Lets components / plugins save their cache. 229 229 * 230 * @since BuddyPress (1.5.0)230 * @since 1.5.0 231 231 * 232 232 * @param string $cache Newly cached HTML markup for embed. -
trunk/src/bp-core/classes/class-bp-media-extractor.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * Extracts media from text. Use {@link extract()}. 14 14 * 15 * @since BuddyPress (2.3.0)15 * @since 2.3.0 16 16 * 17 17 * The supported types are links, mentions, images, shortcodes, embeds, audio, video, and "all". … … 42 42 * Media type. 43 43 * 44 * @since BuddyPress (2.3.0)44 * @since 2.3.0 45 45 * @var int 46 46 */ … … 58 58 * Extract media from text. 59 59 * 60 * @since BuddyPress (2.3.0)60 * @since 2.3.0 61 61 * 62 62 * @param string|WP_Post $richtext Content to parse. … … 171 171 * Filters media extracted from text. 172 172 * 173 * @since BuddyPress (2.3.0)173 * @since 2.3.0 174 174 * 175 175 * @param array $media Extracted media. See {@link BP_Media_Extractor::extract()} for format. … … 192 192 * Extract `<a href>` tags from text. 193 193 * 194 * @since BuddyPress (2.3.0)194 * @since 2.3.0 195 195 * 196 196 * @param string $richtext Content to parse. … … 234 234 * Filters links extracted from text. 235 235 * 236 * @since BuddyPress (2.3.0)236 * @since 2.3.0 237 237 * 238 238 * @param array $data Extracted links. See {@link BP_Media_Extractor::extract_links()} for format. … … 252 252 * If the Activity component is disabled, any @mentions are extracted. 253 253 * 254 * @since BuddyPress (2.3.0)254 * @since 2.3.0 255 255 * 256 256 * @param string $richtext Content to parse. … … 309 309 * Filters @mentions extracted from text. 310 310 * 311 * @since BuddyPress (2.3.0)311 * @since 2.3.0 312 312 * 313 313 * @param array $data Extracted @mentions. See {@link BP_Media_Extractor::extract_mentions()} for format. … … 324 324 * If an image is in the Media Library, then its resolution is included in the results. 325 325 * 326 * @since BuddyPress (2.3.0)326 * @since 2.3.0 327 327 * 328 328 * @param string $richtext Content to parse. … … 428 428 * Filters images extracted from text. 429 429 * 430 * @since BuddyPress (2.3.0)430 * @since 2.3.0 431 431 * 432 432 * @param array $media Extracted images. See {@link BP_Media_Extractor::extract_images()} for format. … … 444 444 * For example, [gallery] and [audio]. 445 445 * 446 * @since BuddyPress (2.3.0)446 * @since 2.3.0 447 447 * 448 448 * @param string $richtext Content to parse. … … 492 492 * Filters shortcodes extracted from text. 493 493 * 494 * @since BuddyPress (2.3.0)494 * @since 2.3.0 495 495 * 496 496 * @param array $data Extracted shortcodes. … … 506 506 * Extract any URL, matching a registered oEmbed endpoint, from text. 507 507 * 508 * @since BuddyPress (2.3.0)508 * @since 2.3.0 509 509 * 510 510 * @param string $richtext Content to parse. … … 571 571 * Filters embeds extracted from text. 572 572 * 573 * @since BuddyPress (2.3.0)573 * @since 2.3.0 574 574 * 575 575 * @param array $data Extracted embeds. See {@link BP_Media_Extractor::extract_embeds()} for format. … … 584 584 * Extract [audio] shortcodes and `<a href="*.mp3">` tags, from text. 585 585 * 586 * @since BuddyPress (2.3.0)586 * @since 2.3.0 587 587 * 588 588 * @see wp_get_audio_extensions() for supported audio formats. … … 669 669 * Filters audio extracted from text. 670 670 * 671 * @since BuddyPress (2.3.0)671 * @since 2.3.0 672 672 * 673 673 * @param array $data Extracted audio. See {@link BP_Media_Extractor::extract_audio()} for format. … … 682 682 * Extract [video] shortcodes from text. 683 683 * 684 * @since BuddyPress (2.3.0)684 * @since 2.3.0 685 685 * 686 686 * @see wp_get_video_extensions() for supported video formats. … … 745 745 * Filters videos extracted from text. 746 746 * 747 * @since BuddyPress (2.3.0)747 * @since 2.3.0 748 748 * 749 749 * @param array $data Extracted videos. See {@link BP_Media_Extractor::extract_videos()} for format. … … 763 763 * Extract images in [galleries] shortcodes from text. 764 764 * 765 * @since BuddyPress (2.3.0)765 * @since 2.3.0 766 766 * 767 767 * @param string $richtext Content to parse. … … 781 781 $galleries = get_post_galleries( $post, false ); 782 782 $galleries_data = array(); 783 783 784 784 if ( ! empty( $galleries ) ) { 785 785 // Validate the size of the images requested. … … 850 850 * Filters image galleries extracted from text. 851 851 * 852 * @since BuddyPress (2.3.0)852 * @since 2.3.0 853 853 * 854 854 * @param array $galleries_data Galleries. See {@link BP_Media_Extractor::extract_images_from_galleries()}. … … 863 863 * Extract the featured image from a Post. 864 864 * 865 * @since BuddyPress (2.3.0)865 * @since 2.3.0 866 866 * 867 867 * @param string $richtext Content to parse. … … 902 902 * Filters featured images extracted from a WordPress Post. 903 903 * 904 * @since BuddyPress (2.3.0)904 * @since 2.3.0 905 905 * 906 906 * @param array $image Extracted images. See {@link BP_Media_Extractor_Post::extract_images()} for format. … … 917 917 * HTML tags and shortcodes are removed, and HTML entities are decoded. 918 918 * 919 * @since BuddyPress (2.3.0)919 * @since 2.3.0 920 920 * 921 921 * @param string $richtext … … 929 929 * Filters the generated plain text version of the content passed to the extractor. 930 930 * 931 * @since BuddyPress (2.3.0)931 * @since 2.3.0 932 932 * 933 933 * @param array $plaintext Generated plain text. -
trunk/src/bp-core/classes/class-bp-members-suggestions.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 16 16 * and Groups is loaded before Members (alphabetical order). 17 17 * 18 * @since BuddyPress (2.1.0)18 * @since 2.1.0 19 19 */ 20 20 class BP_Members_Suggestions extends BP_Suggestions { … … 23 23 * Default arguments for this suggestions service. 24 24 * 25 * @since BuddyPress (2.1.0)25 * @since 2.1.0 26 26 * @var array $args { 27 27 * @type int $limit Maximum number of results to display. Default: 16. … … 42 42 * Validate and sanitise the parameters for the suggestion service query. 43 43 * 44 * @since BuddyPress (2.1.0)44 * @since 2.1.0 45 45 * 46 46 * @return true|WP_Error If validation fails, return a WP_Error object. On success, return true (bool). … … 52 52 * Filters the members suggestions args for the current user. 53 53 * 54 * @since BuddyPress (2.1.0)54 * @since 2.1.0 55 55 * 56 56 * @param array $args Array of arguments for the member suggestions. … … 67 67 * Filters the validation status for the suggestion service query. 68 68 * 69 * @since BuddyPress (2.1.0)69 * @since 2.1.0 70 70 * 71 71 * @param bool|WP_Error $value Results of validation check. … … 78 78 * Find and return a list of username suggestions that match the query. 79 79 * 80 * @since BuddyPress (2.1.0)80 * @since 2.1.0 81 81 * 82 82 * @return array|WP_Error Array of results. If there were problems, returns a WP_Error object. … … 102 102 * Filters the members suggestions query args. 103 103 * 104 * @since BuddyPress (2.1.0)104 * @since 2.1.0 105 105 * 106 106 * @param array $user_query Array of query arguments. … … 128 128 * Filters the members suggestions results. 129 129 * 130 * @since BuddyPress (2.1.0)130 * @since 2.1.0 131 131 * 132 132 * @param array $results Array of users to suggest. -
trunk/src/bp-core/classes/class-bp-recursive-query.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * Base class for creating query classes that generate SQL fragments for filtering results based on recursive query params. 14 14 * 15 * @since BuddyPress (2.2.0)15 * @since 2.2.0 16 16 */ 17 17 abstract class BP_Recursive_Query { … … 20 20 * Query arguments passed to the constructor. 21 21 * 22 * @since BuddyPress (2.2.0)22 * @since 2.2.0 23 23 * @access public 24 24 * @var array … … 35 35 * the empty 'join' clause, and only passes the 'where' clause. 36 36 * 37 * @since BuddyPress (2.2.0)37 * @since 2.2.0 38 38 * @access protected 39 39 * … … 59 59 * automatically from get_sql_clauses(). 60 60 * 61 * @since BuddyPress (2.2.0)61 * @since 2.2.0 62 62 * @access protected 63 63 * … … 139 139 * Extend this method if your class uses different sanitizing logic. 140 140 * 141 * @since BuddyPress (2.2.0)141 * @since 2.2.0 142 142 * @access public 143 143 * … … 207 207 * Must be overridden in a subclass. 208 208 * 209 * @since BuddyPress (2.2.0)209 * @since 2.2.0 210 210 * @access protected 211 211 * … … 225 225 * Must be overridden in a subclass. 226 226 * 227 * @since BuddyPress (2.2.0)227 * @since 2.2.0 228 228 * @access protected 229 229 * -
trunk/src/bp-core/classes/class-bp-suggestions.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 24 24 * recommendations provided in the phpDoc blocks, particularly the expected return types. 25 25 * 26 * @since BuddyPress (2.1.0)26 * @since 2.1.0 27 27 */ 28 28 abstract class BP_Suggestions { … … 33 33 * If your custom service requires further defaults, add them here. 34 34 * 35 * @since BuddyPress (2.1.0)35 * @since 2.1.0 36 36 * @var array 37 37 */ … … 47 47 * This includes `$default_args`, as well as the user-supplied values. 48 48 * 49 * @since BuddyPress (2.1.0)49 * @since 2.1.0 50 50 * @var array 51 51 */ … … 58 58 * 59 59 * @param array $args Optional. If set, used as the parameters for the suggestions service query. 60 * @since BuddyPress (2.1.0)60 * @since 2.1.0 61 61 */ 62 62 public function __construct( array $args = array() ) { … … 75 75 * Mandatory. 76 76 * } 77 * @since BuddyPress (2.1.0)77 * @since 2.1.0 78 78 */ 79 79 public function set_query( array $args = array() ) { … … 87 87 * If validation fails, you must return a WP_Error object. 88 88 * 89 * @since BuddyPress (2.1.0)89 * @since 2.1.0 90 90 * 91 91 * @return true|WP_Error If validation fails, return a WP_Error object. On success, return true (bool). … … 98 98 * Filters the arguments to be validated for the BP_Suggestions query. 99 99 * 100 * @since BuddyPress (2.1.0)100 * @since 2.1.0 101 101 * 102 102 * @param BP_Suggestions $value Arguments to be validated. … … 118 118 * Filters the status of validation for the BP_Suggestions query. 119 119 * 120 * @since BuddyPress (2.1.0)120 * @since 2.1.0 121 121 * 122 122 * @param bool $value Whether or not the values are valid. … … 135 135 * For example: { 'ID': 'admin', 'image': 'http://example.com/logo.png', 'name': 'Name Surname' } 136 136 * 137 * @since BuddyPress (2.1.0)137 * @since 2.1.0 138 138 * 139 139 * @return array|WP_Error Array of results. If there were problems, returns a WP_Error object. -
trunk/src/bp-core/classes/class-bp-user-query.php
r10043 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 16 16 * Member directories, the Friends component, etc. 17 17 * 18 * @since BuddyPress (1.7.0)18 * @since 1.7.0 19 19 * 20 20 * @param array $query { … … 66 66 * Unaltered params as passed to the constructor. 67 67 * 68 * @since BuddyPress (1.8.0)68 * @since 1.8.0 69 69 * @var array 70 70 */ … … 74 74 * Array of variables to query with. 75 75 * 76 * @since BuddyPress (1.7.0)76 * @since 1.7.0 77 77 * @var array 78 78 */ … … 83 83 * 84 84 * @access public To allow components to manipulate them. 85 * @since BuddyPress (1.7.0)85 * @since 1.7.0 86 86 * @var array 87 87 */ … … 92 92 * 93 93 * @access public To allow components to manipulate it. 94 * @since BuddyPress (1.7.0)94 * @since 1.7.0 95 95 * @var int 96 96 */ … … 101 101 * 102 102 * @access public To allow components to manipulate it. 103 * @since BuddyPress (1.7.0)103 * @since 1.7.0 104 104 * @var array 105 105 */ … … 110 110 * 111 111 * @access public To allow components to manipulate it. 112 * @since BuddyPress (1.7.0)112 * @since 1.7.0 113 113 * @var array 114 114 */ … … 118 118 * SQL table where the user ID is being fetched from. 119 119 * 120 * @since BuddyPress (2.2.0)120 * @since 2.2.0 121 121 * @access public 122 122 * @var string … … 127 127 * SQL database column name to order by. 128 128 * 129 * @since BuddyPress (1.7.0)129 * @since 1.7.0 130 130 * @var string 131 131 */ … … 136 136 * 137 137 * @access protected 138 * @since BuddyPress (1.7.0)138 * @since 1.7.0 139 139 * @var string 140 140 */ … … 147 147 * Constructor. 148 148 * 149 * @since BuddyPress (1.7.0)149 * @since 1.7.0 150 150 * 151 151 * @param string|array $query See {@link BP_User_Query}. … … 183 183 * Fires before the construction of the BP_User_Query query. 184 184 * 185 * @since BuddyPress (1.7.0)185 * @since 1.7.0 186 186 * 187 187 * @param BP_User_Query $this Current instance of the BP_User_Query. Passed by reference. … … 223 223 * {@link BP_Group_Member_Query::setup_hooks()} for an example. 224 224 * 225 * @since BuddyPress (1.8.0)225 * @since 1.8.0 226 226 */ 227 227 public function setup_hooks() {} … … 230 230 * Prepare the query for user_ids. 231 231 * 232 * @since BuddyPress (1.7.0)232 * @since 1.7.0 233 233 */ 234 234 public function prepare_user_ids_query() { … … 277 277 * Filters the threshold for activity timestamp minutes since to indicate online status. 278 278 * 279 * @since BuddyPress (1.8.0)279 * @since 1.8.0 280 280 * 281 281 * @param int $value Amount of minutes for threshold. Default 15. … … 471 471 * Filters the clauses for the user query. 472 472 * 473 * @since BuddyPress (2.0.0)473 * @since 2.0.0 474 474 * 475 475 * @param array $sql Array of SQL clauses to be used in the query. … … 488 488 * Fires before the BP_User_Query query is made. 489 489 * 490 * @since BuddyPress (1.7.0)490 * @since 1.7.0 491 491 * 492 492 * @param BP_User_Query $this Current BP_User_Query instance. Passed by reference. … … 503 503 * Also used to quickly perform user total counts. 504 504 * 505 * @since BuddyPress (1.7.0)505 * @since 1.7.0 506 506 */ 507 507 public function do_user_ids_query() { … … 526 526 * use a "SELECT COUNT()" query statement. 527 527 * 528 * @since BuddyPress (1.7.0)528 * @since 1.7.0 529 529 * 530 530 * @param string $value SQL statement to select FOUND_ROWS(). … … 543 543 * Use WP_User_Query() to pull data for the user IDs retrieved in the main query. 544 544 * 545 * @since BuddyPress (1.7.0)545 * @since 1.7.0 546 546 */ 547 547 public function do_wp_user_query() { … … 556 556 * Filters the WP User Query arguments before passing into the class. 557 557 * 558 * @since BuddyPress (1.7.0)558 * @since 1.7.0 559 559 * 560 560 * @param array $value Array of arguments for the user query. … … 621 621 * for an example. 622 622 * 623 * @since BuddyPress (1.8.0)623 * @since 1.8.0 624 624 * 625 625 * @param array $include Sanitized array of user IDs, as passed to the 'include' … … 639 639 * action to loop in the things they want. 640 640 * 641 * @since BuddyPress (1.7.0)641 * @since 1.7.0 642 642 * 643 643 * @global WPDB $wpdb Global WordPress database access object. … … 678 678 * @see bp_friends_filter_user_query_populate_extras() 679 679 * 680 * @since BuddyPress (1.7.0)680 * @since 1.7.0 681 681 * 682 682 * @param BP_User_Query $this Current BP_User_Query instance. -
trunk/src/bp-core/classes/class-bp-walker-nav-menu-checklist.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 16 16 * to require an actual post type or taxonomy, and to force certain CSS classes. 17 17 * 18 * @since BuddyPress (1.9.0)18 * @since 1.9.0 19 19 */ 20 20 class BP_Walker_Nav_Menu_Checklist extends Walker_Nav_Menu { -
trunk/src/bp-core/classes/class-bp-walker-nav-menu.php
r10012 r10108 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * Create HTML list of BP nav items. 14 14 * 15 * @since BuddyPress (1.7.0)15 * @since 1.7.0 16 16 */ 17 17 class BP_Walker_Nav_Menu extends Walker_Nav_Menu { … … 20 20 * Description of fields indexes for building markup. 21 21 * 22 * @since BuddyPress (1.7.0)22 * @since 1.7.0 23 23 * @var array 24 24 */ … … 28 28 * Tree type. 29 29 * 30 * @since BuddyPress (1.7.0)30 * @since 1.7.0 31 31 * @var string 32 32 */ … … 46 46 * those have ID/post_parent. 47 47 * 48 * @since BuddyPress (1.7.0)48 * @since 1.7.0 49 49 * 50 50 * @see Walker::walk() … … 138 138 * @see Walker::start_el() for complete description of parameters. 139 139 * 140 * @since BuddyPress (1.7.0)140 * @since 1.7.0 141 141 * 142 142 * @param string $output Passed by reference. Used to append … … 155 155 * Filters the classes to be added to the nav menu markup. 156 156 * 157 * @since BuddyPress (1.7.0)157 * @since 1.7.0 158 158 * 159 159 * @param array $value Array of classes to be added. … … 170 170 * Filters the value to be used for the nav menu ID attribute. 171 171 * 172 * @since BuddyPress (1.7.0)172 * @since 1.7.0 173 173 * 174 174 * @param string $id ID attribute to be added to the menu item. … … 192 192 * Filters the link text to be added to the item output. 193 193 * 194 * @since BuddyPress (1.7.0)194 * @since 1.7.0 195 195 * 196 196 * @param string $name Item text to be applied. … … 204 204 * Filters the final result for the menu item. 205 205 * 206 * @since BuddyPress (1.7.0)206 * @since 1.7.0 207 207 * 208 208 * @param string $item_output Constructed output for the menu item to append to output. -
trunk/src/bp-core/deprecated/1.2.php
r9819 r10108 12 12 * You should use bp_activity_get() instead 13 13 * 14 * @since BuddyPress (1.0)15 * @deprecated BuddyPress (1.2)14 * @since 1.0.0 15 * @deprecated 1.2.0 16 16 * 17 17 * @param array $args -
trunk/src/bp-core/deprecated/1.5.php
r10012 r10108 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @deprecated Since 1.5 7 * @deprecated Since 1.5.0 8 8 */ 9 9 … … 14 14 15 15 /** 16 * @deprecated BuddyPress (1.5)16 * @deprecated 1.5.0 17 17 */ 18 18 function bp_setup_root_components() { … … 29 29 * Use is_multisite() instead. 30 30 * 31 * @deprecated BuddyPress (1.5)31 * @deprecated 1.5.0 32 32 * @deprecated Use is_multisite() 33 33 * … … 44 44 * Checks if current blog is root blog of site. Deprecated in 1.5. 45 45 * 46 * @deprecated BuddyPress (1.5)46 * @deprecated 1.5.0 47 47 * @deprecated Use is_main_site() 48 48 * @package BuddyPress 49 49 * @param int|string $blog_id optional blog id to test (default current blog) 50 50 * @return bool True if not multisite or $blog_id is main site 51 * @since BuddyPress (1.2.6)51 * @since 1.2.6 52 52 */ 53 53 function bp_core_is_main_site( $blog_id = '' ) { … … 60 60 * WPMU version of is_super_admin() 61 61 * 62 * @deprecated BuddyPress (1.5)62 * @deprecated 1.5.0 63 63 * @deprecated Use is_super_admin() 64 64 * @param int|bool $user_id Optional. Defaults to logged-in user … … 77 77 * that allowed positioning of menus. Deprecated in 1.5 in favour of a WP core function. 78 78 * 79 * @deprecated BuddyPress (1.5)79 * @deprecated 1.5.0 80 80 * @deprecated Use add_menu_page(). 81 * @since BuddyPress (1.1)81 * @since 1.1.0 82 82 * 83 83 * @return string … … 126 126 127 127 /** 128 * @deprecated BuddyPress (1.5)128 * @deprecated 1.5.0 129 129 */ 130 130 function bp_is_activity_permalink() { … … 136 136 137 137 /** 138 * @deprecated BuddyPress (1.5)138 * @deprecated 1.5.0 139 139 */ 140 140 function bp_core_get_wp_profile() { … … 209 209 210 210 /** 211 * @deprecated BuddyPress (1.5)211 * @deprecated 1.5.0 212 212 * @deprecated Use bp_is_my_profile() 213 213 */ … … 220 220 * Is the user on the front page of the site? 221 221 * 222 * @deprecated BuddyPress (1.5)222 * @deprecated 1.5.0 223 223 * @deprecated Use is_front_page() 224 224 * @return bool … … 232 232 * Is the front page of the site set to the Activity component? 233 233 * 234 * @deprecated BuddyPress (1.5)234 * @deprecated 1.5.0 235 235 * @deprecated Use bp_is_component_front_page( 'activity' ) 236 236 * @return bool … … 242 242 243 243 /** 244 * @deprecated BuddyPress (1.5)244 * @deprecated 1.5.0 245 245 * @deprecated use bp_is_user() 246 246 */ … … 251 251 252 252 /** 253 * @deprecated BuddyPress (1.5)253 * @deprecated 1.5.0 254 254 * @deprecated use bp_loggedin_user_link() 255 255 */ … … 263 263 * Deprecated in 1.5; not used anymore. 264 264 * 265 * @deprecated BuddyPress (1.5)265 * @deprecated 1.5.0 266 266 * @return bool 267 267 */ … … 274 274 * Template tag version of bp_get_page_title() 275 275 * 276 * @deprecated BuddyPress (1.5)276 * @deprecated 1.5.0 277 277 * @deprecated Use wp_title() 278 * @since BuddyPress (1.0)278 * @since 1.0.0 279 279 */ 280 280 function bp_page_title() { … … 285 285 * Now, just simply use wp_title(). 286 286 * 287 * @deprecated BuddyPress (1.5)287 * @deprecated 1.5.0 288 288 * @deprecated Use wp_title() 289 * @since BuddyPress (1.0)289 * @since 1.0.0 290 290 * 291 291 * @return string … … 304 304 * Generate a link to log out. Last used in BP 1.2-beta. You should be using wp_logout_url(). 305 305 * 306 * @deprecated BuddyPress (1.5)306 * @deprecated 1.5.0 307 307 * @deprecated Use wp_logout_url() 308 * @since BuddyPress (1.0)308 * @since 1.0.0 309 309 */ 310 310 function bp_log_out_link() { … … 318 318 * Send an email and a BP notification on receipt of an @-mention in a group 319 319 * 320 * @deprecated BuddyPress (1.5)320 * @deprecated 1.5.0 321 321 * @deprecated Deprecated in favor of the more general bp_activity_at_message_notification() 322 322 */ … … 384 384 /** 385 385 * BP 1.5 simplified notification functions a bit 386 * @deprecated BuddyPress (1.5)386 * @deprecated 1.5.0 387 387 * 388 388 * @return mixed … … 403 403 /** 404 404 * In BP 1.5, these functions were renamed for greater consistency 405 * @deprecated BuddyPress (1.5)405 * @deprecated 1.5.0 406 406 */ 407 407 function bp_forum_directory_permalink() { … … 416 416 /** 417 417 * Last used by core in BP 1.1. The markup was merged into DTheme's header.php template. 418 * @deprecated BuddyPress (1.5)418 * @deprecated 1.5.0 419 419 */ 420 420 function bp_search_form() { … … 436 436 /** 437 437 * Some _is_ function had their names normalized 438 * @deprecated BuddyPress (1.5)438 * @deprecated 1.5.0 439 439 */ 440 440 function bp_is_profile_edit() { … … 444 444 445 445 /** 446 * @deprecated BuddyPress (1.5)446 * @deprecated 1.5.0 447 447 */ 448 448 function bp_is_change_avatar() { … … 452 452 453 453 /** 454 * @deprecated BuddyPress (1.5)454 * @deprecated 1.5.0 455 455 */ 456 456 function bp_is_friend_requests() { … … 464 464 * You should be using bp_is_root_component(). 465 465 * 466 * @deprecated BuddyPress (1.5)466 * @deprecated 1.5.0 467 467 * @deprecated bp_is_root_component() 468 468 * @return bool True if root component, else false. … … 479 479 * in BuddyPress 1.5. 480 480 * 481 * @deprecated BuddyPress (1.5)482 * @since BuddyPress (1.5)481 * @deprecated 1.5.0 482 * @since 1.5.0 483 483 */ 484 484 function bp_dtheme_deprecated() { … … 489 489 * include "Activity Stream." As of 1.5.x, it is no longer required. 490 490 * 491 * @deprecated BuddyPress (1.5)491 * @deprecated 1.5.0 492 492 * @deprecated No longer required. 493 493 * @param string $page_html A list of pages as a dropdown (select list) 494 494 * @return string 495 495 * @see wp_dropdown_pages() 496 * @since BuddyPress (1.2)496 * @since 1.2.0 497 497 */ 498 498 function bp_dtheme_wp_pages_filter( $page_html ) { … … 507 507 * As of 1.5.x, it is no longer required. 508 508 * 509 * @deprecated BuddyPress (1.5)509 * @deprecated 1.5.0 510 510 * @deprecated No longer required. 511 511 * @param string $oldvalue Previous value of get_option( 'page_on_front' ) 512 512 * @param string $oldvalue New value of get_option( 'page_on_front' ) 513 513 * @return bool|string 514 * @since BuddyPress (1.2)514 * @since 1.2.0 515 515 */ 516 516 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { … … 528 528 * As of 1.5.x, it is no longer required. 529 529 * 530 * @deprecated BuddyPress (1.5)530 * @deprecated 1.5.0 531 531 * @deprecated No longer required. 532 532 * @param string $template Absolute path to the page template 533 533 * @return string 534 * @since BuddyPress (1.2)534 * @since 1.2.0 535 535 */ 536 536 function bp_dtheme_page_on_front_template( $template ) { … … 545 545 * As of 1.5.x, it is no longer required. 546 546 * 547 * @deprecated BuddyPress (1.5)547 * @deprecated 1.5.0 548 548 * @deprecated No longer required. 549 * @since BuddyPress (1.2)549 * @since 1.2.0 550 550 */ 551 551 function bp_dtheme_fix_get_posts_on_activity_front() { … … 559 559 * As of 1.5.x, it is no longer required. 560 560 * 561 * @deprecated BuddyPress (1.5)561 * @deprecated 1.5.0 562 562 * @deprecated No longer required. 563 563 * @param array $posts Posts as retrieved by WP_Query 564 564 * @return array 565 * @since BuddyPress (1.2.5)565 * @since 1.2.5 566 566 */ 567 567 function bp_dtheme_fix_the_posts_on_activity_front( $posts ) { … … 576 576 * As of 1.5.x, we recommend that you enqueue the comment-reply JavaScript in your theme's header.php. 577 577 * 578 * @deprecated BuddyPress (1.5)578 * @deprecated 1.5.0 579 579 * @deprecated Enqueue the comment-reply script in your theme's header.php. 580 * @since BuddyPress (1.2)580 * @since 1.2.0 581 581 */ 582 582 function bp_dtheme_add_blog_comments_js() { … … 594 594 * longer needed as the nav structure is set up by the {@link BP_Component} class. 595 595 * 596 * @deprecated BuddyPress (1.5)597 * @since BuddyPress (1.6)596 * @deprecated 1.5.0 597 * @since 1.6.0 598 598 */ 599 599 function bp_core_add_settings_nav() { … … 607 607 * introduced. 608 608 * 609 * @deprecated BuddyPress (1.5)610 * @since BuddyPress (1.6)609 * @deprecated 1.5.0 610 * @since 1.6.0 611 611 */ 612 612 function bp_core_screen_general_settings() { … … 620 620 * introduced. 621 621 * 622 * @deprecated BuddyPress (1.5)623 * @since BuddyPress (1.6)622 * @deprecated 1.5.0 623 * @since 1.6.0 624 624 */ 625 625 function bp_core_screen_general_settings_title() { … … 633 633 * introduced. 634 634 * 635 * @deprecated BuddyPress (1.5)636 * @since BuddyPress (1.6)635 * @deprecated 1.5.0 636 * @since 1.6.0 637 637 */ 638 638 function bp_core_screen_general_settings_content() { … … 646 646 * introduced. 647 647 * 648 * @deprecated BuddyPress (1.5)649 * @since BuddyPress (1.6)648 * @deprecated 1.5.0 649 * @since 1.6.0 650 650 */ 651 651 function bp_core_screen_notification_settings() { … … 659 659 * introduced. 660 660 * 661 * @deprecated BuddyPress (1.5)662 * @since BuddyPress (1.6)661 * @deprecated 1.5.0 662 * @since 1.6.0 663 663 */ 664 664 function bp_core_screen_notification_settings_title() { … … 672 672 * introduced. 673 673 * 674 * @deprecated BuddyPress (1.5)675 * @since BuddyPress (1.6)674 * @deprecated 1.5.0 675 * @since 1.6.0 676 676 */ 677 677 function bp_core_screen_notification_settings_content() { … … 685 685 * introduced. 686 686 * 687 * @deprecated BuddyPress (1.5)688 * @since BuddyPress (1.6)687 * @deprecated 1.5.0 688 * @since 1.6.0 689 689 */ 690 690 function bp_core_screen_delete_account() { … … 698 698 * introduced. 699 699 * 700 * @deprecated BuddyPress (1.5)701 * @since BuddyPress (1.6)700 * @deprecated 1.5.0 701 * @since 1.6.0 702 702 */ 703 703 function bp_core_screen_delete_account_title() { … … 711 711 * introduced. 712 712 * 713 * @deprecated BuddyPress (1.5)714 * @since BuddyPress (1.6)713 * @deprecated 1.5.0 714 * @since 1.6.0 715 715 */ 716 716 function bp_core_screen_delete_account_content() { -
trunk/src/bp-core/deprecated/1.6.php
r9819 r10108 1 1 <?php 2 3 2 /** 4 3 * Deprecated Functions … … 6 5 * @package BuddyPress 7 6 * @subpackage Core 8 * @deprecated Since 1.67 * @deprecated 1.6.0 9 8 */ 10 9 … … 15 14 16 15 /** 17 * @deprecated BuddyPress (1.6)16 * @deprecated 1.6.0 18 17 */ 19 18 function bp_admin_bar_remove_wp_menus() { … … 22 21 23 22 /** 24 * @deprecated BuddyPress (1.6)23 * @deprecated 1.6.0 25 24 */ 26 25 function bp_admin_bar_root_site() { … … 29 28 30 29 /** 31 * @deprecated BuddyPress (1.6)30 * @deprecated 1.6.0 32 31 */ 33 32 function bp_admin_bar_my_sites_menu() { … … 36 35 37 36 /** 38 * @deprecated BuddyPress (1.6)37 * @deprecated 1.6.0 39 38 */ 40 39 function bp_admin_bar_comments_menu( $wp_admin_bar = '' ) { … … 43 42 44 43 /** 45 * @deprecated BuddyPress (1.6)44 * @deprecated 1.6.0 46 45 */ 47 46 function bp_admin_bar_appearance_menu() { … … 50 49 51 50 /** 52 * @deprecated BuddyPress (1.6)51 * @deprecated 1.6.0 53 52 */ 54 53 function bp_admin_bar_updates_menu() { … … 57 56 58 57 /** 59 * @deprecated BuddyPress (1.6)58 * @deprecated 1.6.0 60 59 */ 61 60 function bp_members_admin_bar_my_account_logout() { … … 64 63 65 64 /** 66 * @deprecated BuddyPress (1.6)65 * @deprecated 1.6.0 67 66 */ 68 67 function bp_core_is_user_deleted( $user_id = 0 ) { … … 72 71 73 72 /** 74 * @deprecated BuddyPress (1.6)73 * @deprecated 1.6.0 75 74 */ 76 75 function bp_core_is_user_spammer( $user_id = 0 ) { … … 85 84 86 85 /** 87 * @deprecated BuddyPress (1.6)86 * @deprecated 1.6.0 88 87 * @deprecated No longer used; see bp_blogs_transition_activity_status() 89 88 */ … … 97 96 98 97 /** 99 * @deprecated BuddyPress (1.6)98 * @deprecated 1.6.0 100 99 * @deprecated No longer used; see BP_Admin::admin_menus() 101 100 */ … … 105 104 106 105 /** 107 * @deprecated BuddyPress (1.6)106 * @deprecated 1.6.0 108 107 * @deprecated No longer used. We do ajax properly now. 109 108 */ … … 119 118 * Displays Friends header tabs 120 119 * 121 * @deprecated BuddyPress (1.6)120 * @deprecated 1.6.0 122 121 * @deprecated No longer used 123 122 */ … … 137 136 * Filters the title for the Friends component 138 137 * 139 * @deprecated BuddyPress (1.6)138 * @deprecated 1.6.0 140 139 * @deprecated No longer used 141 140 */ … … 162 161 163 162 /** 164 * @deprecated BuddyPress (1.6)163 * @deprecated 1.6.0 165 164 * @deprecated Renamed to groups_get_id() for greater consistency 166 165 */ … … 175 174 * Loads admin panel styles and scripts. 176 175 * 177 * @deprecated BuddyPress (1.6)176 * @deprecated 1.6.0 178 177 */ 179 178 function bp_core_add_admin_menu_styles() { … … 184 183 185 184 /** 186 * @deprecated BuddyPress (1.6)185 * @deprecated 1.6.0 187 186 */ 188 187 function updates_register_activity_actions() { … … 193 192 * Sets the "From" address in emails sent 194 193 * 195 * @deprecated BuddyPress (1.6)194 * @deprecated 1.6.0 196 195 * @return string email address 197 196 */ … … 220 219 * function was introduced in BP 1.6 for related backward compatibility reasons). 221 220 * 222 * @deprecated BuddyPress (1.6)221 * @deprecated 1.6.0 223 222 */ 224 223 if ( !function_exists( 'bp_dtheme_register_actions' ) ) : -
trunk/src/bp-core/deprecated/1.7.php
r9819 r10108 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @deprecated Since 1.7 7 * @deprecated Since 1.7.0 8 8 */ 9 9 … … 14 14 * Output the BuddyPress maintenance mode 15 15 * 16 * @since BuddyPress (1.6)17 * @deprecated BuddyPress (1.7)16 * @since 1.6.0 17 * @deprecated 1.7.0 18 18 * @uses bp_get_maintenance_mode() To get the BuddyPress maintenance mode 19 19 */ … … 24 24 * Return the BuddyPress maintenance mode 25 25 * 26 * @since BuddyPress (1.6)27 * @deprecated BuddyPress (1.7)26 * @since 1.6.0 27 * @deprecated 1.7.0 28 28 * @return string The BuddyPress maintenance mode 29 29 */ … … 33 33 34 34 /** 35 * @deprecated BuddyPress (1.7)35 * @deprecated 1.7.0 36 36 */ 37 37 function xprofile_get_profile() { … … 41 41 42 42 /** 43 * @deprecated BuddyPress (1.7)43 * @deprecated 1.7.0 44 44 */ 45 45 function bp_get_profile_header() { … … 49 49 50 50 /** 51 * @deprecated BuddyPress (1.7)51 * @deprecated 1.7.0 52 52 * @param string $component_name 53 53 * @return boolean … … 62 62 63 63 /** 64 * @deprecated BuddyPress (1.7)64 * @deprecated 1.7.0 65 65 */ 66 66 function bp_get_plugin_sidebar() { … … 75 75 * step. It also means that the themes won't show for selection on other blogs. 76 76 * 77 * @deprecated BuddyPress (1.7)77 * @deprecated 1.7.0 78 78 * @package BuddyPress Core 79 79 */ … … 98 98 * No longer used by BuddyPress core 99 99 * 100 * @deprecated BuddyPress (1.7)100 * @deprecated 1.7.0 101 101 * @param string $page 102 102 * @return boolean True if is BuddyPress page … … 120 120 * before we had a legitimate update process. 121 121 * 122 * @deprecated BuddyPress (1.7)122 * @deprecated 1.7.0 123 123 * @global WPDB $wpdb 124 124 */ -
trunk/src/bp-core/deprecated/1.9.php
r9819 r10108 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Member Notifications … … 20 19 * bp_notifications_add_notification() instead. 21 20 * 22 * @since BuddyPress (1.0.0)21 * @since 1.0.0 23 22 * @param string $item_id 24 23 * @param int $user_id … … 63 62 * bp_notifications_delete_notification() instead. 64 63 * 65 * @since BuddyPress (1.0.0)64 * @since 1.0.0 66 65 * @param int $id ID of notification. 67 66 * @return boolean True on success, false on failure. … … 86 85 * bp_notifications_get_notification() instead. 87 86 * 88 * @since BuddyPress (1.0.0)87 * @since 1.0.0 89 88 * @param int $id ID of notification. 90 89 * @return BP_Core_Notification … … 109 108 * bp_notifications_get_notifications_for_user() instead. 110 109 * 111 * @since BuddyPress (1.0.0)110 * @since 1.0.0 112 111 * @param int $user_id ID of user. 113 112 * @param string $format … … 138 137 * bp_notifications_delete_notifications_by_type() instead. 139 138 * 140 * @since BuddyPress (1.0.0)139 * @since 1.0.0 141 140 * @param int $user_id 142 141 * @param string $component_name … … 166 165 * bp_notifications_delete_notifications_by_item_id() instead. 167 166 * 168 * @since BuddyPress (1.0.0)167 * @since 1.0.0 169 168 * @param int $user_id 170 169 * @param string $component_name … … 191 190 * bp_notifications_delete_all_notifications_by_type() instead. 192 191 * 193 * @since BuddyPress (1.0.0)192 * @since 1.0.0 194 193 * @param int $user_id 195 194 * @param string $component_name … … 218 217 * bp_notifications_delete_notifications_from_user() instead. 219 218 * 220 * @since BuddyPress (1.0.0)219 * @since 1.0.0 221 220 * @param int $user_id 222 221 * @param string $component_name … … 247 246 * bp_notifications_check_notification_access() instead. 248 247 * 249 * @since BuddyPress (1.0.0)248 * @since 1.0.0 250 249 * @param int $user_id 251 250 * @param int $notification_id -
trunk/src/bp-core/deprecated/2.0.php
r9819 r10108 12 12 13 13 /** 14 * @deprecated BuddyPress (2.0.0)14 * @deprecated 2.0.0 15 15 */ 16 16 function bp_activity_clear_meta_cache_for_activity() { … … 19 19 20 20 /** 21 * @deprecated BuddyPress (2.0.0)21 * @deprecated 2.0.0 22 22 */ 23 23 function bp_blogs_catch_published_post() { … … 26 26 27 27 /** 28 * @deprecated BuddyPress (2.0.0)28 * @deprecated 2.0.0 29 29 */ 30 30 function bp_messages_screen_inbox_mark_notifications() { -
trunk/src/bp-core/deprecated/2.1.php
r9819 r10108 14 14 * Register (not enqueue) scripts that used to be used by BuddyPress. 15 15 * 16 * @since BuddyPress (2.1.0)16 * @since 2.1.0 17 17 */ 18 18 function bp_core_register_deprecated_scripts() { … … 53 53 * Register (not enqueue) styles that used to be used by BuddyPress. 54 54 * 55 * @since BuddyPress (2.1.0)55 * @since 2.1.0 56 56 */ 57 57 function bp_core_register_deprecated_styles() { … … 83 83 * Add a Sites menu to the BuddyBar. 84 84 * 85 * @since BuddyPress (1.0.0)86 * @deprecated BuddyPress (2.1.0)85 * @since 1.0.0 86 * @deprecated 2.1.0 87 87 * 88 88 * @return bool|null Returns false on failure. Otherwise echoes the menu item. … … 150 150 * to the WP Toolbar. 151 151 * 152 * @since BuddyPress (1.6)153 * @deprecated BuddyPress (2.1.0)152 * @since 1.6.0 153 * @deprecated 2.1.0 154 154 */ 155 155 function bp_admin_setting_callback_force_buddybar() { … … 170 170 * to flip the boolean before saving the intval. 171 171 * 172 * @since BuddyPress (1.6)173 * @deprecated BuddyPress (2.1.0)172 * @since 1.6.0 173 * @deprecated 2.1.0 174 174 * @access Private 175 175 */ … … 182 182 * 183 183 * @return bool|null Returns false if the BuddyBar is disabled. 184 * @deprecated BuddyPress (2.1.0)184 * @deprecated 2.1.0 185 185 */ 186 186 function bp_core_admin_bar() { … … 216 216 * Output the BuddyBar logo. 217 217 * 218 * @deprecated BuddyPress (2.1.0)218 * @deprecated 2.1.0 219 219 */ 220 220 function bp_adminbar_logo() { … … 227 227 * Visible only to visitors who are not logged in. 228 228 * 229 * @deprecated BuddyPress (2.1.0)229 * @deprecated 2.1.0 230 230 * 231 231 * @return bool|null Returns false if the current user is logged in. … … 248 248 * Output the My Account BuddyBar menu. 249 249 * 250 * @deprecated BuddyPress (2.1.0)250 * @deprecated 2.1.0 251 251 * 252 252 * @return bool|null Returns false on failure. … … 333 333 * Not visible for logged-in users. 334 334 * 335 * @deprecated BuddyPress (2.1.0)335 * @deprecated 2.1.0 336 336 */ 337 337 function bp_adminbar_random_menu() { … … 366 366 * Enqueue the BuddyBar CSS. 367 367 * 368 * @deprecated BuddyPress (2.1.0)368 * @deprecated 2.1.0 369 369 */ 370 370 function bp_core_load_buddybar_css() { … … 394 394 * Add menu items to the BuddyBar. 395 395 * 396 * @since BuddyPress (1.0.0)397 * 398 * @deprecated BuddyPress (2.1.0)396 * @since 1.0.0 397 * 398 * @deprecated 2.1.0 399 399 */ 400 400 function bp_groups_adminbar_admin_menu() { … … 452 452 * Add the Notifications menu to the BuddyBar. 453 453 * 454 * @deprecated BuddyPress (2.1.0)454 * @deprecated 2.1.0 455 455 */ 456 456 function bp_adminbar_notifications_menu() { … … 468 468 * Add the Blog Authors menu to the BuddyBar (visible when not logged in). 469 469 * 470 * @deprecated BuddyPress (2.1.0)470 * @deprecated 2.1.0 471 471 */ 472 472 function bp_adminbar_authors_menu() { … … 524 524 * that allow capable users to clean up a users account. 525 525 * 526 * @deprecated BuddyPress (2.1.0)526 * @deprecated 2.1.0 527 527 */ 528 528 function bp_members_adminbar_admin_menu() { … … 567 567 * Create the Notifications menu for the BuddyBar. 568 568 * 569 * @since BuddyPress (1.9.0)570 * @deprecated BuddyPress (2.1.0)569 * @since 1.9.0 570 * @deprecated 2.1.0 571 571 */ 572 572 function bp_notifications_buddybar_menu() { … … 614 614 * Output the base URL for subdomain installations of WordPress Multisite. 615 615 * 616 * @since BuddyPress (1.6.0)617 * 618 * @deprecated BuddyPress (2.1.0)616 * @since 1.6.0 617 * 618 * @deprecated 2.1.0 619 619 */ 620 620 function bp_blogs_subdomain_base() { … … 626 626 * Return the base URL for subdomain installations of WordPress Multisite. 627 627 * 628 * @since BuddyPress (1.6.0)628 * @since 1.6.0 629 629 * 630 630 * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com. 631 631 * 632 * @deprecated BuddyPress (2.1.0)632 * @deprecated 2.1.0 633 633 */ 634 634 function bp_blogs_get_subdomain_base() { … … 640 640 * Allegedly output an avatar upload form, but it hasn't done that since 2009. 641 641 * 642 * @since BuddyPress (1.0.0)643 * @deprecated BuddyPress (2.1.0)642 * @since 1.0.0 643 * @deprecated 2.1.0 644 644 */ 645 645 function bp_avatar_upload_form() { -
trunk/src/bp-core/deprecated/2.2.php
r9819 r10108 20 20 * See #4090, #3746, #2546 for background. 21 21 * 22 * @since BuddyPress (2.0.0)23 * @deprecated BuddyPress (2.2.0)22 * @since 2.0.0 23 * @deprecated 2.2.0 24 24 * 25 25 * @todo Support untrashing better … … 37 37 * Record a new blog post in the BuddyPress activity stream. 38 38 * 39 * @deprecated BuddyPress (2.2.0)39 * @deprecated 2.2.0 40 40 * 41 41 * @param int $post_id ID of the post being recorded. … … 53 53 * Updates a blog post's corresponding activity entry during a post edit. 54 54 * 55 * @since BuddyPress (2.0.0)56 * @deprecated BuddyPress (2.2.0)55 * @since 2.0.0 56 * @deprecated 2.2.0 57 57 * 58 58 * @see bp_blogs_catch_transition_post_status() … … 68 68 * Clear cache when a new blog is created. 69 69 * 70 * @since BuddyPress (1.0.0)71 * @deprecated BuddyPress (2.2.0)70 * @since 1.0.0 71 * @deprecated 2.2.0 72 72 * 73 73 * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by … … 82 82 * Format 'new_member' activity actions. 83 83 * 84 * @since BuddyPress (2.0.0)85 * @deprecated BuddyPress (2.2.0)84 * @since 2.0.0 85 * @deprecated 2.2.0 86 86 * 87 87 * @param string $action Static activity action. … … 99 99 * Add 'bp' to global group of network wide cachable objects. 100 100 * 101 * @since BuddyPress (1.1)102 * @deprecated BuddyPress (2.2.0)101 * @since 1.1.0 102 * @deprecated 2.2.0 103 103 */ 104 104 function bp_core_add_global_group() { … … 109 109 * Add a piece of message metadata. 110 110 * 111 * @deprecated BuddyPress (2.2.2)111 * @deprecated 2.2.2 112 112 */ 113 113 function bp_message_add_meta( $message_id, $meta_key, $meta_value, $unique = false ) { -
trunk/src/bp-core/deprecated/2.3.php
r9819 r10108 12 12 * Return the referrer URL without the http(s):// 13 13 * 14 * @deprecated BuddyPress (2.3.0)14 * @deprecated 2.3.0 15 15 * 16 16 * @return string The referrer URL.
Note: See TracChangeset
for help on using the changeset viewer.