for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PressCLI\Command;
use PressCLI\Option\Configuration;
class PostInstall
{
/**
* Executes the post install commands.
*/
public static function executeCommands()
$config = Configuration::get();
// Run commands.
foreach ($config['commands']['postInstall'] as $command) {
system($command);
}
* Executes the post install theme commands.
public static function executeThemeCommands()
$rootDir = getcwd();
$themeDir = "{$rootDir}/wp-content/themes/{$config['theme']['name']}";
// Change into the theme directory.
chdir($themeDir);
foreach ($config['commands']['postInstallTheme'] as $command) {
// Change back to root directory.
chdir($rootDir);