Skip to content

Commit

Permalink
Merge pull request #401 from ernilambar/fix-theme-mod-examples
Browse files Browse the repository at this point in the history
Update theme commands examples
  • Loading branch information
swissspidy authored Feb 15, 2024
2 parents 4930c7a + 297d22f commit 0bf918b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/Theme_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Theme installed successfully.
* Activating 'twentysixteen'...
* Success: Switched to 'Twenty Sixteen' theme.
* Success: Installed 1 of 1 themes.
*
* # Get details of an installed theme
* $ wp theme get twentysixteen --fields=name,title,version
Expand Down Expand Up @@ -478,6 +479,7 @@ protected function filter_item_list( $items, $args ) {
* Theme installed successfully.
* Activating 'twentysixteen'...
* Success: Switched to 'Twenty Sixteen' theme.
* Success: Installed 1 of 1 themes.
*
* # Install from a local zip file
* $ wp theme install ../my-theme.zip
Expand Down Expand Up @@ -860,22 +862,22 @@ public function delete( $args, $assoc_args ) {
* * update
* * version
* * update_version
* * auto_update
*
* These fields are optionally available:
*
* * update_package
* * update_id
* * title
* * description
* * auto_update
*
* ## EXAMPLES
*
* # List themes
* # List inactive themes.
* $ wp theme list --status=inactive --format=csv
* name,status,update,version,update_version
* twentyfourteen,inactive,none,1.7,
* twentysixteen,inactive,available,1.1,
* name,status,update,version,update_version,auto_update
* twentyfourteen,inactive,none,3.8,,off
* twentysixteen,inactive,available,3.0,3.1,off
*
* @subcommand list
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Theme_Mod_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* # Set the 'background_color' theme mod to '000000'.
* $ wp theme mod set background_color 000000
* Success: Theme mod background_color set to 000000
* Success: Theme mod background_color set to 000000.
*
* # Get single theme mod in JSON format.
* $ wp theme mod get background_color --format=json
Expand Down Expand Up @@ -231,7 +231,7 @@ public function remove( $args = array(), $assoc_args = array() ) {
*
* # Set theme mod
* $ wp theme mod set background_color 000000
* Success: Theme mod background_color set to 000000
* Success: Theme mod background_color set to 000000.
*/
public function set( $args = array(), $assoc_args = array() ) {
list( $mod, $value ) = $args;
Expand Down

0 comments on commit 0bf918b

Please sign in to comment.