我正在寻找一种删除该部分的方法font_selection
并移动控件body_font_family
直接到面板font_panel
使用子主题functions.php
. 下面是父主题的示例代码customizer.php
:
//PANEL
$wp_customize->add_panel( \'font_panel\', array(
\'priority\' => 17,
\'capability\' => \'edit_theme_options\',
\'theme_supports\' => \'\',
\'title\' => __(\'Fonts\', \'theme\'),
) );
//SECTION
$wp_customize->add_section(
\'font_selection\',
array(
\'title\' => __(\'Font selection\', \'theme\'),
\'priority\' => 10,
\'panel\' => \'font_panel\',
)
)
);
//SETTING
$wp_customize->add_setting(
\'body_font_family\',
array(
\'sanitize_callback\' => \'theme_sanitize_text\',
\'default\' => $defaults[\'body_font_family\'],
)
);
//CONTROL
$wp_customize->add_control(
\'body_font_family\',
array(
\'label\' => __( \'Body font\', \'theme\' ),
\'section\' => \'font_selection\',
\'type\' => \'text\',
\'priority\' => 12
)
);