add_action('save_post', 'gmc_save_recipe', 10, 2);
function gmc_save_recipe($post_id, $post) {
//exit($post_id); //blank page
//$id = get_the_ID();
//exit($id); //blank page
//exit(print_r($post)); //WP_Post Object ( [ID] => 288....
//exit($post->ID //blank page
}
有谁能告诉我为什么我会在所有这些场景中返回空白页面?我希望它能显示帖子ID。