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


PHP FLBuilder::render_layout方法代码示例

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


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

示例1: save_settings

 /**
  * Save the settings for a node.
  *
  * @since 1.0
  * @param string $node_id The node ID.
  * @param object $settings The settings to save.
  * @return void
  */
 public static function save_settings($node_id = null, $settings = null)
 {
     $post_data = self::get_post_data();
     $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
     $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
     $node = self::get_node($node_id);
     $new_settings = (object) array_merge((array) $node->settings, (array) $settings);
     $template_post_id = self::is_node_global($node);
     // Process the settings.
     $new_settings = self::process_node_settings($node, $new_settings);
     // Save the settings to the node.
     $data = self::get_layout_data();
     $data[$node_id]->settings = $new_settings;
     // Update the layout data.
     self::update_layout_data($data);
     // Save settings for a global node template?
     if ($template_post_id && !self::is_post_node_template()) {
         // Get the template data.
         $template_data = self::get_layout_data('published', $template_post_id);
         // Update the template node settings.
         $template_data[$node->template_node_id]->settings = $new_settings;
         // Save the template data.
         self::update_layout_data($template_data, 'published', $template_post_id);
         self::update_layout_data($template_data, 'draft', $template_post_id);
         // Delete the template asset cache.
         self::delete_all_asset_cache($template_post_id);
         self::delete_node_template_asset_cache($template_post_id);
     }
     // Return the new layout.
     if (defined('DOING_AJAX')) {
         FLBuilder::render_layout();
     }
 }
开发者ID:ImtiH,项目名称:BAPWD,代码行数:41,代码来源:class-fl-builder-model.php

示例2: save_settings

 /**
  * Save the settings for a node.
  *
  * @since 1.0
  * @param string $node_id The node ID.
  * @param object $settings The settings to save.
  * @return void
  */
 public static function save_settings($node_id = null, $settings = null)
 {
     $post_data = self::get_post_data();
     $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
     $settings = isset($post_data['settings']) ? $post_data['settings'] : $settings;
     $node = self::get_node($node_id);
     $new_settings = (object) array_merge((array) $node->settings, (array) $settings);
     // Process the settings.
     $new_settings = self::process_node_settings($node, $new_settings);
     // Save the settings to the node.
     $data = self::get_layout_data();
     $data[$node_id]->settings = $new_settings;
     // Update the layout data.
     self::update_layout_data($data);
     // Return the new layout.
     if (defined('DOING_AJAX')) {
         FLBuilder::render_css();
         FLBuilder::render_js();
         FLBuilder::render_layout();
     }
 }
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:29,代码来源:class-fl-builder-model.php


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