0

中继器字段插件是在 Redux 框架中购买的。但我将其创建为自定义归档。

我用添加更多和删除按钮创建了 3 个字段(标题、电话、文本区域)。在此,我想添加上传按钮以及这三个字段。但我未能添加上传按钮。我尝试了很多,但它不起作用。

你能告诉我在自定义字段扩展中添加上传图片按钮的方法是什么。

4

1 回答 1

3
$fields = array(
    'id'=>'multi-text',
    'type' => 'multi_text',
    'title' => __('Multi Text Option - Color Validated', 'textdomain'),
    'validate' => 'color',
    'subtitle' => __('If you enter an invalid color it will be removed. Try using the text "blue" as a color.  ;)', 'texdoma'),
    'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo')
    ),
);

示例用法

此示例基于上面提供的示例用法。请务必将 $redux_demo 更改为您在 opt_name 参数中指定的值。

global $redux_demo;

echo 'First Text Entry: ' . $redux_demo['multi-text'][0];

// 额外条目的数组数量将增加一。

于 2016-09-19T20:44:18.880 回答