git.cweiske.de
/
shpub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5d91b8
)
Add "name" option for post titles
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 15 Sep 2016 05:47:32 +0000
(07:47 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 15 Sep 2016 05:47:32 +0000
(07:47 +0200)
src/shpub/Command/AbstractProps.php
patch
|
blob
|
history
diff --git
a/src/shpub/Command/AbstractProps.php
b/src/shpub/Command/AbstractProps.php
index 6d7ef3b8c27c346ca87f0cff8feedafbe56a70ea..b560fbefa45fcce9563ef46353eada8e74ebebb0 100644
(file)
--- a/
src/shpub/Command/AbstractProps.php
+++ b/
src/shpub/Command/AbstractProps.php
@@
-40,6
+40,17
@@
class Command_AbstractProps
'default' => [],
)
);
'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(
$cmd->addOption(
'published',
array(
@@
-98,6
+109,11
@@
class Command_AbstractProps
'category', $cmdRes->options['categories']
);
}
'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']
if ($cmdRes->options['slug'] !== null) {
$req->req->addPostParameter(
'slug', $cmdRes->options['slug']