Sindbad~EG File Manager

Current Path : /usr/local/bin/wp_packages/packages/vendor/o2switch/wp-tiger/src/Services/
Upload File :
Current File : //usr/local/bin/wp_packages/packages/vendor/o2switch/wp-tiger/src/Services/WebsiteService.php

<?php

namespace WP_CLI\o2switch\Services;

use WP_CLI;

class WebsiteService
{
	/**
	 * Return details about the WordPress installation in the given directory.
	 * @when after_wp_load
	 * @return array
	 */
	public static function getWebsiteDetails()
	{
		$details = [];

		$opt = [
			'return' => true,
			'launch' => false,
			'exit_error' => false
		];

		$details['name'] = WP_CLI::runcommand('option get blogname', $opt);
		$details['description'] = WP_CLI::runcommand('option get blodescription', $opt);
		$details['version'] = WP_CLI::runcommand('core version', $opt);
		$details['url'] = WP_CLI::runcommand('option get siteurl', $opt);
		$details['domain'] = parse_url( $details['url'], PHP_URL_HOST );
		$details['plugins'] = json_decode(WP_CLI::runcommand('plugin list --format=json', $opt), true);
		$details['admins'] = json_decode(WP_CLI::runcommand('user list --role=administrator --format=json', $opt), true);
		$details['database'] = DatabaseService::getInfos();
		$details['checkUpdate'] = json_decode(WP_CLI::runcommand('core check-update --format=json', $opt), true);

		return $details;
	}
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists