SimpleCalendarUpdatesUpdate_V220

Update to 2.2.0.

Defined (1)

The class is defined in the following location(s).

/includes/updates/update-v220.php  
  1. class Update_V220 { 
  2.  
  3. /** 
  4. * Update feeds meta 
  5. * @param array $posts 
  6. */ 
  7. public function __construct( $posts ) { 
  8.  
  9. if ( ! empty( $posts ) && is_array( $posts ) ) { 
  10.  
  11. foreach ( $posts as $post ) { 
  12.  
  13. $gce_list_max_num = get_post_meta( $post->ID, 'gce_list_max_num', true ); 
  14. $gce_list_max_length = get_post_meta( $post->ID, 'gce_list_max_length', true ); 
  15. $gce_feed_start_interval = get_post_meta( $post->ID, 'gce_feed_start_interval', true ); 
  16. $gce_feed_start = get_post_meta( $post->ID, 'gce_feed_start', true ); 
  17. $gce_feed_end_interval = get_post_meta( $post->ID, 'gce_feed_end_interval', true ); 
  18. $gce_feed_end = get_post_meta( $post->ID, 'gce_feed_end', true ); 
  19.  
  20. update_post_meta( $post->ID, 'gce_per_page_num', $gce_list_max_num ); 
  21. update_post_meta( $post->ID, 'gce_events_per_page', $gce_list_max_length ); 
  22. update_post_meta( $post->ID, 'gce_feed_start', $gce_feed_start_interval ); 
  23. update_post_meta( $post->ID, 'gce_feed_start_num', $gce_feed_start ); 
  24. update_post_meta( $post->ID, 'gce_feed_end', $gce_feed_end_interval ); 
  25. update_post_meta( $post->ID, 'gce_feed_end_num', $gce_feed_end ); 
  26.  
  27. // Add new show tooltips option checked as default. 
  28. update_post_meta( $post->ID, 'gce_show_tooltips', 1 ); 
  29.  
  30.