Created
October 9, 2017 15:09
-
-
Save keks55/612d5b263f6692bf79d939678d20ba24 to your computer and use it in GitHub Desktop.
Customize wordpress example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function q_customize_register( $wp_customize ){ | |
| $wp_customize->add_section('themename_color_scheme', array( | |
| 'title' => __('q Shortcodes', 'themename'), | |
| 'description' => '', | |
| 'priority' => 100, | |
| )); | |
| $wp_customize->add_setting('themename_theme_options[link_color]', array( | |
| 'default' => '#000', | |
| 'sanitize_callback' => 'sanitize_hex_color', | |
| 'capability' => 'edit_theme_options', | |
| 'type' => 'option', | |
| )); | |
| $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array( | |
| 'label' => __('Link Color', 'themename'), | |
| 'section' => 'themename_color_scheme', | |
| 'settings' => 'themename_theme_options[link_color]', | |
| ))); | |
| } | |
| add_action( 'customize_register', 'q_customize_register' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment