wp-cli / entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.
MIT License
100 stars 90 forks source link

Prevent unexpected missed schedules when generating new posts #418

Closed rafaelzaleski closed 1 year ago

rafaelzaleski commented 1 year ago

This PR uses an empty string as the default value for the --post_date and --post_date_gmt parameters of wp generate posts. This will align with the behavior of wp_insert_post and use the current time for the generated posts when a date is not provided. If a date is provided, it's passed down to wp_insert_post.

Closes https://github.com/wp-cli/entity-command/issues/268 Related https://github.com/wp-cli/wp-cli/issues/5832