Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/03/2018 04:29:34 PM (8 years ago)
Author:
boonebgorges
Message:

Nouveau: Don't add customizer controls/settings for inactive components.

Fixes #7802.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/customizer.php

    r12047 r12048  
    186186            'type'              => 'option',
    187187        ),
    188         'bp_nouveau_appearance[groups_dir_tabs]' => array(
    189             'index'             => 'groups_dir_tabs',
    190             'capability'        => 'bp_moderate',
    191             'sanitize_callback' => 'absint',
    192             'transport'         => 'refresh',
    193             'type'              => 'option',
    194         ),
    195188        'bp_nouveau_appearance[sites_dir_layout]' => array(
    196189            'index'             => 'sites_dir_layout',
     
    222215    }
    223216
    224     /**
    225      * Filters the BuddyPress Nouveau customizer controls and their arguments.
    226      *
    227      * @since 3.0.0
    228      *
    229      * @param array $value Array of Customizer controls.
    230      */
    231     $controls = apply_filters( 'bp_nouveau_customizer_controls', array(
     217    $controls = array(
    232218        'bp_site_avatars' => array(
    233219            'label'      => __( 'Use the round style for member and group avatars.', 'buddypress' ),
     
    280266            'choices'    => bp_nouveau_customizer_grid_choices(),
    281267        ),
    282         'members_group_layout' => array(
    283             'label'      => __( 'Group > Members', 'buddypress' ),
    284             'section'    => 'bp_nouveau_loops_layout',
    285             'settings'   => 'bp_nouveau_appearance[members_group_layout]',
    286             'type'       => 'select',
    287             'choices'    => bp_nouveau_customizer_grid_choices(),
    288         ),
    289268        'members_friends_layout' => array(
    290269            'label'      => __( 'Member > Friends', 'buddypress' ),
     
    294273            'choices'    => bp_nouveau_customizer_grid_choices(),
    295274        ),
    296         'act_dir_layout' => array(
    297             'label'      => __( 'Use column navigation for the Activity directory.', 'buddypress' ),
    298             'section'    => 'bp_nouveau_dir_layout',
    299             'settings'   => 'bp_nouveau_appearance[activity_dir_layout]',
    300             'type'       => 'checkbox',
    301         ),
    302         'act_dir_tabs' => array(
    303             'label'      => __( 'Use tab styling for Activity directory navigation.', 'buddypress' ),
    304             'section'    => 'bp_nouveau_dir_layout',
    305             'settings'   => 'bp_nouveau_appearance[activity_dir_tabs]',
    306             'type'       => 'checkbox',
    307         ),
    308275        'members_dir_layout' => array(
    309276            'label'      => __( 'Use column navigation for the Members directory.', 'buddypress' ),
     
    318285            'type'       => 'checkbox',
    319286        ),
    320         'group_dir_layout' => array(
    321             'label'      => __( 'Use column navigation for the Groups directory.', 'buddypress' ),
    322             'section'    => 'bp_nouveau_dir_layout',
    323             'settings'   => 'bp_nouveau_appearance[groups_dir_layout]',
    324             'type'       => 'checkbox',
    325         ),
    326         'group_dir_tabs' => array(
    327             'label'      => __( 'Use tab styling for Groups directory navigation.', 'buddypress' ),
    328             'section'    => 'bp_nouveau_dir_layout',
    329             'settings'   => 'bp_nouveau_appearance[groups_dir_tabs]',
    330             'type'       => 'checkbox',
    331         ),
    332         'sites_dir_layout' => array(
    333             'label'      => __( 'Use column navigation for the Sites directory.', 'buddypress' ),
    334             'section'    => 'bp_nouveau_dir_layout',
    335             'settings'   => 'bp_nouveau_appearance[sites_dir_layout]',
    336             'type'       => 'checkbox',
    337         ),
    338         'sites_dir_tabs' => array(
    339             'label'      => __( 'Use tab styling for Sites directory navigation.', 'buddypress' ),
    340             'section'    => 'bp_nouveau_dir_layout',
    341             'settings'   => 'bp_nouveau_appearance[sites_dir_tabs]',
    342             'type'       => 'checkbox',
    343         ),
    344     ) );
     287    );
     288
     289    /**
     290     * Filters the BuddyPress Nouveau customizer controls and their arguments.
     291     *
     292     * @since 3.0.0
     293     *
     294     * @param array $value Array of Customizer controls.
     295     */
     296    $controls = apply_filters( 'bp_nouveau_customizer_controls', $controls );
    345297
    346298    // Add the controls to the customizer's section
Note: See TracChangeset for help on using the changeset viewer.