嗨,我正在为 wordpress 制作一个 metabox 插件并遇到问题:
从元框(元框有一个文本区域和一个收音机)获取信息时,我使用:
foreach ($rian_meta_box['fields'] as $field) {
$meta = get_post_meta($post->ID, $field['id'], true);
switch ($field['type']) {
case 'radio':
*some code, get the radio value and put in a variable $aaa*
break;
case 'textarea':
*some code, and after I should use the $aaa variable with his value of the radio case*
break;
我试过了,但在 textarea 的情况下,变量是空的,我应该怎么做才能传递它?谢谢!