I have a little fix for the problem with the dashboard widgets. They don’t work/display after login and seemed to work only at random times.
I think it is also the bug mentioned here:
WP SlimStat Dashboard Widgets not working with update
I tried a little bit around and figured out that the widgets are only displayed, when the dashboard is called with “wp-admin/index.php”. If the dashboard is called with “wp-admin/” without “index.php” (like after the login) they are not displayed.
In “wp-slimstat/wp-slimstat-dashboard.php” the following line on the top is not correct / not complete:
if (!empty($_GET['page']) || strpos($_SERVER['REQUEST_URI'], '/wp-admin/index.php') === false ) return;
I think something has changed in WordPress or this check has changed in SlimStat. A simple preg_match does fix the problem. Change the line to the following and everything works fine again:
if (!empty($_GET['page']) || ! preg_match('#wp-admin/(index.php)?(\?.*)?$#', $_SERVER['REQUEST_URI'])) return;
really great plugin and have a nice day
(and I already voted for it 😛 )
- The topic ‘[Plugin: WP SlimStat] Dashboard widgets are not displayed all the time’ is closed to new replies.