예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
 /**
  * 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;
 }
예제 #5
0
 function update($new_instance, $old_instance)
 {
     $instance = parent::update($new_instance, $old_instance);
     $instance['full'] = $new_instance['full'];
     return $instance;
 }
예제 #6
0
 /**
  * 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;
 }