Skip to:
Content

BuddyPress.org

Ticket #7335: 7335-deprecated-notices.diff

File 7335-deprecated-notices.diff, 22.4 KB (added by tw2113, 3 years ago)
  • src/bp-core/bp-core-dependency.php

    diff --git src/bp-core/bp-core-dependency.php src/bp-core/bp-core-dependency.php
    index 6120ab0..591de96 100644
     
    1313 * The following functions are wrappers for hooks, allowing them to be
    1414 * manually called and/or piggy-backed on top of other hooks if needed.
    1515 *
    16  * @todo use anonymous functions when PHP minimum requirement allows (5.3)
    17  *
    1816 * @package BuddyPress
    1917 * @subpackage Core
    2018 * @since 1.7.0
     
    2321/**
    2422 * Fire the 'bp_include' action, where plugins should include files.
    2523 *
     24 * @deprecated No longer used in core.
     25 *
    2626 * @since 1.2.5
    2727 */
    2828function bp_include() {
    2929
    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.' );
    3631}
    3732
    3833/**
    3934 * Fire the 'bp_setup_components' action, where plugins should initialize components.
    4035 *
     36 * @deprecated No longer used in core.
     37 *
    4138 * @since 1.6.0
    4239 */
    4340function bp_setup_components() {
    4441
    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.' );
    5143}
    5244
    5345/**
    5446 * Fire the 'bp_setup_canonical_stack' action, where plugins should set up their canonical URL.
    5547 *
     48 * @deprecated No longer used in core.
     49 *
    5650 * @since 2.1.0
    5751 */
    5852function bp_setup_canonical_stack() {
    5953
    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.' );
    6655}
    6756
    6857/**
    6958 * Fire the 'bp_register_taxonomies' action, where plugins should register taxonomies.
    7059 *
     60 * @deprecated No longer used in core.
     61 *
    7162 * @since 2.2.0
    7263 */
    7364function bp_register_taxonomies() {
    7465
    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.' );
    8167}
    8268
    8369/**
    8470 * Fire the 'bp_register_post_types' action, where plugins should register post types.
    8571 *
     72 * @deprecated No longer used in core.
     73 *
    8674 * @since 2.5.0
    8775 */
    8876function bp_register_post_types() {
    8977
    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.' );
    9679}
    9780
    9881/**
    9982 * Fire the 'bp_setup_globals' action, where plugins should initialize global settings.
    10083 *
     84 * @deprecated No longer used in core.
     85 *
    10186 * @since 1.2.0
    10287 */
    10388function bp_setup_globals() {
    10489
    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.' );
    11191}
    11292
    11393/**
    11494 * Fire the 'bp_setup_nav' action, where plugins should register their navigation items.
    11595 *
     96 * @deprecated No longer used in core.
     97 *
    11698 * @since 1.2.0
    11799 */
    118100function bp_setup_nav() {
    119101
    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.' );
    126103}
    127104
    128105/**
    129106 * Fire the 'bp_setup_admin_bar' action, where plugins should add items to the WP admin bar.
    130107 *
     108 * @deprecated No longer used in core.
     109 *
    131110 * @since 1.5.0
    132111 */
    133112function bp_setup_admin_bar() {
    134         if ( bp_use_wp_admin_bar() ) {
    135113
    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.' );
    145115}
    146116
    147117/**
    148118 * Fire the 'bp_setup_title' action, where plugins should modify the page title.
    149119 *
     120 * @deprecated No longer used in core.
     121 *
    150122 * @since 1.5.0
    151123 */
    152124function bp_setup_title() {
    153125
    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.' );
    160127}
    161128
    162129/**
    163130 * Fire the 'bp_register_widgets' action, where plugins should register widgets.
    164131 *
     132 * @deprecated No longer used in core.
     133 *
    165134 * @since 1.2.0
    166135 */
    167136function bp_setup_widgets() {
    168137
    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.' );
    175139}
    176140
    177141/**
    178142 * Fire the 'bp_register_member_types' action, where plugins should register member types.
    179143 *
     144 * @deprecated No longer used in core.
     145 *
    180146 * @since 2.3.0
    181147 */
    182148function bp_register_member_types() {
    183149
    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.' );
    190151}
    191152
    192153/**
    193154 * Fire the 'bp_setup_cache_groups' action, where cache groups are registered.
    194155 *
     156 * @deprecated No longer used in core.
     157 *
    195158 * @since 2.2.0
    196159 */
    197160function bp_setup_cache_groups() {
    198161
    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.' );
    205163}
    206164
    207165/**
    208166 * Set up the currently logged-in user.
    209167 *
     168 * @deprecated No longer used in core.
     169 *
    210170 * @since 1.7.0
    211171 *
    212172 * @link https://buddypress.trac.wordpress.org/ticket/6046
    function bp_setup_cache_groups() { 
    214174 */
    215175function bp_setup_current_user() {
    216176
    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.' );
    223178}
    224179
    225180/**
    226181 * Fire the 'bp_init' action, BuddyPress's main initialization hook.
    227182 *
     183 * @deprecated No longer used in core.
     184 *
    228185 * @since 1.2.5
    229186 */
    230187function bp_init() {
    231188
    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.' );
    238190}
    239191
    240192/**
    241193 * Fire the 'bp_rest_api_init' action, where BuddyPress registers REST API endpoints.
    242194 *
     195 * @deprecated No longer used in core.
     196 *
    243197 * @since 2.6.0
    244198 */
    245199function bp_rest_api_init() {
    246200
    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.' );
    253202}
    254203
    255204/**
    256205 * Fire the 'bp_customize_register' action when the Customizer has loaded,
    257206 * allowing scripts and styles to be initialized.
    258207 *
     208 * @deprecated No longer used in core.
     209 *
    259210 * @since 2.5.0
    260211 *
    261212 * @param WP_Customize_Manager $customizer Customizer instance.
    262213 */
    263214function bp_customize_register( WP_Customize_Manager $customizer ) {
    264215
    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.' );
    273217}
    274218
    275219/**
    function bp_customize_register( WP_Customize_Manager $customizer ) { 
    277221 *
    278222 * Attached to 'plugins_loaded'.
    279223 *
     224 * @deprecated No longer used in core.
     225 *
    280226 * @since 1.2.0
    281227 */
    282228function bp_loaded() {
    283229
    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.' );
    290231}
    291232
    292233/**
    function bp_loaded() { 
    294235 *
    295236 * Attached to 'wp'.
    296237 *
     238 * @deprecated No longer used in core.
     239 *
    297240 * @since 1.6.0
    298241 */
    299242function bp_ready() {
    300243
    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.' );
    307245}
    308246
    309247/**
    function bp_ready() { 
    312250 * Attach potential template actions, such as catching form requests or routing
    313251 * custom URLs.
    314252 *
     253 * @deprecated No longer used in core.
     254 *
    315255 * @since 1.5.0
    316256 */
    317257function bp_actions() {
    318258
    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.' );
    325260}
    326261
    327262/**
    function bp_actions() { 
    330265 * Runs just after 'bp_actions'. Use this hook to attach your template
    331266 * loaders.
    332267 *
     268 * @deprecated No longer used in core.
     269 *
    333270 * @since 1.5.0
    334271 */
    335272function bp_screens() {
    336273
    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.' );
    345275}
    346276
    347277/**
    function bp_screens() { 
    349279 *
    350280 * Hooked to 'widgets_init'.
    351281 *
     282 * @deprecated No longer used in core.
     283 *
    352284 * @since 1.6.0
    353285 */
    354286function bp_widgets_init() {
    355287
    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.' );
    364289}
    365290
    366291/**
    function bp_widgets_init() { 
    368293 *
    369294 * Hooked to 'wp_head'.
    370295 *
     296 * @deprecated No longer used in core.
     297 *
    371298 * @since 1.6.0
    372299 */
    373300function bp_head() {
    374301
    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.' );
    381303}
    382304
    383305/** Theme Permissions *********************************************************/
    function bp_head() { 
    389311 * template. The main purpose of this hook in BuddyPress is to redirect users
    390312 * who do not have the proper permission to access certain content.
    391313 *
     314 * @deprecated No longer used in core.
     315 *
    392316 * @since 1.6.0
    393317 */
    394318function bp_template_redirect() {
    395319
    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.' );
    402321}
    403322
    404323/** Theme Helpers *************************************************************/
    function bp_template_redirect() { 
    408327 *
    409328 * The main action used registering theme directories.
    410329 *
     330 * @deprecated No longer used in core.
     331 *
    411332 * @since 1.5.0
    412333 */
    413334function bp_register_theme_directory() {
    414335
    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.' );
    423337}
    424338
    425339/**
    function bp_register_theme_directory() { 
    427341 *
    428342 * The main action used registering theme packages.
    429343 *
     344 * @deprecated No longer used in core.
     345 *
    430346 * @since 1.7.0
    431347 */
    432348function bp_register_theme_packages() {
    433349
    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.' );
    440351}
    441352
    442353/**
    443354 * Fire the 'bp_enqueue_scripts' action, where BP enqueues its CSS and JS.
    444355 *
     356 * @deprecated No longer used in core.
     357 *
    445358 * @since 1.6.0
    446359 */
    447360function bp_enqueue_scripts() {
    448361
    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.' );
    455363}
    456364
    457365/**
    458366 * Fires the 'bp_enqueue_embed_scripts' action in the <head> for BP oEmbeds.
    459367 *
     368 * @deprecated No longer used in core.
     369 *
    460370 * @since 2.6.0
    461371 */
    462372function bp_enqueue_embed_scripts() {
    463         if ( ! is_buddypress() ) {
    464                 return;
    465         }
    466373
    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.' );
    473375}
    474376
    475377/**
    476378 * Fire the 'bp_add_rewrite_tag' action, where BP adds its custom rewrite tags.
    477379 *
     380 * @deprecated No longer used in core.
     381 *
    478382 * @since 1.8.0
    479383 */
    480384function bp_add_rewrite_tags() {
    481385
    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.' );
    488387}
    489388
    490389/**
    491390 * Fire the 'bp_add_rewrite_rules' action, where BP adds its custom rewrite rules.
    492391 *
     392 * @deprecated No longer used in core.
     393 *
    493394 * @since 1.9.0
    494395 */
    495396function bp_add_rewrite_rules() {
    496397
    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.' );
    503399}
    504400
    505401/**
    506402 * Fire the 'bp_add_permastructs' action, where BP adds its BP-specific permalink structure.
    507403 *
     404 * @deprecated No longer used in core.
     405 *
    508406 * @since 1.9.0
    509407 */
    510408function bp_add_permastructs() {
    511409
    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.' );
    518411}
    519412
    520413/**
    function bp_add_permastructs() { 
    523416 * The main purpose of 'bp_setup_theme' is give themes a place to load their
    524417 * BuddyPress-specific functionality.
    525418 *
     419 * @deprecated No longer used in core.
     420 *
    526421 * @since 1.6.0
    527422 */
    528423function bp_setup_theme() {
    529424
    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.' );
    536426}
    537427
    538428/**
    function bp_setup_theme() { 
    545435 * time for other themes to load their features, such as BuddyPress support,
    546436 * before our theme compatibility layer kicks in.
    547437 *
     438 * @deprecated No longer used in core.
     439 *
    548440 * @since 1.6.0
    549441 */
    550442function bp_after_setup_theme() {
    551443
    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.' );
    558445}
    559446
    560447/** Theme Compatibility Filter ************************************************/
    function bp_after_setup_theme() { 
    562449/**
    563450 * Fire the 'bp_request' filter, a piggy-back of WP's 'request'.
    564451 *
     452 * @deprecated No longer used in core.
     453 *
    565454 * @since 1.7.0
    566455 *
    567456 * @see WP::parse_request() for a description of parameters.
    function bp_after_setup_theme() { 
    571460 */
    572461function bp_request( $query_vars = array() ) {
    573462
    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.' );
    582464}
    583465
    584466/**
    585467 * Fire the 'bp_login_redirect' filter, a piggy-back of WP's 'login_redirect'.
    586468 *
     469 * @deprecated No longer used in core.
     470 *
    587471 * @since 1.7.0
    588472 *
    589473 * @param string $redirect_to     See 'login_redirect'.
    function bp_request( $query_vars = array() ) { 
    593477 */
    594478function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = false ) {
    595479
    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.' );
    606481}
    607482
    608483/**
    function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = fa 
    610485 *
    611486 * Hooked to 'template_include'.
    612487 *
     488 * @deprecated No longer used in core.
     489 *
    613490 * @since 1.6.0
    614491 *
    615492 * @param string $template See 'template_include'.
    function bp_login_redirect( $redirect_to = '', $redirect_to_raw = '', $user = fa 
    617494 */
    618495function bp_template_include( $template = '' ) {
    619496
    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.' );
    628498}
    629499
    630500/**
    631501 * Fire the 'bp_generate_rewrite_rules' action, where BP generates its rewrite rules.
    632502 *
     503 * @deprecated No longer used in core.
     504 *
    633505 * @since 1.7.0
    634506 *
    635507 * @param WP_Rewrite $wp_rewrite See 'generate_rewrite_rules'.
    636508 */
    637509function bp_generate_rewrite_rules( $wp_rewrite ) {
    638510
    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.' );
    647512}
    648513
    649514/**
    function bp_allowed_themes( $themes ) { 
    673538/**
    674539 * The main action used for handling theme-side POST requests.
    675540 *
     541 * @deprecated No longer used in core.
     542 *
    676543 * @since 1.9.0
    677544 */
    678545function bp_post_request() {
    679546
    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.' );
    713548}
    714549
    715550/**
    716551 * The main action used for handling theme-side GET requests.
    717552 *
     553 * @deprecated No longer used in core.
     554 *
    718555 * @since 1.9.0
    719556 */
    720557function bp_get_request() {
    721558
    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.' );
    755560}