public function getLoaderInstallPath(PackageInterface $package)
    {
        $config      = $this->getInstallerConfig($package);
        $installPath = 'wp-content/mu-plugins/';

        if (!$this->composer->getPackage()) {
            return $this->parseTemplate($installPath, $config);
        }

        $extra      = $this->composer->getPackage()->getExtra();
        $prettyName = !empty($config['vendor']) ? ($config['vendor'] . '/') : '';
        $prettyName = $prettyName . $config['name'];

        if (!empty($extra['installer-loader-paths'])) {
            $customPath = $this->resolveInstallPath($extra['installer-loader-paths'], $prettyName);

            if ($customPath !== false) {
                $installPath = $customPath;
            }
        }

        return $this->parseTemplate($installPath, $config);
    }
public function getLoaderInstallPath(PackageInterface $package)
    {
        $config      = $this->getInstallerConfig($package);
        $installPath = 'wp-content/mu-plugins/';

        if (!$this->composer->getPackage()) {
            return $this->parseTemplate($installPath, $config);
        }

        $extra      = $this->composer->getPackage()->getExtra();
        $prettyName = !empty($config['vendor']) ? ($config['vendor'] . '/') : '';
        $prettyName = $prettyName . $config['name'];

        if (!empty($extra['installer-loader-paths'])) {
            $customPath = $this->resolveInstallPath($extra['installer-loader-paths'], $prettyName);

            if ($customPath !== false) {
                $installPath = $customPath;
            }
        }

        return $this->parseTemplate($installPath, $config);
    }
public function getLoaderInstallPath ( PackageInterface $ package ) { $ config = $ this -> getInstallerConfig ( $ package ) ; $ installPath = 'wp-content/mu-plugins/' ; if ( ! $ this -> composer -> getPackage ( ) ) { return $ this -> parseTemplate ( $ installPath , $ config ) ; } $ extra = $ this -> composer -> getPackage ( ) -> getExtra ( ) ; $ prettyName = ! empty ( $ config [ 'vendor' ] ) ? ( $ config [ 'vendor' ] . '/' ) : '' ; $ prettyName = $ prettyName . $ config [ 'name' ] ; if ( ! empty ( $ extra [ 'installer-loader-paths' ] ) ) { $ customPath = $ this -> resolveInstallPath ( $ extra [ 'installer-loader-paths' ] , $ prettyName ) ; if ( $ customPath !== false ) { $ installPath = $ customPath ; } } return $ this -> parseTemplate ( $ installPath , $ config ) ; }
Gets the install path for the loader script of an MU plugin.

@param PackageInterface $package An instance of PackageInterface.

@return string|bool The install path, or `false` if the path cannot be resolved.
Gets the install path for the loader script of an MU plugin .