当前位置: 首页>>代码示例>>PHP>>正文


PHP FLBuilderModel::get_global_settings方法代码示例

本文整理汇总了PHP中FLBuilderModel::get_global_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::get_global_settings方法的具体用法?PHP FLBuilderModel::get_global_settings怎么用?PHP FLBuilderModel::get_global_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FLBuilderModel的用法示例。


在下文中一共展示了FLBuilderModel::get_global_settings方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_custom_css

 function print_custom_css()
 {
     $fields = self::get_color_fields();
     $settings = FLBuilderModel::get_global_settings();
     print "<style id='bb-ui-theme-custom'>\n";
     foreach ($fields as $name => $field) {
         $color = '#' . $settings->{$name};
         $properties = $field['properties'];
         $selectors = $field['selectors'];
         foreach ($selectors as $selector) {
             print $selector . "{\n";
             foreach ($properties as $property) {
                 print $property . " : " . $color;
             }
             print "}\n";
         }
     }
     ?>
     body .fl-builder-blocks-section .fl-builder-blocks-section-title:hover,
     body .fl-builder-blocks-section .fl-builder-blocks-section-title:hover i {
         background:transparent;
     }
     <?php 
     print "</style>\n";
 }
开发者ID:brentjett,项目名称:bb-experiments,代码行数:25,代码来源:class-bb-ui-themes.php

示例2: my_theme_show_page_header

function my_theme_show_page_header()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled()) {
        $global_settings = FLBuilderModel::get_global_settings();
        if (!$global_settings->show_default_heading) {
            return false;
        }
    }
    return true;
}
开发者ID:TheRankSmith,项目名称:TRS,代码行数:10,代码来源:functions.php

示例3: array

<?php

$global_settings = FLBuilderModel::get_global_settings();
FLBuilder::register_settings_form('module_advanced', array('title' => __('Advanced', 'fl-builder'), 'sections' => array('margins' => array('title' => __('Margins', 'fl-builder'), 'fields' => array('margin_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_display' => array('type' => 'select', 'label' => __('Display', 'fl-builder'), 'options' => array('' => __('Always', 'fl-builder'), 'desktop' => __('Large Devices Only', 'fl-builder'), 'desktop-medium' => __('Large &amp; Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'), 'mobile' => __('Small Devices Only', 'fl-builder')), 'help' => __('Choose whether to show or hide this module at different device sizes.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'animation' => array('title' => __('Animation', 'fl-builder'), 'fields' => array('animation' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'options' => array('' => _x('None', 'Animation style.', 'fl-builder'), 'fade-in' => _x('Fade In', 'Animation style.', 'fl-builder'), 'slide-left' => _x('Slide Left', 'Animation style.', 'fl-builder'), 'slide-right' => _x('Slide Right', 'Animation style.', 'fl-builder'), 'slide-up' => _x('Slide Up', 'Animation style.', 'fl-builder'), 'slide-down' => _x('Slide Down', 'Animation style.', 'fl-builder')), 'preview' => array('type' => 'none')), 'animation_delay' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '0.0', 'maxlength' => '4', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder'), 'help' => __('The amount of time in seconds before this animation starts.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'css_selectors' => array('title' => __('CSS Selectors', 'fl-builder'), 'fields' => array('id' => array('type' => 'text', 'label' => __('ID', 'fl-builder'), 'help' => __("A unique ID that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder'), 'preview' => array('type' => 'none')), 'class' => array('type' => 'text', 'label' => __('Class', 'fl-builder'), 'help' => __("A class that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder'), 'preview' => array('type' => 'none')))))));
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:4,代码来源:module-settings.php

示例4: render_js

 /**
  * Renders and caches the JavaScript for a builder layout.
  *
  * @since 1.0
  * @return void
  */
 public static function render_js()
 {
     // Delete the old file.
     FLBuilderModel::delete_asset_cache('js');
     // Get info on the new file.
     $nodes = FLBuilderModel::get_categorized_nodes();
     $global_settings = FLBuilderModel::get_global_settings();
     $rows = FLBuilderModel::get_nodes('row');
     $asset_info = FLBuilderModel::get_asset_info();
     $compiled = array();
     $js = '';
     // Layout config object.
     ob_start();
     include FL_BUILDER_DIR . 'includes/layout-js-config.php';
     $js .= ob_get_clean();
     // Main JS
     $js .= file_get_contents(FL_BUILDER_DIR . 'js/fl-builder-layout.js');
     // Loop through the rows.
     foreach ($nodes['rows'] as $row) {
         // Setup row vars
         $settings = $row->settings;
         $id = $row->node;
         // Include the row instance JS
         ob_start();
         include FL_BUILDER_DIR . 'includes/row-js.php';
         $js .= ob_get_clean();
     }
     // Loop through the modules.
     foreach ($nodes['modules'] as $module) {
         // Global module JS
         $file = $module->dir . 'js/frontend.js';
         if (file_exists($file) && !in_array($module->settings->type, $compiled)) {
             $js .= "\n" . file_get_contents($file);
             $compiled[] = $module->settings->type;
         }
         // Instance module JS
         $file = $module->dir . 'includes/frontend.js.php';
         $settings = $module->settings;
         $id = $module->node;
         if (file_exists($file)) {
             ob_start();
             include $file;
             $js .= ob_get_clean();
         }
     }
     // Add the path legacy vars (FLBuilderLayoutConfig.paths should be used instead).
     $js .= "var wpAjaxUrl = '" . admin_url('admin-ajax.php') . "';";
     $js .= "var flBuilderUrl = '" . FL_BUILDER_URL . "';";
     // Call the FLBuilder._renderLayoutComplete method if we're currently editing.
     if (stristr($asset_info['js'], '-draft.js') || stristr($asset_info['js'], '-preview.js')) {
         $js .= "; if(typeof FLBuilder !== 'undefined' && typeof FLBuilder._renderLayoutComplete !== 'undefined') FLBuilder._renderLayoutComplete();";
     }
     // Include FLJSMin
     if (!class_exists('FLJSMin')) {
         include FL_BUILDER_DIR . 'classes/class-fl-jsmin.php';
     }
     // Save the js
     if (!empty($js)) {
         file_put_contents($asset_info['js'], FLJSMin::minify($js));
     }
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:67,代码来源:class-fl-builder.php

示例5: render_module_js

 /**
  * Renders the JavaScript for a single module.
  *
  * @since 1.7
  * @param string|object $module_id A module ID or object.
  * @param array $compiled An array of module types that have already has frontend.js compiled.
  * @return string
  */
 public static function render_module_js($module_id, &$compiled = array())
 {
     $module = is_object($module_id) ? $module_id : FLBuilderModel::get_module($module_id);
     $global_settings = FLBuilderModel::get_global_settings();
     $js = '';
     // Global module JS
     $file = $module->dir . 'js/frontend.js';
     if (file_exists($file) && !in_array($module->settings->type, $compiled)) {
         $js .= "\n" . file_get_contents($file);
         $compiled[] = $module->settings->type;
     }
     // Instance module JS
     $file = $module->dir . 'includes/frontend.js.php';
     $settings = $module->settings;
     $id = $module->node;
     if (file_exists($file)) {
         ob_start();
         include $file;
         $js .= ob_get_clean();
     }
     // Return the JS.
     return $js;
 }
开发者ID:Nirajjcu,项目名称:minime3d,代码行数:31,代码来源:class-fl-builder.php

示例6: responsive_breakpoint

 public function responsive_breakpoint()
 {
     $settings = FLBuilderModel::get_global_settings();
     return $settings->responsive_breakpoint;
 }
开发者ID:bacoords,项目名称:cb-custom-modules,代码行数:5,代码来源:cb-scout.php

示例7: get_accent_color

 static function get_accent_color($handle)
 {
     $global_settings = FLBuilderModel::get_global_settings();
     $accent_color_handle = $handle . '-accent-color';
     return $global_settings->{$accent_color_handle};
 }
开发者ID:brentjett,项目名称:brj-workspaces,代码行数:6,代码来源:class-brj-workspace-module.php


注:本文中的FLBuilderModel::get_global_settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。