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


PHP FLBuilderModel::is_node_global方法代码示例

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


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

示例1: render_module_attributes

 /**
  * Renders the HTML attributes for a single module.
  *
  * @since 1.0
  * @param object $module A module node object.
  * @return void
  */
 public static function render_module_attributes($module)
 {
     $custom_class = apply_filters('fl_builder_module_custom_class', $module->settings->class, $module);
     $active = FLBuilderModel::is_builder_active();
     $global = FLBuilderModel::is_node_global($module);
     // ID
     if (!empty($module->settings->id)) {
         echo ' id="' . esc_attr($module->settings->id) . '"';
     }
     // Class
     echo ' class="fl-module';
     echo ' fl-module-' . $module->settings->type;
     if (!empty($module->settings->responsive_display)) {
         echo ' fl-visible-' . $module->settings->responsive_display;
     }
     if (!empty($module->settings->animation)) {
         echo ' fl-animation fl-' . $module->settings->animation;
     }
     if (!empty($custom_class)) {
         echo ' ' . trim(esc_attr($custom_class));
     }
     if ($global && $active) {
         echo ' fl-node-global';
     }
     echo ' fl-node-' . $module->node;
     echo '"';
     // Data
     echo ' data-node="' . $module->node . '" ';
     echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
     if ($active) {
         echo ' data-parent="' . $module->parent . '" ';
         echo ' data-type="' . $module->settings->type . '" ';
         echo ' data-name="' . $module->name . '" ';
     }
     if ($global && $active) {
         echo ' data-template="' . $module->template_id . '"';
         echo ' data-template-node="' . $module->template_node_id . '"';
     }
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:46,代码来源:class-fl-builder.php

示例2: node_modules_support_partial_refresh

 /**
  * Checks to see if all modules in a node support partial refresh.
  *
  * @since 1.7
  * @access private
  * @param object $node The node to check.
  * @return bool
  */
 private static function node_modules_support_partial_refresh($node)
 {
     $nodes = FLBuilderModel::get_categorized_nodes();
     if ('row' == $node->type) {
         $template_post_id = FLBuilderModel::is_node_global($node);
         foreach ($nodes['groups'] as $group) {
             if ($node->node == $group->parent || $template_post_id && $node->template_node_id == $group->parent) {
                 foreach ($nodes['columns'] as $column) {
                     if ($group->node == $column->parent) {
                         foreach ($nodes['modules'] as $module) {
                             if ($column->node == $module->parent) {
                                 if (!$module->partial_refresh) {
                                     return false;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     } else {
         if ('column-group' == $node->type) {
             foreach ($nodes['columns'] as $column) {
                 if ($node->node == $column->parent) {
                     foreach ($nodes['modules'] as $module) {
                         if ($column->node == $module->parent) {
                             if (!$module->partial_refresh) {
                                 return false;
                             }
                         }
                     }
                 }
             }
         } else {
             if ('column' == $node->type) {
                 foreach ($nodes['modules'] as $module) {
                     if ($node->node == $module->parent) {
                         if (!$module->partial_refresh) {
                             return false;
                         }
                     }
                 }
             }
         }
     }
     return true;
 }
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:55,代码来源:class-fl-builder-ajax-layout.php

示例3: render_global_nodes_custom_code

 /**
  * Renders the custom CSS or JS for all global nodes in a layout. 
  *
  * @since 1.7
  */
 public static function render_global_nodes_custom_code($type = 'css')
 {
     $code = '';
     $rendered = array();
     if (!FLBuilderModel::is_post_node_template()) {
         $nodes = FLBuilderModel::get_layout_data();
         $node_status = FLBuilderModel::get_node_status();
         foreach ($nodes as $node_id => $node) {
             $template_post_id = FLBuilderModel::is_node_global($node);
             if ($template_post_id && !in_array($template_post_id, $rendered)) {
                 $rendered[] = $template_post_id;
                 $code .= FLBuilderModel::get_layout_settings($node_status, $template_post_id)->{$type};
             }
         }
     }
     return $code;
 }
开发者ID:Nirajjcu,项目名称:minime3d,代码行数:22,代码来源:class-fl-builder.php


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