Skip to content

Commit

Permalink
attachments: simple patch to omit fetching remote files
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Droz committed Aug 21, 2017
1 parent 140a53e commit b1a5e92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion class-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class WXR_Import_Command extends WP_CLI_Command {
*
* [--default-author=<id>]
* : Default author ID to use if invalid user is found in the import data.
*
* [--skip-attachment]
* : Omit fetch remote post's attachments.
*/
public function import( $args, $assoc_args ) {
$logger = new WP_Importer_Logger_CLI();
Expand All @@ -39,7 +42,7 @@ public function import( $args, $assoc_args ) {
}

$options = array(
'fetch_attachments' => true,
'fetch_attachments' => $assoc_args['skip-attachment'] != TRUE
);
if ( isset( $assoc_args['default-author'] ) ) {
$options['default_author'] = absint( $assoc_args['default-author'] );
Expand Down

0 comments on commit b1a5e92

Please sign in to comment.