Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. $wp_customize->add_setting( 'myplugin_options[color]', array(
  2. 'type' => 'option',
  3. 'capability' => 'manage_options',
  4. 'default' => '#ff2525',
  5. 'sanitize_callback' => 'sanitize_hex_color',
  6. ) );
  7.  
  8. $wp_customize->add_setting('options[toggle_hedaer]',array('default'=>true,'type'=>'option','capability' => 'manage_options','transport' => 'postMessage'));
  9. $wp_customize->add_control('options[toggle_header]',array('section' => 'live_options','label'=>'Display header?','type'=>'checkbox'));
  10. $wp_customize->add_setting('options[background]',array('default' => 'normal','type'=>'option','capability'=>'manage_options','transport' => 'postMessage'));
  11. $wp_customize->add_control('options[background]',array('section'=>'live_options','label'=> 'Change Background','type'=>'radio','choices'=>array('normal'=>'Normal','inverse'=>'Inverse') ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement