在我的函数中,我正在用自定义字段注册多个元数据库。例如,单个metabox数组如下所示:
在函数中。php
$meta_boxes[] = array(
\'id\' => \'general_info\',
\'title\' => \'General Information\',
\'pages\' => array(\'post\', \'page\', \'link\'), // multiple post types, accept custom post types
\'context\' => \'normal\', // normal, advanced, side (optional)
\'priority\' => \'high\', // high, low (optional)
\'fields\' => array(
array(
\'name\' => \'Asking Price\',
\'id\' => $prefix . \'asking_price\',
\'type\' => \'text\',
\'std\' => \'\'
),
array(
\'name\' => \'Currency\',
\'id\' => $prefix . \'currency\',
\'type\' => \'text\',
\'std\' => \'USD\'
),
array(
\'name\' => \'Salesman\',
\'id\' => $prefix . \'salesman\',
\'type\' => \'text\',
\'std\' => \'Your Name\'
)
)
);
在我的主题中,如何从metabox获取所有字段名(甚至可能的值)
general_info
? 我试图分别从每个元数据库中检索数据。