We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee7fe25 commit 7bca56cCopy full SHA for 7bca56c
src/Post_Command.php
@@ -713,9 +713,9 @@ public function generate( $args, $assoc_args ) {
713
$post_author = $user_fetcher->get_check( $post_author )->ID;
714
}
715
716
- if ( !empty( \WP_CLI\Utils\get_flag_value( $assoc_args, 'post_content' ) ) ) {
717
- if ( !\WP_CLI\Entity\Utils::has_stdin() ) {
718
- WP_CLI::error( "The parameter `post_content` reads from STDIN." );
+ if ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'post_content' ) ) {
+ if ( ! \WP_CLI\Entity\Utils::has_stdin() ) {
+ WP_CLI::error( 'The parameter `post_content` reads from STDIN.' );
719
720
721
$post_content = file_get_contents( 'php://stdin' );
0 commit comments