没有专门针对您的需要采取的行动,但您可以滥用\'check_admin_referer\'
钩请参见switch ( $action )
阻止进入wp-admin/nav-menus.php
有关详细信息和其他选项。
开始代码示例:
add_action( \'check_admin_referer\', \'check_nav_menu_updates\', 11, 1 );
function check_nav_menu_updates( $action )
{
if ( ( \'update-nav_menu\' != $action ) or ! isset( $_POST[\'menu-locations\'] ) )
{
return;
}
$nav_locations = $_POST[\'menu-locations\'];
$nav_title = $_POST[\'menu-name\'];
// do something awesome with it.
}