如何在Meta Box插件中克隆一组字段?

时间:2013-11-19 13:46:19

标签: wordpress

我使用Meta Box插件。我在Pages中有三个自定义元字段。姓名,职位,照片(上传)。

我需要有能力多次克隆这组设置。我找到了某个地方(那里有另一个地方而不是我的地方),但它没有帮助。

'fields'=> array(
    array(
        'name'  => 'Country Releases',
        'id'    => "{$prefix}release",
        'type'  => 'group',
        'child_fields' => array(
            // These are just fields as would normally be listed in the 'fields' array.
            array(
                'name'    => 'Release Country:',
                'id'      => "{$prefix}release_country",
                'type'    => 'select',
                'options' => array(
                    'value1' => "USA",
                    'value2' => "Canada",
                ),
                'std' => "Select Country",
            ),
            array(
                'name' => "Release Year:",
                'id'   => "{$prefix}release_year",
                'type' => 'date',
                'js_options' => array(
                    'appendText'      => '(yyyy)',
                    'dateFormat'      => 'yy',
                ),
            ),
                ),
        'clone' => true,
    ),
)

0 个答案:

没有答案