Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public static function executeThemeCommands() |
||
25 | { |
||
26 | $config = Configuration::get(); |
||
27 | $rootDir = getcwd(); |
||
28 | $themeDir = "{$rootDir}/wp-content/themes/{$config['theme']['name']}"; |
||
29 | |||
30 | // Change into the theme directory. |
||
31 | chdir($themeDir); |
||
32 | |||
33 | // Run commands. |
||
34 | foreach ($config['commands']['postInstallTheme'] as $command) { |
||
35 | system($command); |
||
36 | } |
||
37 | |||
38 | // Change back to root directory. |
||
39 | chdir($rootDir); |
||
40 | } |
||
41 | } |
||
42 |