install() public method

public install ( $args, $assoc_args )
Esempio n. 1
0
 /**
  * Install a plugin.
  *
  * ## OPTIONS
  *
  * <plugin|zip|url>...
  * : A plugin slug, the path to a local zip file, or URL to a remote zip file.
  *
  * [--version=<version>]
  * : If set, get that particular version from wordpress.org, instead of the
  * stable version.
  *
  * [--force]
  * : If set, the command will overwrite any installed version of the plugin, without prompting
  * for confirmation.
  *
  * [--activate]
  * : If set, the plugin will be activated immediately after install.
  *
  * [--activate-network]
  * : If set, the plugin will be network activated immediately after install
  *
  * ## EXAMPLES
  *
  *     # Install the latest version from wordpress.org and activate
  *     wp plugin install bbpress --activate
  *
  *     # Install the development version from wordpress.org
  *     wp plugin install bbpress --version=dev
  *
  *     # Install from a local zip file
  *     wp plugin install ../my-plugin.zip
  *
  *     # Install from a remote zip file
  *     wp plugin install http://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
  */
 function install($args, $assoc_args)
 {
     if (!is_dir(WP_PLUGIN_DIR)) {
         wp_mkdir_p(WP_PLUGIN_DIR);
     }
     parent::install($args, $assoc_args);
 }
Esempio n. 2
0
 /**
  * Install a theme.
  *
  * ## OPTIONS
  *
  * <theme|zip|url>...
  * : A theme slug, the path to a local zip file, or URL to a remote zip file.
  *
  * [--version=<version>]
  * : If set, get that particular version from wordpress.org, instead of the
  * stable version.
  *
  * [--force]
  * : If set, the command will overwrite any installed version of the theme, without prompting
  * for confirmation.
  *
  * [--activate]
  * : If set, the theme will be activated immediately after install.
  *
  * ## EXAMPLES
  *
  *     # Install the latest version from wordpress.org and activate
  *     wp theme install twentytwelve --activate
  *
  *     # Install from a local zip file
  *     wp theme install ../my-theme.zip
  *
  *     # Install from a remote zip file
  *     wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
  */
 function install($args, $assoc_args)
 {
     $theme_root = get_theme_root();
     if ($theme_root && !is_dir($theme_root)) {
         wp_mkdir_p($theme_root);
         register_theme_directory($theme_root);
     }
     parent::install($args, $assoc_args);
 }
Esempio n. 3
0
File: plugin.php Progetto: nb/wp-cli
 /**
  * Install a plugin.
  *
  * ## OPTIONS
  *
  * <plugin|zip|url>...
  * : A plugin slug, the path to a local zip file, or URL to a remote zip file.
  *
  * [--version=<version>]
  * : If set, get that particular version from wordpress.org, instead of the
  * stable version.
  *
  * [--force]
  * : If set, the command will overwrite any installed version of the plugin, without prompting
  * for confirmation.
  *
  * [--activate]
  * : If set, the plugin will be activated immediately after install.
  *
  * ## EXAMPLES
  *
  *     # Install the latest version from wordpress.org and activate
  *     wp plugin install bbpress --activate
  *
  *     # Install the development version from wordpress.org
  *     wp plugin install bbpress --version=dev
  *
  *     # Install from a local zip file
  *     wp plugin install ../my-plugin.zip
  *
  *     # Install from a remote zip file
  *     wp plugin install http://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
  */
 function install($args, $assoc_args)
 {
     parent::install($args, $assoc_args);
 }