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


PHP AQ_Block::update方法代码示例

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


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

示例1: update

 function update($new_instance, $old_instance)
 {
     if ($new_instance['post_shape'] == 'circle') {
         $new_instance['post_style'] = $new_instance['post_shape'];
     } elseif ($new_instance['post_shape'] == 'magazine') {
         $new_instance['post_style'] = $new_instance['magazine_style'];
     } else {
         $new_instance['post_style'] = $new_instance['hover_style'];
     }
     $new_instance['post_order'] = 'desc';
     return parent::update($new_instance, $old_instance);
 }
开发者ID:purgesoftwares,项目名称:purges,代码行数:12,代码来源:cr-offers-block.php

示例2: update

 public function update($new_instance, $old_instance)
 {
     $new_instance['ids'] = explode(',', $new_instance['ids']);
     return parent::update($new_instance, $old_instance);
 }
开发者ID:purgesoftwares,项目名称:purges,代码行数:5,代码来源:cr-gallery.php

示例3: update

 public function update($new_instance, $old_instance)
 {
     // this check can be done for other cases where a "row-fluid" class is needed
     if (isset($new_instance['map_background']) && '1' == $new_instance['map_background']) {
         //re-using a prehandled case for full-width sliders
         $new_instance['fullwidthSlider'] = 'full-width-column';
     } else {
         if (!empty($new_instance['background_color']) || !empty($new_instance['image_upload']) || !empty($new_instance['checkParallax']) || !empty($new_instance['highlight']) || !empty($new_instance['center_blocks']) || !empty($new_instance['background_video'])) {
             $new_instance['fullwidthSlider'] = 'full-width-column';
         } else {
             if (isset($new_instance['fullwidthSlider'])) {
                 // make sure to unset it if we don't need it
                 unset($new_instance['fullwidthSlider']);
             }
         }
     }
     return parent::update($new_instance, $old_instance);
 }
开发者ID:purgesoftwares,项目名称:purges,代码行数:18,代码来源:aq-column-block.php

示例4: update

 public function update($new_instance, $old_instance)
 {
     $new_instance['_data'] = (array) json_decode(wp_unslash($new_instance['_data']), true);
     return parent::update($new_instance, $old_instance);
 }
开发者ID:purgesoftwares,项目名称:purges,代码行数:5,代码来源:cr-gmap-block.php


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