Closed Alireza-Ghavabesh closed 3 years ago
packages
directory. If you're getting a valid JSON response, the ZIP file is probably already in the right place.Puc_v4_Factory::buildUpdateChecker()
is the more recent version. ThemeUpdateChecker
is outdated and no longer maintained. It might still work, but I would not recommend using it in new projects.currently my example-theme have a Enable auto-update & Disable auto-update Button but although my theme version is: 2.0 and new updated theme in server (in packages folder) is 2.1 but there is no yellow notification for updating theme !
can you tell me what is my mistake ?! ![Uploading Screenshot (45).png…]()
Your screenshot isn't showing up for some reason. However, based on the JSON that you posted earlier, the version on the server is 1.8, not 2.1. Are you sure you have the latest version in the packages
directory? It might still have an older file, or the version number in the file is incorrect.
I'm very surprised, everything looks ok ...!
That looks OK to me, too. The version numbers are correct, and the fact that the JSON response shows the new version means that the ZIP file is in the right place.
Could it be that the code that sets up the update checker is wrong? Please make sure that it has the right URL, file name and theme slug.
I think that looks fine. And this theme is active, yes?
If it still doesn't work, try installing the Debug Bar plugin and look at he "PUC (example-theme)" panel in the debug bar. Does it show the correct information for your theme? You can also try manually triggering an update check (there should be a button for that in the panel) and see what happens.
tnx tnx !
all of my problem fixed and it worked very well !
just i have a questions:
I want to set an icon for my notification. like that in the screenshot I will be grateful if you can give me a link contain some guide about customizing and prettify yellow notification.
thanck you very much
That looks like a custom icon that was probably added by another plugin or theme. I don't know how it was done. This update checker doesn't have a feature like that. It just lets WordPress core generate the notifications.
thankyou alot