edit_post_{$post->post_type}

動作鉤子
do_action( "edit_post_{$post->post_type}", $post_id, $post )

edit_post_{$post->post_type}。這個動作用於在編輯一個特定型別的文章時觸發一個特定的動作。該動作名稱是動態的,包括作為變數的文章型別名稱。

這個動作在wp-includes/post.php中有記錄。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( "edit_post_{$post->post_type}", $post_id, $post );
do_action( "edit_post_{$post->post_type}", $post_id, $post );
do_action( "edit_post_{$post->post_type}", $post_id, $post );

常見問題

FAQs
檢視更多 >