@@ -178,27 +178,27 @@ public function create( $args, $assoc_args ) {
178178 }
179179
180180 $ array_arguments = array ( 'meta_input ' );
181- $ assoc_args = \WP_CLI \Utils \parse_shell_arrays ($ assoc_args , $ array_arguments );
182-
183- if (isset ($ assoc_args ['from-post ' ]) ) {
184- $ post = $ this ->fetcher ->get_check ($ assoc_args ['from-post ' ]);
185- $ post_arr = get_object_vars ($ post );
186- $ post_id = $ post_arr ['ID ' ];
187- unset($ post_arr ['post_date ' ]);
188- unset($ post_arr ['post_date_gmt ' ]);
189- unset($ post_arr ['guid ' ]);
190- unset($ post_arr ['ID ' ]);
191-
192- if (empty ($ assoc_args ['meta_input ' ]) ) {
193- $ assoc_args ['meta_input ' ] = $ this ->get_metadata ($ post_id );
181+ $ assoc_args = \WP_CLI \Utils \parse_shell_arrays ( $ assoc_args , $ array_arguments );
182+
183+ if ( isset ( $ assoc_args ['from-post ' ] ) ) {
184+ $ post = $ this ->fetcher ->get_check ( $ assoc_args ['from-post ' ] );
185+ $ post_arr = get_object_vars ( $ post );
186+ $ post_id = $ post_arr ['ID ' ];
187+ unset( $ post_arr ['post_date ' ] );
188+ unset( $ post_arr ['post_date_gmt ' ] );
189+ unset( $ post_arr ['guid ' ] );
190+ unset( $ post_arr ['ID ' ] );
191+
192+ if ( empty ( $ assoc_args ['meta_input ' ] ) ) {
193+ $ assoc_args ['meta_input ' ] = $ this ->get_metadata ( $ post_id );
194194 }
195- if (empty ($ assoc_args ['post_category ' ]) ) {
196- $ post_arr ['post_category ' ] = $ this ->get_category ($ post_id );
195+ if ( empty ( $ assoc_args ['post_category ' ] ) ) {
196+ $ post_arr ['post_category ' ] = $ this ->get_category ( $ post_id );
197197 }
198- if (empty ($ assoc_args ['tags_input ' ]) ) {
199- $ post_arr ['tags_input ' ] = $ this ->get_tags ($ post_id );
198+ if ( empty ( $ assoc_args ['tags_input ' ] ) ) {
199+ $ post_arr ['tags_input ' ] = $ this ->get_tags ( $ post_id );
200200 }
201- $ assoc_args = array_merge ($ post_arr , $ assoc_args );
201+ $ assoc_args = array_merge ( $ post_arr , $ assoc_args );
202202 }
203203
204204 $ assoc_args = wp_slash ( $ assoc_args );
0 commit comments