今のところ、jQuery ソリューションが必要になると思います。それは私の最初の選択ではありませんが、少なくとも機能します。
PHP:
// Create the theme options link
add_action("admin_menu", "setup_theme_admin_menus");
function setup_theme_admin_menus(){
add_theme_page('', 'Theme Options', 'manage_options', 'sample-slug', '');
}
jQuery:
// Redirect link in Appearance to your top-level menu
$('#current-theme div.theme-options a[href="themes.php?page=sample-slug"]').attr('href', 'admin.php?page=sample-slug');
/*
* Hide the link created by add_theme_page(). Use each() since our <li> has no
* name and this makes sure the script always works even if its position changes.
*/
$('#menu-appearance a[href="themes.php?page=sample-slug"]').each(function(){
$(this).parent().hide();
});