public function setWordPressInstallDirectory(PackageEvent $event)
    {
        if ($this->getPackageName($event) != 'johnpbloch/wordpress') {
            return;
        }
        
        $composer = $event->getComposer();
        $rootPkg = $composer->getPackage();
        
        if (! $rootPkg) {
            return;
        }
        
        $extra = $rootPkg->getExtra();
        
        if (isset($extra['wordpress-install-dir']) && $extra['wordpress-install-dir']) {
            return;
        }
        
        $extra['wordpress-install-dir'] = static::$plugin->getPublicDirectory() . '/wp';
        
        $rootPkg->setExtra($extra);
        $composer->setPackage($rootPkg);
    }
public function setWordPressInstallDirectory(PackageEvent $event)
    {
        if ($this->getPackageName($event) != 'johnpbloch/wordpress') {
            return;
        }
        
        $composer = $event->getComposer();
        $rootPkg = $composer->getPackage();
        
        if (! $rootPkg) {
            return;
        }
        
        $extra = $rootPkg->getExtra();
        
        if (isset($extra['wordpress-install-dir']) && $extra['wordpress-install-dir']) {
            return;
        }
        
        $extra['wordpress-install-dir'] = static::$plugin->getPublicDirectory() . '/wp';
        
        $rootPkg->setExtra($extra);
        $composer->setPackage($rootPkg);
    }
public function setWordPressInstallDirectory ( PackageEvent $ event ) { if ( $ this -> getPackageName ( $ event ) != 'johnpbloch/wordpress' ) { return ; } $ composer = $ event -> getComposer ( ) ; $ rootPkg = $ composer -> getPackage ( ) ; if ( ! $ rootPkg ) { return ; } $ extra = $ rootPkg -> getExtra ( ) ; if ( isset ( $ extra [ 'wordpress-install-dir' ] ) && $ extra [ 'wordpress-install-dir' ] ) { return ; } $ extra [ 'wordpress-install-dir' ] = static :: $ plugin -> getPublicDirectory ( ) . '/wp' ; $ rootPkg -> setExtra ( $ extra ) ; $ composer -> setPackage ( $ rootPkg ) ; }
Set the WordPress installation directory.

@param  \Composer\EventDispatcher\Event $event
@return void
Set the WordPress installation directory .