TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.75k stars 431 forks source link

Possibility to set SatisPress repository as plugin source to better manage using premium plugins #746

Open j-falk opened 6 years ago

j-falk commented 6 years ago

Background So the background is that we want a better process of how to use plugins that are not on the WordPress.org repository but often paid plugins, eg. such Advanced Custom Fields Pro.

How we solve it today As of now we upload these plugins to a Amazon S3 bucket which then gives us a url to the zip that we can use as source in TGMPA.

However this is sort of time consuming and means that we need to:

How we would like to solve it So this is a struggle that SatisPress (https://github.com/blazersix/satispress) helps solving by making your WordPress install in to a custom repository for your installed plugins and allows you to manage them in a standard WordPress installation, leveraging the built-in update process to handle the myriad licensing schemes that would be impossible to account for outside of WordPress.

So my question is if it is a way to set a SatisPress repository as plugin source in TGMPA?

We discussed it briefly now at WCEU 2018 and I promised I would create an issue for it. I am very happy to help out making this happen however I can and think it could also be a useful feature for others.

Thanks for the time you spend on TGMPA and looking forward to hear back from you!

GaryJones commented 6 years ago

@j-falk let's say your SatisPress install is at https://example.com/. You would be able to get, for example, Gravity Forms 2.3.1 at https://example.com/satispress/gravityforms/2.3.1.

If you have Basic Auth, then it would be something like https://me:password@example.com/satispress/gravityforms/2.3.1, which would obviously reveal your password, unless that was added as an environment variable / filtered in from elsewhere.

Are you after providing a URL to specific versions of plugins, or after something that would resolve some constraints defined somewhere (like Composer works)?

Getting a specific versions seems simple enough.

Resolving a constraint first would be considerable more complex - not something we'd want to build into TGMPA - but we should ensure there are sufficient hooks so you can dynamically compose a URL from your own resolving.

j-falk commented 6 years ago

Thanks @GaryJones! (vacation period here so that is the reason why I am a bit slow to respond)

I think I would want to be able to include the latest version rather then a specific version. Is there already a url from SatisPress that would give me that?

I don't think resolving a constraint is needed since typically we always try to keep all WordPress plugins updated to its latest versions whenever possible.