PhilippBaschke\ACFProInstaller\Plugin::addParameterToUrl PHP Method

addParameterToUrl() protected method

Adds the given parameter at the end of the given url. It only works with urls that already have parameters (e.g. test.com?p=true) because it uses & as a separation character.
protected addParameterToUrl ( string $url, string $parameter, string $value ) : string
$url string The url that should be appended
$parameter string The name of the parameter
$value string The value of the parameter
return string The url appended with ¶meter=value
    protected function addParameterToUrl($url, $parameter, $value)
    {
        $cleanUrl = $this->removeParameterFromUrl($url, $parameter);
        $urlParameter = '&' . $parameter . '=' . urlencode($value);
        return $cleanUrl .= $urlParameter;
    }