Skip to:
Content

BuddyPress.org

Changeset 11589


Ignore:
Timestamp:
06/15/2017 02:26:28 PM (8 years ago)
Author:
djpaul
Message:

Core: hook up bp_setup_option_filters function.

This has remain half-implemented for years. Let's finish it to bring it into consistency with the code shared with bbPress.

Location:
trunk/src/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-actions.php

    r11032 r11589  
    5656add_action( 'bp_loaded', 'bp_setup_components',         2  );
    5757add_action( 'bp_loaded', 'bp_include',                  4  );
     58add_action( 'bp_loaded', 'bp_setup_option_filters',     5  );
    5859add_action( 'bp_loaded', 'bp_setup_cache_groups',       5  );
    5960add_action( 'bp_loaded', 'bp_setup_widgets',            6  );
  • trunk/src/bp-core/bp-core-options.php

    r11549 r11589  
    189189 * Add filters to each BP option, allowing them to be overloaded from inside the $bp->options array.
    190190 *
    191  * Currently unused.
    192  *
    193191 * @since 1.6.0
    194192 */
     
    216214 * Filter default options and allow them to be overloaded from inside the $bp->options array.
    217215 *
    218  * Currently unused.
    219  *
    220216 * @since 1.6.0
    221217 *
     
    226222    $bp = buddypress();
    227223
    228     // Get the name of the current filter so we can manipulate it.
    229     $filter = current_filter();
    230 
    231224    // Remove the filter prefix.
    232     $option = str_replace( 'pre_option_', '', $filter );
     225    $option = str_replace( 'pre_option_', '', current_filter() );
    233226
    234227    // Check the options global for preset value.
Note: See TracChangeset for help on using the changeset viewer.