本文整理汇总了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);
}
示例2: update
public function update($new_instance, $old_instance)
{
$new_instance['ids'] = explode(',', $new_instance['ids']);
return parent::update($new_instance, $old_instance);
}
示例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);
}
示例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);
}