-
-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lite / embeddable version? #348
Comments
Hey Matt, @royboy789 has asked about this too. My biggest issue is having that embedded code be updated when it changes. It begs the question of what do you think would be better? A lite embeddable version or something that automatically downloads and installs GHU if it's not already installed something like TGMPA https://github.com/TGMPA/TGM-Plugin-Activation Thoughts? |
We could create a drop-in class that would check to see if GHU is present and active. If not it would install and activate. |
@afragen A notifier / updater class (like TGMPA) would be an awesome solution too. |
I've been playing around this evening and I have a small class that should be able to install and activate GHU if it's not present. Once I get it working better I'll put it up. Should be tomorrow. TGMPA is moving towards being a plugin and looking at the discussion regarding TGMPA as a feature plugin, it was mentioned that dependencies should be added and activated without user interaction. TGMPA/TGM-Plugin-Activation#447 We probably should add a notification that the plugin is being installed as a dependency for the other plugin. |
Hey Matt, a question. Do you think something more universal to install one or more plugin dependencies or just stick to GHU? I think we could make something reasonably simple that could use a json encoded file as input. |
I'd love to see a small lib that works like TGMPA, but only for the GitHub updater plugin. E.g. it notifies users to install it, via an admin notice. |
I don't even think it would necessarily need to install GHU for them. It would check if GHU is active. If not active, it'd show an admin notice containing either (A) an "Install plugin" link, or (B) a link to download the GHU zip. This admin notice could presumably be dismissed temporarily (e.g. for a week), but not permanently. |
So here's what I've done. https://github.com/afragen/wp-install-dependencies There's an example plugin and a drop-in folder with a class and json package file for config. I make several assumptions, among them that the dependencies are needed and must be active. There's still an issue with some install info but I'm not sure how to get rid of it. There is essentially no user interaction except to activate your plugin. Currently the class only works on plugin pages. It's been a fun morning. 👍 BTW, dependencies can be on GitHub, Bitbucket, or GitLab and can be private on all but Bitbucket. |
Andy, this looks great! A few suggestions:
{
"github-updater": {
"name": "GitHub Updater",
"slug": "github-updater/github-updater.php",
"git": "github",
"uri": "https://github.com/afragen/github-updater",
"branch": "master",
"confirm": true,
"token":null
}
}
$config = apply_filters( 'wpid_register_dependencies', $config ); |
Matt, Let's take the discussion over to the other repo and reference back here. |
Not sure if all discussion about this is at the new repo, but I wanted to give a 👍 to this idea. Would be happy to help in any way I can. |
Take look over there. The I could really use some help getting this to work. Currently, I think we've gotten it located under the plugin requiring the dependencies. All help is welcome. |
Cool. I'll check it out soon and see if there's anything I can offer to help. I'll be using this for all WordPress theme projects going forward, so this idea definitely interests me. |
Hey Andy,
Just wondering if you've considered adding an embeddable version of this plugin?
I'm currently using GHU for quite a few plugins hosted on public GitHub repos. I recommend that users install GHU to get automatic updates, but most users don't actually install it. It'd be awesome to be able to bundle this with any plugin so that updating happens automatically. Pseudocode below.
The text was updated successfully, but these errors were encountered: