Skip to content

Conversation

@JulianBustamante
Copy link
Contributor

@JulianBustamante JulianBustamante commented Nov 16, 2023

See #429

  • Adds url-to-id command to get the post ID from its URL.
  • url_to_postid() doesn't check if the post exists when the URL contains the post id as a parameter.

Then STDOUT should contain:
"""
{POST_ID}
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for the error case too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure!

@JulianBustamante JulianBustamante marked this pull request as ready for review November 17, 2023 09:52
@JulianBustamante JulianBustamante requested a review from a team as a code owner November 17, 2023 09:52
@danielbachhuber danielbachhuber added the command:post-url-to-id Related to 'post url-to-id' command label Nov 19, 2023
@danielbachhuber danielbachhuber added this to the 2.5.7 milestone Nov 19, 2023
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this, @JulianBustamante !

@swissspidy swissspidy merged commit bc7f0e4 into wp-cli:main Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:post-url-to-id Related to 'post url-to-id' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants