'Featured Video Embed Code', 'desc' => 'Paste your video code here to show a video instead of a featured image.', 'id' => $prefix . 'video_embed', 'type' => 'textarea' ) // array( // 'label'=> 'Textarea', // 'desc' => 'A description for the field.', // 'id' => $prefix.'textarea', // 'type' => 'textarea' // ), // array( // 'label'=> 'Checkbox Input', // 'desc' => 'A description for the field.', // 'id' => $prefix.'checkbox', // 'type' => 'checkbox' // ), // array( // 'label'=> 'Select Box', // 'desc' => 'A description for the field.', // 'id' => $prefix.'select', // 'type' => 'select', // 'options' => array ( // 'one' => array ( // 'label' => 'Option One', // 'value' => 'one' // ), // 'two' => array ( // 'label' => 'Option Two', // 'value' => 'two' // ), // 'three' => array ( // 'label' => 'Option Three', // 'value' => 'three' // ) // ) // ) ); // Field Array (Posts Meta) $pageflow_post_meta_fields = array( array( 'label' => 'Featured Video Embed Code', 'desc' => 'Paste your video code here to show a video instead of a featured image.', 'id' => $prefix . 'video_embed', 'type' => 'textarea' ) ); // The Callback for page meta box function pageflow_show_custom_meta_box() { global $pageflow_meta_fields; pageflow_show_page_meta_box($pageflow_meta_fields); } // The Callback for post meta box function pageflow_show_custom_post_meta_box() { global $pageflow_post_meta_fields; pageflow_show_page_meta_box($pageflow_post_meta_fields); } // The Callback function pageflow_show_page_meta_box($meta_fields) { global $post; // Use nonce for verification echo ''; // Begin the field table and loop echo '
';
switch ($field['type']) {
// text
case 'text':
echo '
' . $field['desc'] . ''; break; // textarea case 'textarea': echo ' ' . $field['desc'] . ''; break; // checkbox case 'checkbox': echo ' '; break; // select case 'select': echo ' ' . $field['desc'] . ''; break; } //end switch echo ' |