From: Christian Weiske Date: Wed, 14 Sep 2016 15:21:11 +0000 (+0200) Subject: add "slug" option X-Git-Tag: v0.0.5~1 X-Git-Url: https://git.cweiske.de/shpub.git/commitdiff_plain/d3445ebb4cb61395736733c2e18a5356e71e96cf add "slug" option --- diff --git a/src/shpub/Command/AbstractProps.php b/src/shpub/Command/AbstractProps.php index d1ef218..08dbc97 100644 --- a/src/shpub/Command/AbstractProps.php +++ b/src/shpub/Command/AbstractProps.php @@ -40,6 +40,17 @@ class Command_AbstractProps 'default' => null, ) ); + $cmd->addOption( + 'slug', + array( + 'short_name' => '-s', + 'long_name' => '--slug', + 'description' => 'URL path', + 'help_name' => 'PATH', + 'action' => 'StoreString', + 'default' => null, + ) + ); $cmd->addOption( 'syndication', array( @@ -77,6 +88,11 @@ class Command_AbstractProps 'category', $cmdRes->options['categories'] ); } + if ($cmdRes->options['slug'] !== null) { + $req->req->addPostParameter( + 'slug', $cmdRes->options['slug'] + ); + } if (count($cmdRes->options['syndication'])) { $req->addPostParameter( 'syndication', $cmdRes->options['syndication']