From: Christian Weiske Date: Thu, 15 Sep 2016 05:47:32 +0000 (+0200) Subject: Add "name" option for post titles X-Git-Tag: v0.0.6~2 X-Git-Url: https://git.cweiske.de/shpub.git/commitdiff_plain/86ba6dc123dd39735e70a6e6ff50b1c39dd6717b Add "name" option for post titles --- diff --git a/src/shpub/Command/AbstractProps.php b/src/shpub/Command/AbstractProps.php index 6d7ef3b..b560fbe 100644 --- a/src/shpub/Command/AbstractProps.php +++ b/src/shpub/Command/AbstractProps.php @@ -40,6 +40,17 @@ class Command_AbstractProps 'default' => [], ) ); + $cmd->addOption( + 'name', + array( + 'short_name' => '-n', + 'long_name' => '--name', + 'description' => 'Post title', + 'help_name' => 'TITLE', + 'action' => 'StoreString', + 'default' => null, + ) + ); $cmd->addOption( 'published', array( @@ -98,6 +109,11 @@ class Command_AbstractProps 'category', $cmdRes->options['categories'] ); } + if ($cmdRes->options['name'] !== null) { + $req->req->addPostParameter( + 'name', $cmdRes->options['name'] + ); + } if ($cmdRes->options['slug'] !== null) { $req->req->addPostParameter( 'slug', $cmdRes->options['slug']