本文整理汇总了PHP中FLBuilderModel::get_settings_form方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::get_settings_form方法的具体用法?PHP FLBuilderModel::get_settings_form怎么用?PHP FLBuilderModel::get_settings_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLBuilderModel
的用法示例。
在下文中一共展示了FLBuilderModel::get_settings_form方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<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'];
?>
示例2: render_node_template_settings
/**
* Renders the settings form for saving a node template.
*
* @since 1.6.3
* @return void
*/
public static function render_node_template_settings()
{
$post_data = FLBuilderModel::get_post_data();
$defaults = FLBuilderModel::get_settings_form_defaults('node_template');
$form = FLBuilderModel::get_settings_form('node_template');
$node = FLBuilderModel::get_node($post_data['node_id']);
FLBuilder::render_settings(array('class' => 'fl-builder-node-template-settings', 'attrs' => 'data-node="' . $node->node . '"', 'title' => str_replace('%s', ucwords($node->type), $form['title']), 'tabs' => $form['tabs']), $defaults);
}
示例3: render_user_template_settings
/**
* Renders the settings form for saving a user defined template.
*
* @since 1.0
* @return void
*/
public static function render_user_template_settings()
{
$defaults = FLBuilderModel::get_settings_form_defaults('user_template');
$form = FLBuilderModel::get_settings_form('user_template');
FLBuilder::render_settings(array('class' => 'fl-builder-user-template-settings', 'title' => $form['title'], 'tabs' => $form['tabs']), $defaults);
}