transmitstudio
11/7/2016 - 8:49 PM

Shut off customizer layout presets in Beaver Builder theme

Shut off customizer layout presets in Beaver Builder theme

// add or remove as needed. will shut off all presets listed in the array
function remove_all_presets() {
  $exclude_presets = array('default-dark' , 'classic' , 'modern' , 'bold' , 'stripe' , 'deluxe' , 'premier' , 'dusk' , 'midnight');
  foreach ( $exclude_presets as $preset ) {
    FLCustomizer::remove_preset( $preset );
  }
}
add_action( 'after_setup_theme', 'remove_all_presets', 11 );
// remove theme presets completely from customizer
function bb_remove_customizer_presets( $wp_customize ) {
  $wp_customize->remove_section( 'fl-presets' );
}
add_action( 'customize_register', 'bb_remove_customizer_presets', 30 );