Created
September 30, 2023 14:07
-
-
Save terrylinooo/390c83b086a1baee67c263ae39a6cd57 to your computer and use it in GitHub Desktop.
ironman_customize_register
This file contains 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
/** | |
* Customizer settings. | |
* | |
* @param WP_Customize_Manager $wp_customize Theme Customizer object. | |
* | |
* @return void | |
*/ | |
function ironman_customize_register( $wp_customize ) { | |
$wp_customize->add_section( | |
'ironman_background_color_section', | |
array( | |
'title' => __( 'Website Background Color', 'ironman' ), | |
'description' => 'Adjust the background color of your site.', | |
'priority' => 30, | |
) | |
); | |
$wp_customize->add_setting( | |
'ironman_background_color_setting', | |
array( | |
'default' => '#ffffff', | |
'transport' => 'refresh', | |
) | |
); | |
$wp_customize->add_control( | |
new WP_Customize_Color_Control( | |
$wp_customize, | |
'ironman_background_color_control', | |
array( | |
'label' => __( 'Background Color', 'ironman' ), | |
'section' => 'ironman_background_color_section', | |
'settings' => 'ironman_background_color_setting', | |
) | |
) | |
); | |
} | |
add_action( 'customize_register', 'ironman_customize_register' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment