Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to filter buddypress customizer options


  • rafaelfigueiredo
    Participant

    @rafaelfigueiredo

    Hi,

    I want to override the customize default settings through my plugin. I read the buddypress code and appears that don’t have a filter function to this.

    There’s another way to do this?

Viewing 1 replies (of 1 total)

  • rafaelfigueiredo
    Participant

    @rafaelfigueiredo

    Inside buddypress/bp-templates/bp-nouveau/includes/template-tags.php I founded this function bp_nouveau_get_single_item_nav_classes().

    Inside this function I can see that has an option that I want to change ‘user_nav_display’. Then the end line of this function is a filter, but I can’t able to do some debug. I’m using wp_die, var_dump and nothing happens when I tried to use a callback function attached to this filter.

    /**
    * Filters the final results for BuddyPress Nouveau container classes.
    *
    * This filter will return a single string of concatenated classes to be used.
    *
    * @since 3.0.0
    *
    * @param string $value Concatenated classes.
    * @param array $classes Array of classes that were concatenated.
    */
    return apply_filters( ‘bp_nouveau_get_container_classes’, join( ‘ ‘, $class ), $classes );

    My code doing some debug:

    add_action(‘bp_nouveau_get_container_classes’, [$this, ‘buddypress_instance’]);

    public function buddypress_instance($value, $classes){
    wp_die(var_dump($value));
    }

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar