Advertisement
Guest User

wp customizer theme switcher

a guest
Nov 11th, 2013
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2.     /**********************************/
  3.     /*add Beast Scheme Switcher section*/
  4.     /**********************************/
  5.     $wp_customize->add_section( 'beast_scheme_section' , array(
  6.         'title'       => __( 'Preset Theme Styles', 'beast' ),
  7.         'priority'    => 40,
  8.         'description' => 'Gives user the ability to select preset color schemes for theme',
  9.         )
  10.     );
  11.  
  12.     /*add Beast Scheme Switcher setting*/
  13.     $wp_customize->add_setting(
  14.         'beast_scheme_switch',
  15.         array(
  16.             'default'   => 'Default',
  17.             'transport' => 'postMessage'           
  18.         )
  19.     );
  20.  
  21.     /*add Beast Scheme Switcher control*/
  22.     $wp_customize->add_control(
  23.         'beast_scheme_switch', array(
  24.             'section'  => 'beast_scheme_section',
  25.             'label'    => 'Select Your Scheme',
  26.             'type'     => 'select',
  27.             'choices'  => array(
  28.                 'default'       => 'Default',
  29.                 'red'       => 'Red',
  30.                 'orange'        => 'Orange',
  31.                 'yellow'        => 'Yellow',
  32.                 'green'         => 'Green',
  33.                 'blue'      => 'Blue',
  34.                 'purple'        => 'Purple',
  35.                 'white'     => 'White'
  36.             )
  37.         )
  38.     );
  39.  
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement