-
Notifications
You must be signed in to change notification settings - Fork 427
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
Adjust plugin directory name for "wrongly" packaged zips. #327
Conversation
This allows for instance for GitHub pre-packaged zips to be correctly installed and recognized. Previously if you'd use the GitHub packaged zips - for instance: either master: https://github.com/lmartins/webipack-posts-widget/archive/master.zip or release based: https://github.com/lmartins/webipack-posts-widget/archive/v1.1.zip, you'd end up with an installed plugin, but with the plugin directory having a non-standard name `webipack-posts-widget-master`, cq `webipack-posts-widget-1.1` which would cause TGMPA not to recognize it as installed. Fixes #280, Fixes #283
|
||
// Check for single file plugins | ||
$source_files = array_keys( $GLOBALS['wp_filesystem']->dirlist( $remote_source ) ); | ||
if ( 1 === count( $source_files ) && false === $wp_filesystem->is_dir( $source ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does there need to be a global $wp_filesystem
, or is it already effectively done so by the $GLOBALS['wp_filesystem
] on the previous line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no. Good catch - I copied that line from the WP_Upgrader class and obviously missed that. Fixed.
…ion into feature/fix-280-283-github-installs
Fixed - one missed global reference - use of of `(un)trailingslashit()` - escape the two new strings and minor translation efficiency
Updated |
…-installs Adjust plugin directory name for "wrongly" packaged zips.
Logical 👍 Once we split the files up, I'd like to look into having something along the lines of a Merged. |
We'll need to think about this carefully. Once we make the strings more context-agnostic, there should be little need for clients to overrule our strings. |
This allows for instance for GitHub pre-packaged zips to be correctly installed and recognized.
Previously if you'd use the GitHub packaged zips - for instance: either master: https://github.com/lmartins/webipack-posts-widget/archive/master.zip or release based: https://github.com/lmartins/webipack-posts-widget/archive/v1.1.zip, you'd end up with an installed plugin, but with the plugin directory having a non-standard name
webipack-posts-widget-master
, cqwebipack-posts-widget-1.1
which would cause TGMPA not to recognize it as installed.Fixes #280, Fixes #283