Advertisement
Guest User

Untitled

a guest
Apr 24th, 2021
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wp_bootstrap_starter_customize_register( $wp_customize ) {
  2.  
  3.     //Style Preset
  4.     $wp_customize->add_section(
  5.         'typography',
  6.         array(
  7.             'title' => __( 'Preset Styles', 'wp-bootstrap-starter' ),
  8.             //'description' => __( 'This is a section for the typography', 'wp-bootstrap-starter' ),
  9.             'priority' => 20,
  10.         )
  11.     );
  12.  
  13.     //Theme Option
  14.     $wp_customize->add_setting( 'theme_option_setting', array(
  15.         'default'   => 'default',
  16.         'type'       => 'theme_mod',
  17.         'capability' => 'edit_theme_options',
  18.         'sanitize_callback' => 'wp_filter_nohtml_kses',
  19.     ) );
  20.     $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'theme_option_setting', array(
  21.         'label' => __( 'Theme Option', 'wp-bootstrap-starter' ),
  22.         'section'    => 'typography',
  23.         'settings'   => 'theme_option_setting',
  24.         'type'    => 'select',
  25.         'choices' => array(
  26.             'default' => 'Default',
  27.             'cerulean' => 'Cerulean',
  28.             'cosmo' => 'Cosmo',
  29.             'cyborg' => 'Cyborg',
  30.             'darkly' => 'Darkly',
  31.             'flatly' => 'Flatly',
  32.             'journal' => 'Journal',
  33.             'litera' => 'Litera',
  34.             'lumen' => 'Lumen',
  35.             'lux' => 'Lux',
  36.             'materia' => 'Materia',
  37.             'minty' => 'Minty',
  38.             'pulse' => 'Pulse',
  39.             'sandstone' => 'Sandstone',
  40.             'simplex' => 'Simplex',
  41.             'sketchy' => 'Sketchy',
  42.             'slate' => 'Slate',
  43.             'solar' => 'Solar',
  44.             'spacelab' => 'Spacelab',
  45.             'superhero' => 'Superhero',
  46.             'united' => 'United',
  47.             'yeti' => 'Yeti',
  48.         )
  49.     ) ) );
  50.  
  51.     $wp_customize->add_setting( 'preset_style_setting', array(
  52.         'default'   => 'default',
  53.         'type'       => 'theme_mod',
  54.         'capability' => 'edit_theme_options',
  55.         'sanitize_callback' => 'wp_filter_nohtml_kses',
  56.     ) );
  57.     $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'preset_style_setting', array(
  58.         'label' => __( 'Typography', 'wp-bootstrap-starter' ),
  59.         'section'    => 'typography',
  60.         'settings'   => 'preset_style_setting',
  61.         'type'    => 'select',
  62.         'choices' => array(
  63.             'default' => 'Default',
  64.             'arbutusslab-opensans' => 'Arbutus Slab / Opensans',
  65.             'montserrat-merriweather' => 'Montserrat / Merriweather',
  66.             'montserrat-opensans' => 'Montserrat / Opensans',
  67.             'oswald-muli' => 'Oswald / Muli',
  68.             'poppins-lora' => 'Poppins / Lora',
  69.             'poppins-poppins' => 'Poppins / Poppins',
  70.             'roboto-roboto' => 'Roboto / Roboto',
  71.             'robotoslab-roboto' => 'Roboto Slab / Roboto',
  72.         )
  73.     ) ) );
  74.  
Advertisement
RAW Paste Data Copied
Advertisement