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


PHP WP_Widget::update方法代码示例

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


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

示例1: update

 function update($new_instance, $old_instance)
 {
     $instance = parent::update($new_instance, $old_instance);
     $instance['title'] = $new_instance['title'];
     $instance['venue_ID'] = $new_instance['venue_ID'];
     $instance['count'] = $new_instance['count'];
     $instance['hide_if_empty'] = $new_instance['hide_if_empty'];
     return $instance;
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:9,代码来源:widget-venue.class.php

示例2: update

 function update($new_instance, $old_instance)
 {
     parent::update($new_instance, $old_instance);
     $instance = $old_instance;
     $instance['title'] = strip_tags($new_instance['title']);
     $instance['number_post'] = strip_tags($new_instance['number_post']);
     $instance['current_category'] = strip_tags($new_instance['current_category']);
     return $instance;
 }
开发者ID:thinh9012,项目名称:Wordpress,代码行数:9,代码来源:widgetqthinh.php

示例3: update

 public function update($new_instance, $old_instance)
 {
     $instance = parent::update($new_instance, $old_instance);
     $instance['title'] = $new_instance['title'];
     $instance['venue_ID'] = $new_instance['venue_ID'];
     $instance['count'] = $new_instance['count'];
     $instance['hide_if_empty'] = $new_instance['hide_if_empty'];
     if (isset($new_instance['jsonld_enable']) && $new_instance['jsonld_enable'] == true) {
         $instance['jsonld_enable'] = 1;
     } else {
         $instance['jsonld_enable'] = 0;
     }
     return $instance;
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:14,代码来源:Venue_Widget.php

示例4: update

 /**
  * Function allowing updating of widget information.
  *
  * @since 1.1
  * @author Paul Hughes
  * @param array $new_instance new instance variables.
  * @param array $old_instance old instance variables.
  * @return array $instance the returned new instance variable values.
  */
 function update($new_instance, $old_instance)
 {
     $instance = parent::update($new_instance, $old_instance);
     $instance['title'] = $new_instance['title'];
     $instance['count'] = $new_instance['count'];
     $instance['thumbnails'] = isset($new_instance['thumbnails']) ? true : false;
     $instance['only_display_related'] = isset($new_instance['only_display_related']) ? true : false;
     $instance['post_type'] = $new_instance['post_type'];
     return $instance;
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:19,代码来源:tribe-related-posts-widget.php

示例5: update

 function update($new_instance, $old_instance)
 {
     $instance = parent::update($new_instance, $old_instance);
     $instance['full'] = $new_instance['full'];
     return $instance;
 }
开发者ID:mauricioabisay,项目名称:nwm-loc,代码行数:6,代码来源:widgets.php

示例6: update

 /**
  * Processing widget options on save
  *
  * @param array $new_instance The new options
  * @param array $old_instance The previous options
  */
 public function update($new_instance, $old_instance)
 {
     // processes widget options to be saved
     parent::update($new_instance, $old_instance);
     $instance = $old_instance;
     $instance['title'] = strip_tags($new_instance['title']);
     $instance['image'] = esc_url($new_instance['image']);
     $instance['link'] = esc_url($new_instance['link']);
     return $instance;
 }
开发者ID:khiconit,项目名称:makeclean,代码行数:16,代码来源:class-wc-slide-widget.php


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