Skip to content
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

wp post create with --post_status=future gets published immediately #282

Closed
brainysmurf opened this issue Jan 28, 2013 · 4 comments
Closed
Milestone

Comments

@brainysmurf
Copy link

This started happening with the update to WordPress 3.5 (multisite)

Reproducible:

wp post create --post-type=post --post_title='You are not supposed to be published' --post_content='Blah blah' --post_author=35 --post_status=future --post_date='2013-2-1 7:00' --url={yourblog}
@brainysmurf
Copy link
Author

For posts created this way, when you look at the post in the wordpress backend it doesn't seem to indicate that it has been scheduled in any way, simply published. Previous wordpress versions worked as expected: it showed up as scheduled.

@scribu
Copy link
Member

scribu commented May 19, 2013

  1. It's not specific to WP 3.5; it's the same in WP 3.4.
  2. The actual problem is that you use an incorrect date format:
--post_date='2013-2-1 7:00'

If you pass the correct format, it sets the post status to 'future', as expected:

--post_date='2013-02-01 07:00:00'

@scribu scribu closed this as completed in 9b983ff May 19, 2013
@brainysmurf
Copy link
Author

Well that's embarrassing...

@scribu
Copy link
Member

scribu commented May 20, 2013

No, not really; the docs weren't clear and, in an ideal world, it would work with any reasonable date format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants