Changeset 3080969
- Timestamp:
- 05/03/2024 01:08:38 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
event-post/trunk/inc/deprecated/widget.php
r3080963 r3080969 28 28 } 29 29 function widget($args, $local_instance) { 30 _deprecated_function(__FUNCTION__, '5.9.0', __('Legacy widgets have been deprecated. Consider using blocks instead.', 'event-post'));30 _deprecated_function(__FUNCTION__, '5.9.0', __('Legacy widgets have been deprecated. Consider using blocks instead.', 'event-post')); 31 31 extract( $args ); 32 $instance = wp_parse_args( (array) $local_instance, $this->defaults );32 $instance = wp_parse_args( (array) $local_instance, $this->defaults ); 33 33 34 global $EventPost;35 $numberposts = intval($instance['numberposts']);36 $future = intval($instance['future']);37 $past = intval($instance['past']);38 $cat = sanitize_text_field($instance['cat']);39 $tag = sanitize_text_field($instance['tag']);40 $order = sanitize_text_field($instance['order']);34 global $EventPost; 35 $numberposts = intval($instance['numberposts']); 36 $future = intval($instance['future']); 37 $past = intval($instance['past']); 38 $cat = sanitize_text_field($instance['cat']); 39 $tag = sanitize_text_field($instance['tag']); 40 $order = sanitize_text_field($instance['order']); 41 41 42 43 44 45 46 47 48 49 50 51 52 53 42 $events = $EventPost->get_events( 43 array( 44 'nb'=>$numberposts, 45 'future'=>$future, 46 'past'=>$past, 47 'geo'=>0, 48 'cat'=>$cat, 49 'tag'=>$tag, 50 'order'=>$order 51 ) 52 ); 53 if(count($events)==0){ 54 54 return; 55 55 }
Note: See TracChangeset
for help on using the changeset viewer.