Add "updated" option
authorChristian Weiske <cweiske@cweiske.de>
Thu, 15 Sep 2016 05:51:14 +0000 (07:51 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 15 Sep 2016 05:51:14 +0000 (07:51 +0200)
src/shpub/Command/AbstractProps.php

index b560fbe..0184c10 100644 (file)
@@ -62,6 +62,16 @@ class Command_AbstractProps
             )
         );
         $cmd->addOption(
+            'updated',
+            array(
+                'long_name'   => '--updated',
+                'description' => 'Update date',
+                'help_name'   => 'DATE',
+                'action'      => 'StoreString',
+                'default'     => null,
+            )
+        );
+        $cmd->addOption(
             'slug',
             array(
                 'short_name'  => '-s',
@@ -104,6 +114,11 @@ class Command_AbstractProps
                 'published', $cmdRes->options['published']
             );
         }
+        if ($cmdRes->options['updated'] !== null) {
+            $req->req->addPostParameter(
+                'updated', $cmdRes->options['updated']
+            );
+        }
         if (count($cmdRes->options['categories'])) {
             $req->addPostParameter(
                 'category', $cmdRes->options['categories']