Ahh, i think I know why - the plugins files are loading before functions.php, and the call in the slimstats plugin doesn't use an action/filter hook so it executes immediately (which is why
$pagenow isn't available). With the filter being added in your theme, the call from the plugin happens before the filter is exists, so it doesn't modify the results of
The reason it works for me is that I actually wrote a plugin to use instead of the functions.php file for code that I want to keep around even if I change themes, and it is set up to run before any of the other plugins.
If you want to do the same and use a filter instead of modifying the plugin, which I would recommend, you can set up your own custom functions.php plugin based on this code: http://justin.ag/technology/wordpress-plugins/wordpress-plugin-custom-functions-php/.
Basically just create a
custom-functions-php folder in your plugins directory, add the code from that link to a file called
custom-functions.php and then include the filter from http://justin.ag/technology/activate-wp-slimstat-dashboard-widgets-in-wordpress-multisite/ in a file called
functions.php in the
custom-functions-php folder. Activate the new
Custom functions.php plugin in your admin and you should be good to go - it should work as a site or network-wide plugin depending on how you want to distribute the custom functions. Nifty for other code too.