File tree 2 files changed +13
-7
lines changed
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ public function __invoke($args, $assocArgs): void
35
35
$ logger ->info (' * find all optimized attachments ' );
36
36
$ logger ->info (' * restore the original full sized images ' );
37
37
$ logger ->info (' * drop all meta flags (mark as non-optimized) ' );
38
- $ logger ->warning ('You have to regenerate the all thumbnails afterwards ' );
39
- $ logger ->warning ('by running the following command: ' );
40
- $ logger ->warning ('$ wp media regenerate ' );
41
38
42
39
WP_CLI ::confirm ('Are you sure you want to reset all attachment optimization? ' , $ assocArgs );
43
40
@@ -53,9 +50,15 @@ public function __invoke($args, $assocArgs): void
53
50
$ logger
54
51
);
55
52
$ restoreOperation ->execute (...$ ids );
53
+ $ logger ->notice ('Original full sized images restored. ' );
56
54
57
55
$ logger ->section ("Dropping all optimized attachments' meta flags " );
58
56
$ repo ->markAllAsUnoptimized ();
59
- $ logger ->notice ('All meta flags dropped. ' );
57
+ $ logger ->notice ('Meta flags dropped. ' );
58
+
59
+ $ logger ->section ('Actions Required! ' );
60
+ $ logger ->warning ('You should regenerate the all thumbnails now ' );
61
+ $ logger ->warning ('by running the following command - ' );
62
+ $ logger ->warning (' $ wp media regenerate ' );
60
63
}
61
64
}
Original file line number Diff line number Diff line change @@ -43,15 +43,18 @@ public function __invoke($args, $assocArgs): void
43
43
44
44
$ logger = LoggerFactory::create ();
45
45
46
- $ logger ->warning ('You have to regenerate the thumbnails afterwards ' );
47
- $ logger ->warning ('by running the following command: ' );
48
- $ logger ->warning ('$ wp media regenerate ' . implode (' ' , $ ids ));
49
46
WP_CLI ::confirm ('Are you sure you want to restore the original full sized images? ' , $ assocArgs );
50
47
51
48
$ repo = new AttachmentRepository ();
52
49
$ filesystem = new Filesystem ();
53
50
54
51
$ restoreOperation = RestoreFactory::create ($ repo , $ filesystem , $ logger );
55
52
$ restoreOperation ->execute (...$ ids );
53
+ $ logger ->notice ('Original full sized images restored. ' );
54
+
55
+ $ logger ->section ('Actions Required! ' );
56
+ $ logger ->warning ('You should regenerate the all thumbnails now ' );
57
+ $ logger ->warning ('by running the following command - ' );
58
+ $ logger ->warning (' $ wp media regenerate ' . implode (' ' , $ ids ));
56
59
}
57
60
}
You can’t perform that action at this time.
0 commit comments