Closed Japh closed 11 years ago
(I may be doing something obvious and dumb. I hope I am, as that's easy to fix, and if so I apologise!)
Hi Japh - How did you deploy the plugin folder/files that you pulled from GitHub?
I've found what went wrong. The plugin directory name when cloned from GitHub ends up being "WordPress-SysInfo", but the path is hardcoded into the plugin as "sysinfo". If I rename the directory after cloning, it works fine.
Closed the ticket, but ideally the path wouldn't be hardcoded, surely?
I'm curious, why use this:
plugins_url( 'sysinfo/css/sysinfo.css' )
Rather than this:
plugins_url( '/css/sysinfo.css', __FILE__ )
I'm not sure why I did it that way to be honest, especially since I've never done it that way in any other plugin I've written. Not sure what I was thinking. At any rate, thanks for pointing that out and I'll get the change made.
Haha! I've only seen it this way once before, myself. I believe in the WordPress Plugin Boilerplate, which I assume this is based on?
Ah, yes, you're right, that's probably where it came from. Since Tom was involved I wanted to use the WP Plugin Boilerplate (or at least pieces from it). So we'll just blame him :-)
LOL ;)
Perhaps @tommcfarlin can tell us why he's done it that way in the boilerplate?
It's done that way simply as a carry over from a couple of years of lack of experience. I've no shame in admitting that :).
It'll be something that's fixed in 2.0 of the Boilerplates.
I've had a brief look at the plugin, but for some reason, it only works when installed via the directory, not manually via GitHub. The files' contents are exactly the same, even the permissions, but the screens look different and the phpinfo doesn't work.
Anyone else seeing this?