示例#1
0
 /**
  * Creates a database dump
  *
  * @author         Jeff Behnke <*****@*****.**>
  * @copyright  (c) 2009-15 ValidWebs.com
  *
  * Created:    12/5/15, 2:43 AM
  *
  * @param        $host
  *
  * @param string $file_name
  *
  * @return bool|string
  */
 public function create_db_backup($host, $file_name = '')
 {
     $backup_status = false;
     $host_info = $this->set_host_info($host);
     $is_env = isset($host_info['is_env']) ? $host_info['is_env'] : false;
     // Backups for WP Starter
     if ($is_env) {
         $dash_hosts = new vvv_dash_hosts();
         $env_configs = $dash_hosts->get_wp_starter_configs($host_info);
         $configs = isset($env_configs[$host_info['host']]) ? $env_configs[$host_info['host']] : false;
         $db['db_name'] = $configs['DB_NAME'];
         $db['db_user'] = $configs['DB_USER'];
         $db['db_password'] = $configs['DB_PASSWORD'];
         $backup_status = vvv_dash_wp_starter_backup($host_info, $db, $file_name);
     } else {
         // All other backups
         $backup_status = vvv_dash_wp_backup($host, $file_name);
     }
     return $backup_status;
 }
示例#2
0
	<table class="sites table table-responsive table-striped table-bordered table-hover">
		<thead>
		<tr>
			<th>Debug Mode</th>
			<th>Sites</th>
			<th>WP Version</th>
			<th>Actions</th>
		</tr>
		</thead>
		<?php 
foreach ($hosts as $key => $array) {
    if ('site_count' != $key) {
        $host_info = $vvv_dash->set_host_info($array['host']);
        $is_env = isset($host_info['is_env']) ? $host_info['is_env'] : false;
        $dash_hosts = new vvv_dash_hosts();
        $has_wp_config = $dash_hosts->wp_config_exists($host_info);
        if ($is_env) {
            $env_configs = $dash_hosts->get_wp_starter_configs($host_info);
            $env = isset($env_configs[$host_info['host']]["WORDPRESS_ENV"]) ? $env_configs[$host_info['host']]["WORDPRESS_ENV"] : false;
            if ($env) {
                $configs = $env_configs[$host_info['host']][$env];
                $array['is_wp'] = true;
                $array['debug'] = $configs['WP_DEBUG'];
            }
        }
        ?>
				<tr>
					<?php 
        if ('true' == $array['debug']) {
            ?>