WP_CLI\CommandWithUpgrade::status PHP Method

status() public method

public status ( $args )
    function status($args)
    {
        // Force WordPress to check for updates
        call_user_func($this->upgrade_refresh);
        if (empty($args)) {
            $this->status_all();
        } else {
            $this->status_single($args);
        }
    }

Usage Example

Example #1
0
 /**
  * See the status of one or all themes.
  *
  * ## OPTIONS
  *
  * [<theme>]
  * : A particular theme to show the status for.
  *
  * ## EXAMPLES
  *
  *     $ wp theme status twentysixteen
  *     Theme twentysixteen details:
  *     		Name: Twenty Sixteen
  *     		Status: Inactive
  *     		Version: 1.2
  *     		Author: the WordPress team
  */
 function status($args)
 {
     if (isset($args[0])) {
         $theme = $this->fetcher->get_check($args[0]);
         $errors = $theme->errors();
         if (is_wp_error($errors)) {
             $message = $errors->get_error_message();
             WP_CLI::error($message);
         }
     }
     parent::status($args);
 }
All Usage Examples Of WP_CLI\CommandWithUpgrade::status