Changeset 10108
- Timestamp:
- 09/13/2015 02:02:56 AM (9 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 *