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

Merge latest changes from upstream #1

Open
wants to merge 125 commits into
base: master
Choose a base branch
from

Conversation

vital101
Copy link
Owner

No description provided.

YahnisElsts and others added 30 commits December 9, 2020 17:07
…not URL-safe.

Apparently, the "/src" subsection of the BitBucket API doesn't do well with branch names that contain slashes. urlencode() doesn't help. See #409 for the initial report.
Fixed a call to non-existent lastRequestApiErrors property
The update checker will look for a `master` branch by default, but new repositories use the name `main` instead, and it is technically possible to use any branch as the default branch. So while you don't *have to* set the branch name, it's probably a good idea to always do that.
Adds `main` as a possible default branch name to invoke `$this->getLatestTag()` inside of `Puc_v4p11_Vcs_BitBucketApi::chooseReference()`.

Previously, only branches named `master` inherited this special behavior. With more VCS providers opting for an inclusive default branch name, this commit adds `main` as a default branch name configuration.

Related to #422.
Adds possible default branch name 'main': Bitbucket
…der of update checking from Gitlab to match the Github methodology
Props to @timwiel for the suggestion and the original implementation. See  #461. 

This change applies to plugins (but not themes) that are updated from a VCS hosting provider like GitHub. Previously, the plugin author would have had to use a filter to provide icons. Now they can just put them in a subdirectory named "assets" instead. Icon file names and extensions should match those described here:
https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons

Note that the update checker will use icons from the installed version, not from the VCS repository.
Use plugin banners from the local "assets" directory.
This applies to locally stored plugin icons and banners. The code for icons and banners was very similar, so I've turned it into a utility method to reduce code duplication.
Added translations into Russian and Ukrainian languages.
Add Russian and Ukrainian translations
Update Simplified Chinese (zh_CN) translations
YahnisElsts and others added 30 commits November 9, 2023 10:34
…rsion 1.8.8.

When a plugin update overwrites PUC with a different version of PUC, the hook callbacks registered by the old version can trigger fatal errors when they try to autoload now-deleted PHP files. Normally, PUC avoids this by using an `upgrader_process_complete` hook to check if one of its files still exists, and removing the hooks if the file is missing.  

However, it appears that WP Last Modified Info has its own `upgrader_process_complete` callback that runs earlier. That callback tries to download plugin metadata, which indirectly triggers some PUC hooks, and leads to the fatal error(s) mentioned earlier.

Fixed by extracting the relevant part of  `upgraderProcessComplete` to a separate method and registering that method as a callback for the same hook, but with an earlier priority (1 instead of 11). It appears that WP Last Modified Info uses the default priority: 10.
… fatal error if one of its hook callbacks is called while the containing plugin/theme is being deleted.

PUC already used `upgrader_process_complete` to remove hooks when  the plugin version it was part of was deleted during an update. However, that did not catch more obscure situations, such as apparently being called from an unrelated AJAX request while the host plugin version was being deleted (a user sent a stack trace where it seems that was what happened).
Stop exporting development files
Previously, triggerUpdateCheckOnce() was attached to a transient filter, but that's no longer the case. Now it's passed directly to WP_CLI::add_hook().

However, it still takes and returns a value. WP-CLI documentation says that the `before_invoke:<command>` hook takes one argument and acts as a filter.
By default, these buttons are generated using the get_submit_button() API function, but that function is only available in the admin dashboard (unless explicitly loaded). Previously, the buttons were not shown in the front end.

This patch adds a fallback that generates the buttons directly. These won't look exactly the same as admin buttons due to admin styles not being loaded, and WP may change submit button HTML at some point, but the fallback buttons should still work.

Fixes #568
Update Simplified Chinese (zh_CN) translation
It re-structures and corrects the folder/zip structure of the extracted remote zip folder - if not correct already.
Fix the remote source directory structure if files are at the archive root instead in a subdirectory
It seems PhpStorm no longer complains about the "skin" property.
Remove plugin/theme data from update requests to api.wordpress.org
Probably needs testing, especially for themes.
This code doesn't actually modify timeouts.
One out by @robertdevore in #580, the other I noticed myself while fixing the first one.
No new strings, just updated line numbers and such.
Add Serbian (Cyrillic) (sr_RS) translation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.