Skip to content
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

Can I update themes (parent and child theme) using TGMPA? #793

Open
lwxbr opened this issue Aug 19, 2020 · 8 comments
Open

Can I update themes (parent and child theme) using TGMPA? #793

lwxbr opened this issue Aug 19, 2020 · 8 comments

Comments

@lwxbr
Copy link

lwxbr commented Aug 19, 2020

Can I update themes (parent and child theme) using TGMPA? I would like to use this feature because I have themes outside of wp.org that I want to deliver to my customers. Thank you!

PS.: I want to revive this thread that was forgotten since 2018: #729

@jrfnl
Copy link
Contributor

jrfnl commented Aug 19, 2020

The thread wasn't forgotten, the answer was already there.

No, you can not update themes with TGMPA. TGMPA only handles plugins.

For plugins you can use outside sources, though for WP - and therefore TGMPA - to know there is an update, you need to hook into WP itself and set up some way to poll for new versions. You can set that up by using a combination of the https://github.com/YahnisElsts/wp-update-server and the https://github.com/YahnisElsts/plugin-update-checker packages.

@lwxbr
Copy link
Author

lwxbr commented Aug 19, 2020

@jrfnl, you can update plugins outside of wp.org with TGMPA. The fact is that TGMPA could offer an all in one solution for themes and plugins. It would be possible in a near future?

@jrfnl
Copy link
Contributor

jrfnl commented Aug 19, 2020

I don't foresee that happening, though a pull request would be taken into consideration.

@jrfnl
Copy link
Contributor

jrfnl commented Aug 19, 2020

To clarify further: to update a theme from outside sources, you'd still need a mechanism like the above mentioned to hook into WP and poll for updates. That is standard WP functionality, you don't need TGMPA for that.

So the only thing which realistically could fit into TGMPA is listing an update for the parent theme (= dependency). Everything else is already standard WP functionality.

@lwxbr
Copy link
Author

lwxbr commented Aug 19, 2020

Ok, In my case, I have to deploy the theme parent and the child theme via git push. So the number of deploys I have to do is equal to two times the number of customers I work. With only TGMPA in my parent theme, I could upload using mytheme.zip and the rest, TGMPA would install everything and keep my plugins and themes updated. The installation and update of dependencies would be totally independent of manual uploads via .zip, and even my customer could do the update by himself.

So the only thing which realistically could fit into TGMPA is listing an update for the parent theme (= dependency). Everything else is already standard WP functionality.

That quote shows that the only dependency is the first start, the rest could be installed using TGMPA.

@jrfnl
Copy link
Contributor

jrfnl commented Aug 19, 2020

No, the rest could be installed using standard WP functionality.

TGMPA will not know there is a new zip available unless you do the above described hook-ins and polling, which is outside the scope of TGMPA. There really isn't anything here for TGMPA to do.

I understand your frustration, but when you add the server side setup and polling as per the previously mentioned packages, those updates will automatically be offered by WP. This is not something you need TGMPA for.

Please remember: TGMPA is a dependency management tool, not an update manager.

@lwxbr
Copy link
Author

lwxbr commented Aug 19, 2020

The wp.org repositories are okay, but I have another sources for my plugins and themes, the main issue is the dependencies outside of main repository of Wordpress, right? I understand that TGMPA uses the core functionality of WP for update plugins and themes (TGPMA is a plugin inside a theme, is it right that I named?) I studied the classes of Wordpress Updater, and Updater Skin and that classes TGMPA already make use of and make it well. The only issue is implement the installation of themes, that would be awesome, that would make the update of themes much easier and make the cycle of update complete using wp.org and external sources. My hope is that matter interest more people to keep it implementable in this repository.

@jrfnl
Copy link
Contributor

jrfnl commented Aug 19, 2020

@lwxbr Please read my previous messages again as I am under the impression that you are missing the point.

TGMPA uses the standard WP (under the hood) functionality to find out whether there are updates available.

For plugins (and themes) hosted on wp.org, any install of WordPress regularly sends an API request to the wp.org server to check if there is a new version available and if so, it will display them on the Updates page, and if the plugin is a theme/plugin dependency, TGMPA will display those updates as well.

For anything hosted externally, WP still checks for updates on wp.org, but won't find updates, so neither WP nor TGMPA will show any updates.

That's what those other packages are about. They allow you to set up a server with version based zip files of your themes/plugins and via the client-side package, you then hook into WP to tell it to also send an API request to that server to ask if there are updates available for the plugin/theme.

All of that is outside of the scope of TGMPA and not something which will ever be inside the scope of TGMPA, so pull requests to add that functionality will not be accepted.

So whether themes are listed via TGMPA or not is irrelevant. Without an API setup which registers with a WP install that there are updates available, the point is moot and you still won't archives what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants