-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for 'url' to
--porcelain
to output the URL instead of a…
…ttachment ID (#182) * Added `porcelain_url` flag. Is that the best name for that? Should output ONLY the URL, instead of attachment ID or verbose descriptions. * Removed debugging behat tags * Fixed closed paren spacing * Added `get_real_attachment_url()` method to account for '-scaled' image URLs being returned by `wp_get_attachment_url()`. Improved tests, including non-image file for thoroughness. * Refactored to use `--porcelain=url` instead of `--show-url` to allow the porcelain output to use additional fields. 'ID' (default) and 'url' currently supported. * Don't assign variable inside if condition. Renamed $field to $porcelain. * Improve `--porcelain` docs and add some validation --------- Co-authored-by: Daniel Bachhuber <[email protected]>
- Loading branch information
1 parent
82a8fe8
commit aa6d3f6
Showing
2 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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