我不确定您到底想实现什么,但如果您想在customize_register
操作已启动。所以请这样做:
add_action( \'customize_register\', function( $wp_customize ) {
$control = $wp_customize->get_control( \'header_text\' );
if ( $control ) {
error_log( \'header_text control exists\' );
} else {
error_log( \'header_text control does not exist\' );
}
}, 100 );