diff --git src/bp-core/bp-core-dependency.php src/bp-core/bp-core-dependency.php
index 6120ab0..591de96 100644
|
|
|
|
| 13 | 13 | * The following functions are wrappers for hooks, allowing them to be |
| 14 | 14 | * manually called and/or piggy-backed on top of other hooks if needed. |
| 15 | 15 | * |
| 16 | | * @todo use anonymous functions when PHP minimum requirement allows (5.3) |
| 17 | | * |
| 18 | 16 | * @package BuddyPress |
| 19 | 17 | * @subpackage Core |
| 20 | 18 | * @since 1.7.0 |
| … |
… |
|
| 23 | 21 | /** |
| 24 | 22 | * Fire the 'bp_include' action, where plugins should include files. |
| 25 | 23 | * |
| | 24 | * @deprecated No longer used in core. |
| | 25 | * |
| 26 | 26 | * @since 1.2.5 |
| 27 | 27 | */ |
| 28 | 28 | function bp_include() { |
| 29 | 29 | |
| 30 | | /** |
| 31 | | * Fires inside the 'bp_include' function, where plugins should include files. |
| 32 | | * |
| 33 | | * @since 1.2.5 |
| 34 | | */ |
| 35 | | do_action( 'bp_include' ); |
| | 30 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 36 | 31 | } |
| 37 | 32 | |
| 38 | 33 | /** |
| 39 | 34 | * Fire the 'bp_setup_components' action, where plugins should initialize components. |
| 40 | 35 | * |
| | 36 | * @deprecated No longer used in core. |
| | 37 | * |
| 41 | 38 | * @since 1.6.0 |
| 42 | 39 | */ |
| 43 | 40 | function bp_setup_components() { |
| 44 | 41 | |
| 45 | | /** |
| 46 | | * Fires inside the 'bp_setup_components' function, where plugins should initialize components. |
| 47 | | * |
| 48 | | * @since 1.6.0 |
| 49 | | */ |
| 50 | | do_action( 'bp_setup_components' ); |
| | 42 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 51 | 43 | } |
| 52 | 44 | |
| 53 | 45 | /** |
| 54 | 46 | * Fire the 'bp_setup_canonical_stack' action, where plugins should set up their canonical URL. |
| 55 | 47 | * |
| | 48 | * @deprecated No longer used in core. |
| | 49 | * |
| 56 | 50 | * @since 2.1.0 |
| 57 | 51 | */ |
| 58 | 52 | function bp_setup_canonical_stack() { |
| 59 | 53 | |
| 60 | | /** |
| 61 | | * Fires inside the 'bp_setup_canonical_stack' function, where plugins should set up their canonical URL. |
| 62 | | * |
| 63 | | * @since 2.1.0 |
| 64 | | */ |
| 65 | | do_action( 'bp_setup_canonical_stack' ); |
| | 54 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 66 | 55 | } |
| 67 | 56 | |
| 68 | 57 | /** |
| 69 | 58 | * Fire the 'bp_register_taxonomies' action, where plugins should register taxonomies. |
| 70 | 59 | * |
| | 60 | * @deprecated No longer used in core. |
| | 61 | * |
| 71 | 62 | * @since 2.2.0 |
| 72 | 63 | */ |
| 73 | 64 | function bp_register_taxonomies() { |
| 74 | 65 | |
| 75 | | /** |
| 76 | | * Fires inside the 'bp_register_taxonomies' function, where plugins should register taxonomies. |
| 77 | | * |
| 78 | | * @since 2.2.0 |
| 79 | | */ |
| 80 | | do_action( 'bp_register_taxonomies' ); |
| | 66 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 81 | 67 | } |
| 82 | 68 | |
| 83 | 69 | /** |
| 84 | 70 | * Fire the 'bp_register_post_types' action, where plugins should register post types. |
| 85 | 71 | * |
| | 72 | * @deprecated No longer used in core. |
| | 73 | * |
| 86 | 74 | * @since 2.5.0 |
| 87 | 75 | */ |
| 88 | 76 | function bp_register_post_types() { |
| 89 | 77 | |
| 90 | | /** |
| 91 | | * Fires inside the 'bp_register_post_types' function, where plugins should register post types. |
| 92 | | * |
| 93 | | * @since 2.5.0 |
| 94 | | */ |
| 95 | | do_action( 'bp_register_post_types' ); |
| | 78 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 96 | 79 | } |
| 97 | 80 | |
| 98 | 81 | /** |
| 99 | 82 | * Fire the 'bp_setup_globals' action, where plugins should initialize global settings. |
| 100 | 83 | * |
| | 84 | * @deprecated No longer used in core. |
| | 85 | * |
| 101 | 86 | * @since 1.2.0 |
| 102 | 87 | */ |
| 103 | 88 | function bp_setup_globals() { |
| 104 | 89 | |
| 105 | | /** |
| 106 | | * Fires inside the 'bp_setup_globals' function, where plugins should initialize global settings. |
| 107 | | * |
| 108 | | * @since 1.2.0 |
| 109 | | */ |
| 110 | | do_action( 'bp_setup_globals' ); |
| | 90 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 111 | 91 | } |
| 112 | 92 | |
| 113 | 93 | /** |
| 114 | 94 | * Fire the 'bp_setup_nav' action, where plugins should register their navigation items. |
| 115 | 95 | * |
| | 96 | * @deprecated No longer used in core. |
| | 97 | * |
| 116 | 98 | * @since 1.2.0 |
| 117 | 99 | */ |
| 118 | 100 | function bp_setup_nav() { |
| 119 | 101 | |
| 120 | | /** |
| 121 | | * Fires inside the 'bp_setup_nav' function, where plugins should register their navigation items. |
| 122 | | * |
| 123 | | * @since 1.2.0 |
| 124 | | */ |
| 125 | | do_action( 'bp_setup_nav' ); |
| | 102 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 126 | 103 | } |
| 127 | 104 | |
| 128 | 105 | /** |
| 129 | 106 | * Fire the 'bp_setup_admin_bar' action, where plugins should add items to the WP admin bar. |
| 130 | 107 | * |
| | 108 | * @deprecated No longer used in core. |
| | 109 | * |
| 131 | 110 | * @since 1.5.0 |
| 132 | 111 | */ |
| 133 | 112 | function bp_setup_admin_bar() { |
| 134 | | if ( bp_use_wp_admin_bar() ) { |
| 135 | 113 | |
| 136 | | /** |
| 137 | | * Fires inside the 'bp_setup_admin_bar' function, where plugins should add items to the WP admin bar. |
| 138 | | * |
| 139 | | * This hook will only fire if bp_use_wp_admin_bar() returns true. |
| 140 | | * |
| 141 | | * @since 1.5.0 |
| 142 | | */ |
| 143 | | do_action( 'bp_setup_admin_bar' ); |
| 144 | | } |
| | 114 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 145 | 115 | } |
| 146 | 116 | |
| 147 | 117 | /** |
| 148 | 118 | * Fire the 'bp_setup_title' action, where plugins should modify the page title. |
| 149 | 119 | * |
| | 120 | * @deprecated No longer used in core. |
| | 121 | * |
| 150 | 122 | * @since 1.5.0 |
| 151 | 123 | */ |
| 152 | 124 | function bp_setup_title() { |
| 153 | 125 | |
| 154 | | /** |
| 155 | | * Fires inside the 'bp_setup_title' function, where plugins should modify the page title. |
| 156 | | * |
| 157 | | * @since 1.5.0 |
| 158 | | */ |
| 159 | | do_action( 'bp_setup_title' ); |
| | 126 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 160 | 127 | } |
| 161 | 128 | |
| 162 | 129 | /** |
| 163 | 130 | * Fire the 'bp_register_widgets' action, where plugins should register widgets. |
| 164 | 131 | * |
| | 132 | * @deprecated No longer used in core. |
| | 133 | * |
| 165 | 134 | * @since 1.2.0 |
| 166 | 135 | */ |
| 167 | 136 | function bp_setup_widgets() { |
| 168 | 137 | |
| 169 | | /** |
| 170 | | * Fires inside the 'bp_register_widgets' function, where plugins should register widgets. |
| 171 | | * |
| 172 | | * @since 1.2.0 |
| 173 | | */ |
| 174 | | do_action( 'bp_register_widgets' ); |
| | 138 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 175 | 139 | } |
| 176 | 140 | |
| 177 | 141 | /** |
| 178 | 142 | * Fire the 'bp_register_member_types' action, where plugins should register member types. |
| 179 | 143 | * |
| | 144 | * @deprecated No longer used in core. |
| | 145 | * |
| 180 | 146 | * @since 2.3.0 |
| 181 | 147 | */ |
| 182 | 148 | function bp_register_member_types() { |
| 183 | 149 | |
| 184 | | /** |
| 185 | | * Fires inside bp_register_member_types(), so plugins can register member types. |
| 186 | | * |
| 187 | | * @since 2.3.0 |
| 188 | | */ |
| 189 | | do_action( 'bp_register_member_types' ); |
| | 150 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 190 | 151 | } |
| 191 | 152 | |
| 192 | 153 | /** |
| 193 | 154 | * Fire the 'bp_setup_cache_groups' action, where cache groups are registered. |
| 194 | 155 | * |
| | 156 | * @deprecated No longer used in core. |
| | 157 | * |
| 195 | 158 | * @since 2.2.0 |
| 196 | 159 | */ |
| 197 | 160 | function bp_setup_cache_groups() { |
| 198 | 161 | |
| 199 | | /** |
| 200 | | * Fires inside the 'bp_setup_cache_groups' function, where cache groups are registered. |
| 201 | | * |
| 202 | | * @since 2.2.0 |
| 203 | | */ |
| 204 | | do_action( 'bp_setup_cache_groups' ); |
| | 162 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 205 | 163 | } |
| 206 | 164 | |
| 207 | 165 | /** |
| 208 | 166 | * Set up the currently logged-in user. |
| 209 | 167 | * |
| | 168 | * @deprecated No longer used in core. |
| | 169 | * |
| 210 | 170 | * @since 1.7.0 |
| 211 | 171 | * |
| 212 | 172 | * @link https://buddypress.trac.wordpress.org/ticket/6046 |
| … |
… |
function bp_setup_cache_groups() { |
| 214 | 174 | */ |
| 215 | 175 | function bp_setup_current_user() { |
| 216 | 176 | |
| 217 | | /** |
| 218 | | * Fires to set up the current user setup process. |
| 219 | | * |
| 220 | | * @since 1.7.0 |
| 221 | | */ |
| 222 | | do_action( 'bp_setup_current_user' ); |
| | 177 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 223 | 178 | } |
| 224 | 179 | |
| 225 | 180 | /** |
| 226 | 181 | * Fire the 'bp_init' action, BuddyPress's main initialization hook. |
| 227 | 182 | * |
| | 183 | * @deprecated No longer used in core. |
| | 184 | * |
| 228 | 185 | * @since 1.2.5 |
| 229 | 186 | */ |
| 230 | 187 | function bp_init() { |
| 231 | 188 | |
| 232 | | /** |
| 233 | | * Fires inside the 'bp_init' function, BuddyPress' main initialization hook. |
| 234 | | * |
| 235 | | * @since 1.2.0 |
| 236 | | */ |
| 237 | | do_action( 'bp_init' ); |
| | 189 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 238 | 190 | } |
| 239 | 191 | |
| 240 | 192 | /** |
| 241 | 193 | * Fire the 'bp_rest_api_init' action, where BuddyPress registers REST API endpoints. |
| 242 | 194 | * |
| | 195 | * @deprecated No longer used in core. |
| | 196 | * |
| 243 | 197 | * @since 2.6.0 |
| 244 | 198 | */ |
| 245 | 199 | function bp_rest_api_init() { |
| 246 | 200 | |
| 247 | | /** |
| 248 | | * Fires the 'bp_rest_api_init' function, where BuddyPress registers REST API endpoints. |
| 249 | | * |
| 250 | | * @since 2.6.0 |
| 251 | | */ |
| 252 | | do_action( 'bp_rest_api_init' ); |
| | 201 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 253 | 202 | } |
| 254 | 203 | |
| 255 | 204 | /** |
| 256 | 205 | * Fire the 'bp_customize_register' action when the Customizer has loaded, |
| 257 | 206 | * allowing scripts and styles to be initialized. |
| 258 | 207 | * |
| | 208 | * @deprecated No longer used in core. |
| | 209 | * |
| 259 | 210 | * @since 2.5.0 |
| 260 | 211 | * |
| 261 | 212 | * @param WP_Customize_Manager $customizer Customizer instance. |
| 262 | 213 | */ |
| 263 | 214 | function bp_customize_register( WP_Customize_Manager $customizer ) { |
| 264 | 215 | |
| 265 | | /** |
| 266 | | * Fires once the Customizer has loaded, allow scripts and styles to be initialized. |
| 267 | | * |
| 268 | | * @since 2.5.0 |
| 269 | | * |
| 270 | | * @param WP_Customize_Manager $customizer Customizer instance. |
| 271 | | */ |
| 272 | | do_action( 'bp_customize_register', $customizer ); |
| | 216 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 273 | 217 | } |
| 274 | 218 | |
| 275 | 219 | /** |
| … |
… |
function bp_customize_register( WP_Customize_Manager $customizer ) { |
| 277 | 221 | * |
| 278 | 222 | * Attached to 'plugins_loaded'. |
| 279 | 223 | * |
| | 224 | * @deprecated No longer used in core. |
| | 225 | * |
| 280 | 226 | * @since 1.2.0 |
| 281 | 227 | */ |
| 282 | 228 | function bp_loaded() { |
| 283 | 229 | |
| 284 | | /** |
| 285 | | * Fires inside the 'bp_loaded' function, which fires after BP's core plugin files have been loaded. |
| 286 | | * |
| 287 | | * @since 1.2.5 |
| 288 | | */ |
| 289 | | do_action( 'bp_loaded' ); |
| | 230 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 290 | 231 | } |
| 291 | 232 | |
| 292 | 233 | /** |
| … |
… |
function bp_loaded() { |
| 294 | 235 | * |
| 295 | 236 | * Attached to 'wp'. |
| 296 | 237 | * |
| | 238 | * @deprecated No longer used in core. |
| | 239 | * |
| 297 | 240 | * @since 1.6.0 |
| 298 | 241 | */ |
| 299 | 242 | function bp_ready() { |
| 300 | 243 | |
| 301 | | /** |
| 302 | | * Fires inside the 'bp_ready' function, which runs after BP is set up and the page is about to render. |
| 303 | | * |
| 304 | | * @since 1.6.0 |
| 305 | | */ |
| 306 | | do_action( 'bp_ready' ); |
| | 244 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 307 | 245 | } |
| 308 | 246 | |
| 309 | 247 | /** |
| … |
… |
function bp_ready() { |
| 312 | 250 | * Attach potential template actions, such as catching form requests or routing |
| 313 | 251 | * custom URLs. |
| 314 | 252 | * |
| | 253 | * @deprecated No longer used in core. |
| | 254 | * |
| 315 | 255 | * @since 1.5.0 |
| 316 | 256 | */ |
| 317 | 257 | function bp_actions() { |
| 318 | 258 | |
| 319 | | /** |
| 320 | | * Fires inside the 'bp_actions' function, which runs just before rendering. |
| 321 | | * |
| 322 | | * @since 1.5.0 |
| 323 | | */ |
| 324 | | do_action( 'bp_actions' ); |
| | 259 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 325 | 260 | } |
| 326 | 261 | |
| 327 | 262 | /** |
| … |
… |
function bp_actions() { |
| 330 | 265 | * Runs just after 'bp_actions'. Use this hook to attach your template |
| 331 | 266 | * loaders. |
| 332 | 267 | * |
| | 268 | * @deprecated No longer used in core. |
| | 269 | * |
| 333 | 270 | * @since 1.5.0 |
| 334 | 271 | */ |
| 335 | 272 | function bp_screens() { |
| 336 | 273 | |
| 337 | | /** |
| 338 | | * Fires inside the 'bp_screens' function, which runs just before rendering. |
| 339 | | * |
| 340 | | * Runs just after 'bp_actions'. Use this hook to attach your template loaders. |
| 341 | | * |
| 342 | | * @since 1.5.0 |
| 343 | | */ |
| 344 | | do_action( 'bp_screens' ); |
| | 274 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 345 | 275 | } |
| 346 | 276 | |
| 347 | 277 | /** |
| … |
… |
function bp_screens() { |
| 349 | 279 | * |
| 350 | 280 | * Hooked to 'widgets_init'. |
| 351 | 281 | * |
| | 282 | * @deprecated No longer used in core. |
| | 283 | * |
| 352 | 284 | * @since 1.6.0 |
| 353 | 285 | */ |
| 354 | 286 | function bp_widgets_init() { |
| 355 | 287 | |
| 356 | | /** |
| 357 | | * Fires inside the 'bp_widgets_init' function, which runs after widgets have been set up. |
| 358 | | * |
| 359 | | * Hooked to 'widgets_init'. |
| 360 | | * |
| 361 | | * @since 1.6.0 |
| 362 | | */ |
| 363 | | do_action( 'bp_widgets_init' ); |
| | 288 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 364 | 289 | } |
| 365 | 290 | |
| 366 | 291 | /** |
| … |
… |
function bp_widgets_init() { |
| 368 | 293 | * |
| 369 | 294 | * Hooked to 'wp_head'. |
| 370 | 295 | * |
| | 296 | * @deprecated No longer used in core. |
| | 297 | * |
| 371 | 298 | * @since 1.6.0 |
| 372 | 299 | */ |
| 373 | 300 | function bp_head() { |
| 374 | 301 | |
| 375 | | /** |
| 376 | | * Fires inside the 'bp_head' function, which runs on 'wp_head'. |
| 377 | | * |
| 378 | | * @since 1.6.0 |
| 379 | | */ |
| 380 | | do_action( 'bp_head' ); |
| | 302 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 381 | 303 | } |
| 382 | 304 | |
| 383 | 305 | /** Theme Permissions *********************************************************/ |
| … |
… |
function bp_head() { |
| 389 | 311 | * template. The main purpose of this hook in BuddyPress is to redirect users |
| 390 | 312 | * who do not have the proper permission to access certain content. |
| 391 | 313 | * |
| | 314 | * @deprecated No longer used in core. |
| | 315 | * |
| 392 | 316 | * @since 1.6.0 |
| 393 | 317 | */ |
| 394 | 318 | function bp_template_redirect() { |
| 395 | 319 | |
| 396 | | /** |
| 397 | | * Fires inside the 'bp_template_redirect' function. |
| 398 | | * |
| 399 | | * @since 1.6.0 |
| 400 | | */ |
| 401 | | do_action( 'bp_template_redirect' ); |
| | 320 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 402 | 321 | } |
| 403 | 322 | |
| 404 | 323 | /** Theme Helpers *************************************************************/ |
| … |
… |
function bp_template_redirect() { |
| 408 | 327 | * |
| 409 | 328 | * The main action used registering theme directories. |
| 410 | 329 | * |
| | 330 | * @deprecated No longer used in core. |
| | 331 | * |
| 411 | 332 | * @since 1.5.0 |
| 412 | 333 | */ |
| 413 | 334 | function bp_register_theme_directory() { |
| 414 | 335 | |
| 415 | | /** |
| 416 | | * Fires inside the 'bp_register_theme_directory' function. |
| 417 | | * |
| 418 | | * The main action used registering theme directories. |
| 419 | | * |
| 420 | | * @since 1.7.0 |
| 421 | | */ |
| 422 | | do_action( 'bp_register_theme_directory' ); |
| | 336 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 423 | 337 | } |
| 424 | 338 | |
| 425 | 339 | /** |
| … |
… |
function bp_register_theme_directory() { |
| 427 | 341 | * |
| 428 | 342 | * The main action used registering theme packages. |
| 429 | 343 | * |
| | 344 | * @deprecated No longer used in core. |
| | 345 | * |
| 430 | 346 | * @since 1.7.0 |
| 431 | 347 | */ |
| 432 | 348 | function bp_register_theme_packages() { |
| 433 | 349 | |
| 434 | | /** |
| 435 | | * Fires inside the 'bp_register_theme_packages' function. |
| 436 | | * |
| 437 | | * @since 1.7.0 |
| 438 | | */ |
| 439 | | do_action( 'bp_register_theme_packages' ); |
| | 350 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 440 | 351 | } |
| 441 | 352 | |
| 442 | 353 | /** |
| 443 | 354 | * Fire the 'bp_enqueue_scripts' action, where BP enqueues its CSS and JS. |
| 444 | 355 | * |
| | 356 | * @deprecated No longer used in core. |
| | 357 | * |
| 445 | 358 | * @since 1.6.0 |
| 446 | 359 | */ |
| 447 | 360 | function bp_enqueue_scripts() { |
| 448 | 361 | |
| 449 | | /** |
| 450 | | * Fires inside the 'bp_enqueue_scripts' function, where BP enqueues its CSS and JS. |
| 451 | | * |
| 452 | | * @since 1.6.0 |
| 453 | | */ |
| 454 | | do_action( 'bp_enqueue_scripts' ); |
| | 362 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 455 | 363 | } |
| 456 | 364 | |
| 457 | 365 | /** |
| 458 | 366 | * Fires the 'bp_enqueue_embed_scripts' action in the <head> for BP oEmbeds. |
| 459 | 367 | * |
| | 368 | * @deprecated No longer used in core. |
| | 369 | * |
| 460 | 370 | * @since 2.6.0 |
| 461 | 371 | */ |
| 462 | 372 | function bp_enqueue_embed_scripts() { |
| 463 | | if ( ! is_buddypress() ) { |
| 464 | | return; |
| 465 | | } |
| 466 | 373 | |
| 467 | | /** |
| 468 | | * Enqueue CSS and JS files for BuddyPress embeds. |
| 469 | | * |
| 470 | | * @since 2.6.0 |
| 471 | | */ |
| 472 | | do_action( 'bp_enqueue_embed_scripts' ); |
| | 374 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 473 | 375 | } |
| 474 | 376 | |
| 475 | 377 | /** |
| 476 | 378 | * Fire the 'bp_add_rewrite_tag' action, where BP adds its custom rewrite tags. |
| 477 | 379 | * |
| | 380 | * @deprecated No longer used in core. |
| | 381 | * |
| 478 | 382 | * @since 1.8.0 |
| 479 | 383 | */ |
| 480 | 384 | function bp_add_rewrite_tags() { |
| 481 | 385 | |
| 482 | | /** |
| 483 | | * Fires inside the 'bp_add_rewrite_tags' function, where BP adds its custom rewrite tags. |
| 484 | | * |
| 485 | | * @since 1.8.0 |
| 486 | | */ |
| 487 | | do_action( 'bp_add_rewrite_tags' ); |
| | 386 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 488 | 387 | } |
| 489 | 388 | |
| 490 | 389 | /** |
| 491 | 390 | * Fire the 'bp_add_rewrite_rules' action, where BP adds its custom rewrite rules. |
| 492 | 391 | * |
| | 392 | * @deprecated No longer used in core. |
| | 393 | * |
| 493 | 394 | * @since 1.9.0 |
| 494 | 395 | */ |
| 495 | 396 | function bp_add_rewrite_rules() { |
| 496 | 397 | |
| 497 | | /** |
| 498 | | * Fires inside the 'bp_add_rewrite_rules' function, where BP adds its custom rewrite rules. |
| 499 | | * |
| 500 | | * @since 1.9.0 |
| 501 | | */ |
| 502 | | do_action( 'bp_add_rewrite_rules' ); |
| | 398 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 503 | 399 | } |
| 504 | 400 | |
| 505 | 401 | /** |
| 506 | 402 | * Fire the 'bp_add_permastructs' action, where BP adds its BP-specific permalink structure. |
| 507 | 403 | * |
| | 404 | * @deprecated No longer used in core. |
| | 405 | * |
| 508 | 406 | * @since 1.9.0 |
| 509 | 407 | */ |
| 510 | 408 | function bp_add_permastructs() { |
| 511 | 409 | |
| 512 | | /** |
| 513 | | * Fires inside the 'bp_add_permastructs' function, where BP adds its BP-specific permalink structure. |
| 514 | | * |
| 515 | | * @since 1.9.0 |
| 516 | | */ |
| 517 | | do_action( 'bp_add_permastructs' ); |
| | 410 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 518 | 411 | } |
| 519 | 412 | |
| 520 | 413 | /** |
| … |
… |
function bp_add_permastructs() { |
| 523 | 416 | * The main purpose of 'bp_setup_theme' is give themes a place to load their |
| 524 | 417 | * BuddyPress-specific functionality. |
| 525 | 418 | * |
| | 419 | * @deprecated No longer used in core. |
| | 420 | * |
| 526 | 421 | * @since 1.6.0 |
| 527 | 422 | */ |
| 528 | 423 | function bp_setup_theme() { |
| 529 | 424 | |
| 530 | | /** |
| 531 | | * Fires inside the 'bp_setup_theme' function. |
| 532 | | * |
| 533 | | * @since 1.6.0 |
| 534 | | */ |
| 535 | | do_action( 'bp_setup_theme' ); |
| | 425 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 536 | 426 | } |
| 537 | 427 | |
| 538 | 428 | /** |
| … |
… |
function bp_setup_theme() { |
| 545 | 435 | * time for other themes to load their features, such as BuddyPress support, |
| 546 | 436 | * before our theme compatibility layer kicks in. |
| 547 | 437 | * |
| | 438 | * @deprecated No longer used in core. |
| | 439 | * |
| 548 | 440 | * @since 1.6.0 |
| 549 | 441 | */ |
| 550 | 442 | function bp_after_setup_theme() { |
| 551 | 443 | |
| 552 | | /** |
| 553 | | * Fires inside the 'bp_after_setup_theme' function. |
| 554 | | * |
| 555 | | * @since 1.7.0 |
| 556 | | */ |
| 557 | | do_action( 'bp_after_setup_theme' ); |
| | 444 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 558 | 445 | } |
| 559 | 446 | |
| 560 | 447 | /** Theme Compatibility Filter ************************************************/ |
| … |
… |
function bp_after_setup_theme() { |
| 562 | 449 | /** |
| 563 | 450 | * Fire the 'bp_request' filter, a piggy-back of WP's 'request'. |
| 564 | 451 | * |
| | 452 | * @deprecated No longer used in core. |
| | 453 | * |
| 565 | 454 | * @since 1.7.0 |
| 566 | 455 | * |
| 567 | 456 | * @see WP::parse_request() for a description of parameters. |
| … |
… |
function bp_after_setup_theme() { |
| 571 | 460 | */ |
| 572 | 461 | function bp_request( $query_vars = array() ) { |
| 573 | 462 | |
| 574 | | /** |
| 575 | | * Filters the query_vars for the current request. |
| 576 | | * |
| 577 | | * @since 1.7.0 |
| 578 | | * |
| 579 | | * @param array $query_vars Array of query variables. |
| 580 | | */ |
| 581 | | return apply_filters( 'bp_request', $query_vars ); |
| | 463 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_filter.' ); |
| 582 | 464 | } |
| 583 | 465 | |
| 584 | 466 | /** |
| 585 | 467 | * Fire the 'bp_login_redirect' filter, a piggy-back of WP's 'login_redirect'. |
| 586 | 468 | * |
| | 469 | * @deprecated No longer used in core. |
| | 470 | * |
| 587 | 471 | * @since 1.7.0 |
| 588 | 472 | * |
| 589 | 473 | * @param string $redirect_to See 'login_redirect'. |
| … |
… |
function bp_request( $query_vars = array() ) { |
| 593 | 477 | */ |
| 594 | 478 | function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = false ) { |
| 595 | 479 | |
| 596 | | /** |
| 597 | | * Filters the URL to redirect to after login. |
| 598 | | * |
| 599 | | * @since 1.7.0 |
| 600 | | * |
| 601 | | * @param string $redirect_to The redirect destination URL. |
| 602 | | * @param string $redirect_to_raw The requested redirect destination URL passed as a parameter. |
| 603 | | * @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise. |
| 604 | | */ |
| 605 | | return apply_filters( 'bp_login_redirect', $redirect_to, $redirect_to_raw, $user ); |
| | 480 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_filter.' ); |
| 606 | 481 | } |
| 607 | 482 | |
| 608 | 483 | /** |
| … |
… |
function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = fa |
| 610 | 485 | * |
| 611 | 486 | * Hooked to 'template_include'. |
| 612 | 487 | * |
| | 488 | * @deprecated No longer used in core. |
| | 489 | * |
| 613 | 490 | * @since 1.6.0 |
| 614 | 491 | * |
| 615 | 492 | * @param string $template See 'template_include'. |
| … |
… |
function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = fa |
| 617 | 494 | */ |
| 618 | 495 | function bp_template_include( $template = '' ) { |
| 619 | 496 | |
| 620 | | /** |
| 621 | | * Filters the template to use with template_include. |
| 622 | | * |
| 623 | | * @since 1.6.0 |
| 624 | | * |
| 625 | | * @param string $template The path of the template to include. |
| 626 | | */ |
| 627 | | return apply_filters( 'bp_template_include', $template ); |
| | 497 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_filter.' ); |
| 628 | 498 | } |
| 629 | 499 | |
| 630 | 500 | /** |
| 631 | 501 | * Fire the 'bp_generate_rewrite_rules' action, where BP generates its rewrite rules. |
| 632 | 502 | * |
| | 503 | * @deprecated No longer used in core. |
| | 504 | * |
| 633 | 505 | * @since 1.7.0 |
| 634 | 506 | * |
| 635 | 507 | * @param WP_Rewrite $wp_rewrite See 'generate_rewrite_rules'. |
| 636 | 508 | */ |
| 637 | 509 | function bp_generate_rewrite_rules( $wp_rewrite ) { |
| 638 | 510 | |
| 639 | | /** |
| 640 | | * Fires inside the 'bp_generate_rewrite_rules' function. |
| 641 | | * |
| 642 | | * @since 1.7.0 |
| 643 | | * |
| 644 | | * @param WP_Rewrite $wp_rewrite WP_Rewrite object. Passed by reference. |
| 645 | | */ |
| 646 | | do_action_ref_array( 'bp_generate_rewrite_rules', array( &$wp_rewrite ) ); |
| | 511 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 647 | 512 | } |
| 648 | 513 | |
| 649 | 514 | /** |
| … |
… |
function bp_allowed_themes( $themes ) { |
| 673 | 538 | /** |
| 674 | 539 | * The main action used for handling theme-side POST requests. |
| 675 | 540 | * |
| | 541 | * @deprecated No longer used in core. |
| | 542 | * |
| 676 | 543 | * @since 1.9.0 |
| 677 | 544 | */ |
| 678 | 545 | function bp_post_request() { |
| 679 | 546 | |
| 680 | | // Bail if not a POST action. |
| 681 | | if ( ! bp_is_post_request() ) { |
| 682 | | return; |
| 683 | | } |
| 684 | | |
| 685 | | // Bail if no action. |
| 686 | | if ( empty( $_POST['action'] ) ) { |
| 687 | | return; |
| 688 | | } |
| 689 | | |
| 690 | | // Sanitize the POST action. |
| 691 | | $action = sanitize_key( $_POST['action'] ); |
| 692 | | |
| 693 | | /** |
| 694 | | * Fires at the end of the bp_post_request function. |
| 695 | | * |
| 696 | | * This dynamic action is probably the one you want to use. It narrows down |
| 697 | | * the scope of the 'action' without needing to check it in your function. |
| 698 | | * |
| 699 | | * @since 1.9.0 |
| 700 | | */ |
| 701 | | do_action( 'bp_post_request_' . $action ); |
| 702 | | |
| 703 | | /** |
| 704 | | * Fires at the end of the bp_post_request function. |
| 705 | | * |
| 706 | | * Use this static action if you don't mind checking the 'action' yourself. |
| 707 | | * |
| 708 | | * @since 1.9.0 |
| 709 | | * |
| 710 | | * @param string $action The action being run. |
| 711 | | */ |
| 712 | | do_action( 'bp_post_request', $action ); |
| | 547 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 713 | 548 | } |
| 714 | 549 | |
| 715 | 550 | /** |
| 716 | 551 | * The main action used for handling theme-side GET requests. |
| 717 | 552 | * |
| | 553 | * @deprecated No longer used in core. |
| | 554 | * |
| 718 | 555 | * @since 1.9.0 |
| 719 | 556 | */ |
| 720 | 557 | function bp_get_request() { |
| 721 | 558 | |
| 722 | | // Bail if not a POST action. |
| 723 | | if ( ! bp_is_get_request() ) { |
| 724 | | return; |
| 725 | | } |
| 726 | | |
| 727 | | // Bail if no action. |
| 728 | | if ( empty( $_GET['action'] ) ) { |
| 729 | | return; |
| 730 | | } |
| 731 | | |
| 732 | | // Sanitize the GET action. |
| 733 | | $action = sanitize_key( $_GET['action'] ); |
| 734 | | |
| 735 | | /** |
| 736 | | * Fires at the end of the bp_get_request function. |
| 737 | | * |
| 738 | | * This dynamic action is probably the one you want to use. It narrows down |
| 739 | | * the scope of the 'action' without needing to check it in your function. |
| 740 | | * |
| 741 | | * @since 1.9.0 |
| 742 | | */ |
| 743 | | do_action( 'bp_get_request_' . $action ); |
| 744 | | |
| 745 | | /** |
| 746 | | * Fires at the end of the bp_get_request function. |
| 747 | | * |
| 748 | | * Use this static action if you don't mind checking the 'action' yourself. |
| 749 | | * |
| 750 | | * @since 1.9.0 |
| 751 | | * |
| 752 | | * @param string $action The action being run. |
| 753 | | */ |
| 754 | | do_action( 'bp_get_request', $action ); |
| | 559 | _deprecated_function( __FUNCTION__, '2.8.0', 'Callback has been moved to an anonymous function for the associated add_action.' ); |
| 755 | 560 | } |