您可以尝试通过customize_controls_print_footer_scripts
挂钩:
/**
* Change the url of the Close link in the /wp-admin/customize.php page
* See http://wordpress.stackexchange.com/q/116257
*/
function change_close_url_wpse_116257() {
$url = get_admin_url(); // Edit this to your needs
printf( "<script>
jQuery(document).ready( function(){
jQuery(\'#customize-header-actions a.back.button\').attr(\'href\', \'%s\');
});
</script>"
, esc_js( $url ) );
}
add_action( \'customize_controls_print_footer_scripts\', \'change_close_url_wpse_116257\' );