From 381a979bd441d8ffbed46807c9f5598987093a49 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 15 Sep 2016 07:51:14 +0200 Subject: [PATCH] Add "updated" option --- src/shpub/Command/AbstractProps.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/shpub/Command/AbstractProps.php b/src/shpub/Command/AbstractProps.php index b560fbe..0184c10 100644 --- a/src/shpub/Command/AbstractProps.php +++ b/src/shpub/Command/AbstractProps.php @@ -61,6 +61,16 @@ class Command_AbstractProps 'default' => null, ) ); + $cmd->addOption( + 'updated', + array( + 'long_name' => '--updated', + 'description' => 'Update date', + 'help_name' => 'DATE', + 'action' => 'StoreString', + 'default' => null, + ) + ); $cmd->addOption( 'slug', array( @@ -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'] -- 2.30.2