在我的主题-setings.php中,我希望将文本格式设置为'filtered_html'并在page.tpl.php中显示。
我使用此代码显示文本区域:
$form['options']['description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#default_value' => theme_get_setting('description'),
);并使用<?php print strip_tags(theme_get_setting('description')); ?>在page.tpl.php中显示
如何将文本区域设置为使用'filtered_html'格式
发布于 2016-09-29 21:23:16
试试这个:
$form['options']['description'] = array(
'#type' => 'text_format',
'#title' => t('Description'),
'#default_value' => theme_get_setting('description'),
'#format' => 'filtered_html',
);https://api.drupal.org/api/drupal/developer!topics!forms_api接口_参考资料.text/7.x/#文本_格式化
https://drupal.stackexchange.com/questions/216392
复制相似问题