-
Notifications
You must be signed in to change notification settings - Fork 86
Search: Add plugin or theme's URL on wordpress.org #108
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
Conversation
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 |
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.
CS: There's a trailing space here.
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.
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 . '/'; |
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.
I'd prefer this to use substitution:
$item_object->url = "https://wordpress.org/{$plural}/{$item_object->slug}/";
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.
Switched in the rebased 26862c0.
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 wp-cli#94.
e1e1844 to
26862c0
Compare
|
This currently fails on WP trunk: https://travis-ci.org/wp-cli/extension-command/jobs/406130240#L665-L704 I assume the |
Trying a workaround first. |
|
Thanks for the pull request, @GaryJones ! |
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.