• 1. events-widget.php (line:53) has table prefix hardcoded, should use $wpdb->prefix instead of wp_.
    2. The standard wrappers $before_widget, and $after_widget was not used along with an absolute positioning for the widget.
    3. events.php (line: 49) the menu icon is assumed to be existing in the theme, better distribute the icon with the plugin and point it there using plugins_url

    I had corrected all these on my copy.

    https://ww.wp.xz.cn/plugins/manags-events/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jiju Thomas Mathew

    (@phptrivandrum)

    Found more bugs in the events-widget.php

    If have only single day events, those will not be displayed on the calendar widget. This is because the range will not satisfy.

    Modified the code in the events-widget.php

    function get_dates($start, $end)
        {
    
            $startDay = strtotime($start);
            $endDay = strtotime($end);
            $days = ($endDay - $startDay) / (60 * 60 * 24);
            $this->eventsData[] = date("m/d/Y", $startDay);
            for ($i = 1; $i <= $days; $i++) {
                $this->eventsData[] = date("m/d/Y", $startDay + ($i * 86400));
            }
    
        }
        /*for php 5.3>*/
            function get_dates_5($start,$end){
    
            $begin = new DateTime( $start );
            $end = new DateTime( $end );
    
            $interval = DateInterval::createFromDateString('1 day');
            $period = new DatePeriod($begin, $interval, $end);
            if(empty($period)){
              $this->eventsData[]= $begin->format( "m/d/Y" );
            }else{
              foreach ( $period as $dt ){
                $this->eventsData[]= $dt->format( "m/d/Y" );
              }
            }
    
        }
    Plugin Author dianuj

    (@dianuj)

    Hi Jiju Thomas Mathew

    Thanks for pointing the issues in plugin.Bugs are now fixed and new version is released with a new slider feature is added in the plugin

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Widget has table names hardcoded’ is closed to new replies.