providing access to post_id or post inside functions.php
When you add an action via add_action(), the variables that are available in the callback function are determined by the specific hook you’re using. The load-post.php hook does not pass any values through to the callback function. However, when adding meta boxes the correct hook to use is add_meta_boxes, and that hook provides 2 values … Read more