Hide editor with specific post meta value
You are right; admin_init is too early to use the global $post variable. Fortunately, the post id is passed to the URL when editing a post. The following code will remove post type support for a post when the _edit meta key’s value is set to the string false. There are checks in place to … Read more