rohmann / global-smtp

WordPress Global SMTP
62 stars 27 forks source link

2.3.0 #11

Closed Surbma closed 9 years ago

Surbma commented 9 years ago
rohmann commented 9 years ago

@Surbma Thanks for putting this together. I'm so sorry I missed it until now. I was wondering what you meant about the 2.3.0 version in that issue the other day. I haven't been watching this repository, so didn't get email notifications (they are on now).

I won't be able to merge this because it uses multiple files. It's important that we keep everything in one file so it's still usable as an mu plugin.

Localization is a great idea though. With it being a utility plugin, it's not something I considered, but now that an admin page is available it might be handy. I'll open an issue for this.

With this holiday weekend I've had a bit of spare time to update things, and it's been submitted to the wordpress.org plugin repo. I've also decided that with the rename, I'm going back to version 1.0. I'll tag the release once WordPress.org approves it (in case a few alterations are needed).

Surbma commented 9 years ago

FYI you can use a plugin with multiple files in the mu-plugins folder also. You just need to put the main plugin file in the main folder and then, you can have a folder with any files for your plugin.

rohmann commented 9 years ago

It's possible in the sense that PHP allows it, but not a good practice as you could have folder naming conflicts with plugins that do the same.

The WP Codex describes a proxy loader method that involves keeping plugins with their unique folder name, and using another file to load them. My preference is the Bedrock autoloader but not everyone uses Bedrock. At the end of the day, how mu plugins are loaded is more of a decision to be made by the site administrator. I think it's just simpler to keep things in one file to stay flexible and not assume anything.

Surbma commented 9 years ago

On the other hand mu-plugins can not be updated through WP admin, so it doesn't make sense to use a WP repo plugin, when you are not getting updates automatically.

Network activate do the same, but calling the functions a little bit later. So if there is no need to run this plugin in the first line, there is no advantage to use it as a mu-plugin.

I will test it on my installs and see, if everything is working as a network activated plugin.