Tasks.php
/**
     * Installs Wordpress.
     *
     * This task will download the core wordpress files for you. It is
     * automatically run by composer as a post-install-cmd so you really
     * shouldn't need to worry about it.
     *
     * But if you do want to call it, usage would look like:
     *
     * ```
     * ./robo fructify:install v4.*
     * ```
     *
     * @param  string $versionContraint A semantic version contraint.
     * @return void
     */
Installs Wordpress.
This task will download the core wordpress files for you. It is
automatically run by composer as a post-install-cmd so you really
shouldn't need to worry about it.

But if you do want to call it, usage would look like.

```
./robo fructify:install v4.

@param  string $versionContraint A semantic version contraint.
@return void
Installs Wordpress . This task will download the core wordpress files for you . It is automatically run by composer as a post - install - cmd so you really shouldn ' t need to worry about it . But if you do want to call it usage would look like . ` ` ` . / robo fructify : install v4 . @param string $versionContraint A semantic version contraint . @return void
public function fructifyInstall(string $versionContraint = '*')
    {
        if (!file_exists('./wp-includes/version.php'))
        {
            $version = $this->wpResolveVersionNo($versionContraint);
            $this->_exec('./vendor/bin/wp core download --version='.$version);
            @unlink('./license.txt');
            @unlink('./readme.html');
            @unlink('./wp-config-sample.php');
            @unlink('./wp-content/plugins/hello.php');
            $composer = Str::s(file_get_contents('./composer.json'));
            if (!$composer->contains('wpackagist-plugin/akismet'))
            {
                $this->_deleteDir(['./wp-content/plugins/akismet']);
            }
            if (!$composer->contains('wpackagist-theme/twentyseventeen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyseventeen']);
            }
            if (!$composer->contains('wpackagist-theme/twentysixteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentysixteen']);
            }
            if (!$composer->contains('wpackagist-theme/twentyfifteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfifteen']);
            }
            if (!$composer->contains('wpackagist-theme/twentyfourteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfourteen']);
            }
        }
    }
public function fructifyInstall ( string $ versionContraint = '*' ) { if ( ! file_exists ( './wp-includes/version.php' ) ) { $ version = $ this -> wpResolveVersionNo ( $ versionContraint ) ; $ this -> _exec ( './vendor/bin/wp core download --version=' . $ version ) ; @ unlink ( './license.txt' ) ; @ unlink ( './readme.html' ) ; @ unlink ( './wp-config-sample.php' ) ; @ unlink ( './wp-content/plugins/hello.php' ) ; $ composer = Str :: s ( file_get_contents ( './composer.json' ) ) ; if ( ! $ composer -> contains ( 'wpackagist-plugin/akismet' ) ) { $ this -> _deleteDir ( [ './wp-content/plugins/akismet' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyseventeen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyseventeen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentysixteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentysixteen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyfifteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyfifteen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyfourteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyfourteen' ] ) ; } } }
Installs Wordpress.
Installs Wordpress .
// Lets check if wordpress actually exists // Grab the resolved version number // Download the core wordpress files // Remove a few things we don't need // Read in the composer file and remove some of the bundled plugins // and themes unless of course they are actually referenced in the // composer requirements.