Example #1
0
 /**
  * @inheritdoc
  */
 public function question(Config $config, IO $io)
 {
     if ($config['env-example'] === 'ask') {
         $lines = array('Do you want to save .env.example file to', 'your project folder?');
         return $io->ask($lines, true);
     }
     return true;
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function question(Config $config, IO $io)
 {
     if ($config['move-content'] !== 'ask') {
         return true;
     }
     $to = str_replace('\\', '/', $this->paths['wp-content']);
     $full = str_replace('\\', '/', $this->paths['root']) . '/' . ltrim($to, '/');
     $lines = array('Do you want to move default plugins and themes from', 'WordPress package wp-content dir to content folder:', '"' . $full . '"');
     return $io->ask($lines, true);
 }
Example #3
0
 /**
  * Asks to user what to do in case of unknown dropins.
  * Question is different based on situations.
  *
  * @param  string $name
  * @param  int    $question
  * @return bool
  */
 private function ask($name, $question = 0)
 {
     switch ($question) {
         case 2:
             $lines = array("{$name} is not a core supported locale for WP " . $this->config['wp-version'], "Do you want to proceed with {$name}.php anyway?");
             break;
         case 1:
             $lines = array('WP Starter failed to get languages from wordpress.org API,', "so it isn't possible to verify that {$name} is a supported locale.", "Do you want to proceed with {$name}.php anyway?");
             break;
         case 0:
         default:
             $lines = array("{$name} seems not a valid dropin file.", "Do you want to proceed with it anyway?");
             break;
     }
     return $this->io->ask($lines, false);
 }
Example #4
0
 /**
  * @inheritdoc
  */
 public function question(Config $config, IO $io)
 {
     $this->found = false;
     if ($config['gitignore'] === "ask") {
         $lines = array('Do you want to create a .gitignore file that makes Git ignore', ' - files that contain sensible data (wp-config.php, .env)', ' - WordPress package folder', ' - WordPress content folder');
         return $io->ask($lines, true);
     }
     return true;
 }
Example #5
0
 /**
  * @return bool
  */
 private function askForRegister()
 {
     $lines = array('Do you want to register WordPress package wp-content folder', 'as additional theme folder for your project?');
     return $this->io->ask($lines, true);
 }