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.76k stars 431 forks source link

Sync Updates for NON WordPress Repository Plugins #700

Open Serpentsoft opened 7 years ago

Serpentsoft commented 7 years ago

I made a plugin for my themes and it's available in Amazon S3 as a ZIP file but when I upgrade it, I need my clients read these updates without updating theme.

Now I should upgrade my themes and write the new version of the plugin and of course not all clients need to upgrade theme so they won't install the new plugin.

Is there any solution for that??

Thanks.

maxviewup commented 7 years ago

I also need this feature for my plugin. If possible, using git repo too.

jrfnl commented 7 years ago

Ideas on how TGMPA would be able to retrieve the information that an update is available would be welcome.

maxviewup commented 7 years ago

maybe adding an url that sends the plugin info (version, etc) to check (maybe a txt file). If a new version is detected, reinstall the plugin.

jrfnl commented 7 years ago

The point I was trying to make is that you'd need to set up a response which TGMPA can interpret and that's not something which can be (or should be) build into TGMPA. That's something you have to sort out yourself. If the info that a new version is available is received by WP, TGMPA can sort out the updating.

Have a look at https://github.com/YahnisElsts/wp-update-server and https://github.com/YahnisElsts/plugin-update-checker . Combining that with TGMPA should work

maxviewup commented 7 years ago

I understand your point and you're right. Did not know that TGMPA just checked if the plugin needed updates based on the information that wordpress provided.

What I was thinking was a TGMPA check in a JSON or TXT to update the plugin, for external plugins. However perhaps this should be done in the plugin itself.

Is there any filter that can change the plugin update status provided by TGMPA? (or maybe wordpress itself)

jrfnl commented 7 years ago

What I was thinking was a TGMPA check in a JSON or TXT to update the plugin, for external plugins.

The problem with that is that everyone would create their own formats which TGMPA would then need to interpret and account for. That's the road to disaster. If a server provides WP with the info WP can interpret (like the repo I pointed to above can do), then TGMPA can pick up on it.

Is there any filter that can change the plugin update status provided by TGMPA? (or maybe wordpress itself)

There are a number of filters available in WP itself to filter the relevant data. That is also how the repos I pointed to work, so have a look at that code for examples.

maxviewup commented 6 years ago

There are a number of filters available in WP itself to filter the relevant data. That is also how the repos I pointed to work, so have a look at that code for examples.

Great! I will lean more about it and try to make them work together nice and neat.