Plugin Directory

Changeset 3080969

Timestamp:
05/03/2024 01:08:38 PM (2 months ago)
Author:
bastho
Message:

code format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • event-post/trunk/inc/deprecated/widget.php

    r3080963 r3080969  
    2828   }
    2929   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'));
    3131        extract( $args );
    32     $instance = wp_parse_args( (array) $local_instance, $this->defaults );
     32    $instance = wp_parse_args( (array) $local_instance, $this->defaults );
    3333
    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']);
    4141
    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){
     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);
     53if(count($events)==0){
    5454            return;
    5555        }
Note: See TracChangeset for help on using the changeset viewer.