WordPress doesn’t recognize plugins that have spaces in the header declaration

Notice: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /mnt/web006/d0/10/52591910/htdocs/cc/wp-includes/functions.php on line 3888

This one took me a while to find out – I hope this post saves you some time. I was working on a simple Flickr API plugin for WordPress (will post and use it here), but all of a sudden my plugin stopped from showing up in my (multisite) admin back-end.

So I headed over to Google and looked if anyone had the same issue. There were a lot of comments about looking at multisite admin rather than the individual network site, some remarks about the contents of the header file – but none about its very syntax.

A few extra spaces. Come on, WordPress, why do you use such a strict parser to look at the plugin directory? Why not adding that extra \s* to that regexp you use to identify plugins?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.