本文整理汇总了PHP中FLBuilderModel::get_settings_form_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::get_settings_form_fields方法的具体用法?PHP FLBuilderModel::get_settings_form_fields怎么用?PHP FLBuilderModel::get_settings_form_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLBuilderModel
的用法示例。
在下文中一共展示了FLBuilderModel::get_settings_form_fields方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enqueue_styles_for_nested_module_form
/**
* Enqueue the stylesheet(s) for icons in a nested form field.
*
* @since 1.4.6
* @access private
* @param object $module The module to enqueue for.
* @param array $form The nested form.
* @param string $setting The nested form setting key.
* @return void
*/
private static function enqueue_styles_for_nested_module_form($module, $form, $setting)
{
$fields = FLBuilderModel::get_settings_form_fields($form);
foreach ($fields as $name => $field) {
if ($field['type'] == 'icon') {
foreach ($module->settings->{$setting} as $key => $val) {
if (isset($val->{$name})) {
self::enqueue_styles_for_icon($val->{$name});
}
}
}
}
}
示例2: add_fonts_for_module
/**
* Add fonts to the $font array for a module.
*
* @since 1.6.3
* @param object $module The respective module.
* @return void
*/
public static function add_fonts_for_module($module)
{
$fields = FLBuilderModel::get_settings_form_fields($module->form);
$array = array();
foreach ($fields as $name => $field) {
if ($field['type'] == 'font' && isset($module->settings->{$name})) {
$array[] = $module->settings->{$name};
self::add_font($module->settings->{$name});
}
}
}
示例3:
<div class="fl-form-field fl-builder-custom-field"<?php
if (isset($field['preview_text'])) {
echo ' data-preview-text="' . $field['preview_text'] . '"';
}
?>
>
<div class="fl-form-field-preview-text">
<?php
if (isset($field['preview_text']) && is_object($value)) {
$form = FLBuilderModel::get_settings_form($field['form']);
$form_fields = FLBuilderModel::get_settings_form_fields($form['tabs']);
if (isset($form_fields[$field['preview_text']])) {
$preview_field = $form_fields[$field['preview_text']];
if ('icon' == $preview_field['type']) {
echo '<i class="' . $value->{$field}['preview_text'] . '"></i>';
} else {
if ('select' == $preview_field['type']) {
echo $preview_field['options'][$value->{$field}['preview_text']];
} else {
if (!empty($value->{$field['preview_text']})) {
echo FLBuilderUtils::snippetwop(strip_tags(str_replace(''', "'", $value->{$field['preview_text']})), 35);
}
}
}
}
}
?>
</div>
<a class="fl-form-field-edit" href="javascript:void(0);" onclick="return false;" data-type="<?php
echo $field['form'];
?>