wpforms:如何在自定义智能标记中查询表单描述?

时间:2018-05-26 06:40:44

标签: php wordpress

我已按照本教程:https://developers.wpforms.com/docs/create-a-custom-smart-tag/

如何从我的自定义智能标记中提取表单描述" form_description"?为什么首先不包含在wpforms插件中?

1 个答案:

答案 0 :(得分:0)

有一个数组$form_data['settings'],它包含以下信息:)

$desc = (!empty($form_data['settings']['form_desc']) ? $form_data['settings']['form_desc'] : ''; $content = str_replace( '{form_description}', sanitize_text_field( $desc ), $content );