所以,在整个搜索之后,我找到了解决方案。添加新设置并添加新控件。在控件内部,添加新
add_action( \'customize_register\', \'custom_logo_uploader\' );
function custom_logo_uploader($wp_customize) {
$wp_customize->add_section( \'upload_custom_logo\', array(
\'title\' => \'Logo\',
\'description\' => \'Display a custom logo?\',
\'priority\' => 25,
) );
$wp_customize->add_setting( \'custom_logo\', array(
\'default\' => \'\',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, \'custom_logo\', array(
\'label\' => \'Custom logo\',
\'section\' => \'upload_custom_logo\',
\'settings\' => \'custom_logo\',
) ) );
$wp_customize->add_setting( \'custom_logo2\', array(
\'default\' => \'\',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, \'custom_logo2\', array(
\'label\' => \'Custom logo\',
\'section\' => \'upload_custom_logo\', // put the name of whatever section you want to add your settings
\'settings\' => \'custom_logo2\',
) ) );
}
对不起,如果我把我糟糕的英语弄糊涂了(