Plugin Directory

Changeset 3304411


Ignore:
Timestamp:
06/01/2025 06:35:13 PM (9 months ago)
Author:
webstat
Message:

Version 2.5.4 housekeeping and minor improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • web-stat/trunk/Web-Stat.php

    r3277253 r3304411  
    318318            $url = $host . '/wpFrame.htm?&oc=' . $this->oc . '&version=' . self::VERSION . '&dashboard_url=' . $dashboard_url;
    319319        }
     320        elseif ($host) {
     321           $url = $host . '/wpFrame.htm?version=' . self::VERSION . '&dashboard_url=' . $dashboard_url;
     322           self::send_php_error('Could not display dashboard widget / no oc or oc_a2 / url = ' . $url .' / dashboard_url = ' . $dashboard_url);
     323        }
    320324        else {
    321             self::send_php_error('Could not display dashboard widget at ' . $url .' / dashboard_url = ' . $dashboard_url);
    322             return; // Exit early
    323         }
     325            // No $host — display an error message inside the widget
     326            echo '<div style="text-align:center; font-size:1.2em">' . esc_html__('INVALID WEB-STAT INSTALLATION') . '</div>
     327<p style="text-align:left;">' . wp_kses_post(__('Please deactivate and remove this installation of Web-Stat from the \'Apps\' section, then add the Web-Stat app again from the plugins repository or by following <a href="https://wordpress.org/plugins/web-stat/">this link</a>. If you need help, feel free to <a href="https://www.web-stat.com/contact_us.htm">contact us</a>')) . '</p>';
     328            self::send_php_error('Could not display dashboard widget / no host defined');
     329            return;
     330        }
     331
    324332        echo '<iframe src="' . esc_url($url) . '" style="width:100%; height:500px;" id="wts_iframe"></iframe>';
    325333    }
Note: See TracChangeset for help on using the changeset viewer.