我已按照本教程:https://developers.wpforms.com/docs/create-a-custom-smart-tag/
如何从我的自定义智能标记中提取表单描述" form_description"?为什么首先不包含在wpforms插件中?
答案 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 );