Search: Add plugin or theme's URL on wordpress.org#108
Merged
schlessera merged 3 commits intowp-cli:masterfrom Jul 26, 2018
Merged
Search: Add plugin or theme's URL on wordpress.org#108schlessera merged 3 commits intowp-cli:masterfrom
schlessera merged 3 commits intowp-cli:masterfrom
Conversation
schlessera
requested changes
Jul 20, 2018
src/Plugin_Command.php
Outdated
| * **icons**: Plugin's Icon Image Link | ||
| * **active_installs**: Plugin's Number of Active Installs | ||
| * **contributors**: Plugin's List of Contributors | ||
| * **url**: Plugin's URL on wordpress.org |
Member
There was a problem hiding this comment.
CS: There's a trailing space here.
Contributor
Author
There was a problem hiding this comment.
Good catch. Fixed in the rebased 26862c0.
src/WP_CLI/CommandWithUpgrade.php
Outdated
|
|
||
| // Add `url` for plugin or theme on wordpress.org. | ||
| foreach ( $items as $index => $item_object ) { | ||
| $item_object->url = 'https://wordpress.org/' . $plural . '/' . $item_object->slug . '/'; |
Member
There was a problem hiding this comment.
I'd prefer this to use substitution:
$item_object->url = "https://wordpress.org/{$plural}/{$item_object->slug}/";
After the plugin_api() or theme_api() call is made, update the results with the generated URL for wordpress.org, made up of a hard-coded domain name, the plural of the item type, and the item's slug. Fixes #94.
e1e1844 to
26862c0
Compare
schlessera
approved these changes
Jul 20, 2018
Member
|
This currently fails on WP trunk: https://travis-ci.org/wp-cli/extension-command/jobs/406130240#L665-L704 I assume the |
Contributor
Author
Trying a workaround first. |
Member
|
Thanks for the pull request, @GaryJones ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the plugin_api() or theme_api() call is made, update the results with the generated URL for wordpress.org, made up of a hard-coded domain name, the plural of the item type, and the item's slug.
Fixes #94.