Javascript Wordpress获取主题mod,functions.php
在我的functions.php中有以下内容:Javascript Wordpress获取主题mod,functions.php,javascript,php,arrays,wordpress,wordpress-theming,Javascript,Php,Arrays,Wordpress,Wordpress Theming,在我的functions.php中有以下内容: function themename_customize_register($wp_customize){ // ============================= // = Color Picker = // ============================= $wp_customize->add_setting('themename_theme_options[lin
function themename_customize_register($wp_customize){
// =============================
// = Color Picker =
// =============================
$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', 'themename_customize_register');
//ADD THE GET_THEME_MOD SCRIPT HERE? IT DOESNT SEEM TO WORK. ON THE OTHER HAND, ADDING IT INSIDE, DOES NOT WORK EITHER.
我所要做的就是将默认值或所选值添加到标题中,这样CSS就会更新。
我如何获得该值