Last active
February 7, 2016 15:35
-
-
Save carlodaniele/e14d4231f3c344953681 to your computer and use it in GitHub Desktop.
Add meta box callback function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add meta box | |
* | |
* @param post $post The post object | |
* @link https://codex.wordpress.org/Plugin_API/Action_Reference/add_meta_boxes | |
*/ | |
function food_add_meta_boxes( $post ){ | |
add_meta_box( 'food_meta_box', __( 'Nutrition facts', 'food_example_plugin' ), 'food_build_meta_box', 'food', 'side', 'low' ); | |
} | |
add_action( 'add_meta_boxes_food', 'food_add_meta_boxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment