bp_xprofile_is_richtext_enabled_for_field (int |零field_id美元=零)
这个配置文件字段启用了富文本吗?
描述
默认情况下,文本区域域的富文本是启用的,其他所有字段类型的富文本是禁用的。
参数
- field_id美元
-
(int|零)(可选)默认的当前字段ID。
默认值:空
返回
(保龄球)
源
文件:bp-xprofile / bp-xprofile-functions.php
函数bp_xprofile_is_richtext_enabled_for_field($field_id = null) {if (!$field_id) {$field_id = bp_get_the_profile_field_id();} $field = xprofile_get_field($field_id);$ = false启用;if ($field instanceof BP_XProfile_Field) {$enabled = (bool) $field->type_obj->supports_richtext;} /** *过滤给定字段是否启用richtext。* * @since BuddyPress 2.4.0 * * @param bool $enabled如果该字段启用了richtext,则为True,否则为false。* @param int $field_id字段ID。*/返回apply_filters('bp_xprofile_is_richtext_enabled_for_field', $enabled, $field_id);}
更新日志
版本 | 描述 |
---|---|
BuddyPress测试盒框 | 介绍了。 |