我目前正在完成一个'我一直在写的wordpress插件..
我的问题是:我正在为管理面板选项添加一些add_meta_box stuff(),无论如何我可以将add_meta_box()的输出包装到div中吗?
示例:
<div id="meta_wrapper_here">
<?php example_meta_boxes() ?> content here..
</div>
<?php
function create_transcript() {
register_post_type( 'example',
array(
'labels' => array(
'name' => 'Plugin-Example',
'singular_name' => 'Plugin-Example',
'add_new' => 'Add New',
'add_new_item' => 'Add New Plugin-Example Set',
'edit' => 'Edit',
'edit_item' => 'Edit Plugin-Example Set',
'new_item' => 'New Plugin-Example Set',
'view' => '',
'view_item' => '',
'search_items' => 'Search Plugin-Example Sets',
'not_found' => 'No Plugin-Example Sets found',
'not_found_in_trash' => 'No Plugin-Example Sets found in Trash',
'parent' => 'Parent Example'
),
'public' => true,
'menu_position' => null,
'supports' => array( 'title' ),
'taxonomies' => array( '' ),
'capability_type' => 'post',
'register_meta_box_cb' => 'example_meta_boxes', // Callback function for custom metaboxes
'has_archive' => true
)
);
}
add_action( 'init', 'create_transcript' );
function example_meta_boxes() {
add_meta_box( 'example_form', 'Set Details', 'example_form', 'example', 'normal', 'high' );
}
?>