$download_page = array(116);
$current_page_id = isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : 0);
if (in_array($current_page_id, $download_page)) {
$framework->add_field([
'id' => 'download_file',
'type' => 'group',
'title' => 'Download File',
'context' => 'post_meta',
'post_type' => 'page',
'add_text' => 'Add File',
'group_title' => 'Download',
'fields' => [
[
'id' => 'file',
'type' => 'file',
'title' => 'File',
],
]
]);
}
WP开发教程 WordPress导师在线教程