bp_nouveau_get_appearance_settings( string $option = '' )

Get the BP Nouveau Appearance settings.

Description

Parameters

$option

(Optional) Leave empty to get all settings, specify a value for a specific one.

Default value: ''

(Required) An array of settings, the value of the requested setting.

Return

(array|false|mixed)

Source

File: bp-templates/bp-nouveau/includes/functions.php

567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
function bp_nouveau_get_appearance_settings( $option = '' ) {
    $default_args = array(
        'user_nav_display'   => 0, // O is default (horizontally). 1 is vertically.
        'user_nav_order'     => array(),
        'members_layout'     => 4,
        'members_dir_tabs'   => 0,
        'members_dir_layout' => 0,
        'bp_emails'          => '',
        'user_default_tab'   => 'profile'
    );
     
    if ( bp_is_active( 'friends' ) ) {
        $default_args['members_friends_layout'] = 4;
    }
 
    if ( bp_is_active( 'activity' ) ) {
        $default_args['activity_dir_layout'] = 0;
        $default_args['activity_dir_tabs']   = 0; // default = no tabs
    }
 
    if ( bp_is_active( 'groups' ) ) {
        $default_args = array_merge( $default_args, array(
            'group_front_page'        => 1,
            'group_front_boxes'       => 1,
            'group_front_description' => 0,
            'group_nav_display'       => 0,       // O is default (horizontally). 1 is vertically.
            'group_nav_order'         => array(),
            'groups_layout'           => 4,
            'members_group_layout'    => 4,
            'groups_dir_layout'       => 0,
            'groups_dir_tabs'         => 0,
            'group_default_tab'       => 'members',
        ) );
    }
 
    if ( is_multisite() && bp_is_active( 'blogs' ) ) {
        $default_args = array_merge( $default_args, array(
            'sites_dir_layout' => 0,
            'sites_dir_tabs'   => 0,
        ) );
    }
 
    $settings = bp_parse_args(
        bp_get_option( 'bp_nouveau_appearance', array() ),
        $default_args,
        'nouveau_appearance_settings'
    );
 
    if ( ! empty( $option ) ) {
        if ( isset( $settings[ $option ] ) ) {
            return $settings[ $option ];
        } else {
            return false;
        }
    }
 
    return $settings;
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.