Skip to content

Commit 253b5ad

Browse files
Copilotswissspidy
andcommitted
Update documentation to reflect support for WordPress.org directory URLs
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 204db5b commit 253b5ad

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎src/Plugin_Command.php‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ protected function filter_item_list( $items, $args ) {
994994
* ## OPTIONS
995995
*
996996
* <plugin|zip|url>...
997-
* : One or more plugins to install. Accepts a plugin slug, the path to a local zip file, or a URL to a remote zip file.
997+
* : One or more plugins to install. Accepts a plugin slug, the path to a local zip file, a URL to a remote zip file, or a URL to a WordPress.org plugin directory.
998998
*
999999
* [--version=<version>]
10001000
* : If set, get that particular version from wordpress.org, instead of the
@@ -1073,6 +1073,16 @@ protected function filter_item_list( $items, $args ) {
10731073
* Removing the old version of the plugin...
10741074
* Plugin updated successfully
10751075
* Success: Installed 1 of 1 plugins.
1076+
*
1077+
* # Install from a WordPress.org plugin directory URL
1078+
* $ wp plugin install https://wordpress.org/plugins/akismet/
1079+
* Detected WordPress.org plugins directory URL, using slug: akismet
1080+
* Installing Akismet Anti-spam: Spam Protection (3.1.11)
1081+
* Downloading install package from https://downloads.wordpress.org/plugin/akismet.3.1.11.zip...
1082+
* Unpacking the package...
1083+
* Installing the plugin...
1084+
* Plugin installed successfully.
1085+
* Success: Installed 1 of 1 plugins.
10761086
*/
10771087
public function install( $args, $assoc_args ) {
10781088

‎src/Theme_Command.php‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ protected function filter_item_list( $items, $args ) {
496496
* ## OPTIONS
497497
*
498498
* <theme|zip|url>...
499-
* : One or more themes to install. Accepts a theme slug, the path to a local zip file, or a URL to a remote zip file.
499+
* : One or more themes to install. Accepts a theme slug, the path to a local zip file, a URL to a remote zip file, or a URL to a WordPress.org theme directory.
500500
*
501501
* [--version=<version>]
502502
* : If set, get that particular version from wordpress.org, instead of the
@@ -534,6 +534,16 @@ protected function filter_item_list( $items, $args ) {
534534
*
535535
* # Install from a remote zip file
536536
* $ wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
537+
*
538+
* # Install from a WordPress.org theme directory URL
539+
* $ wp theme install https://wordpress.org/themes/twentysixteen/
540+
* Detected WordPress.org themes directory URL, using slug: twentysixteen
541+
* Installing Twenty Sixteen (1.2)
542+
* Downloading install package from http://downloads.wordpress.org/theme/twentysixteen.1.2.zip...
543+
* Unpacking the package...
544+
* Installing the theme...
545+
* Theme installed successfully.
546+
* Success: Installed 1 of 1 themes.
537547
*/
538548
public function install( $args, $assoc_args ) {
539549
if ( count( $args ) > 1 && Utils\get_flag_value( $assoc_args, 'activate', false ) ) {

0 commit comments

Comments
 (0)