src/includes/classes/Core/Utils/UrlQuery.php
public function addArgs(array $new_args, string $url_uri_qsl): string
    {
        $url_uri_qsl = $this->c::parseUrl($url_uri_qsl);
        $args        = []; // Initialize.

        if (isset($url_uri_qsl['query'][0])) {
            $args = $this->parse($url_uri_qsl['query']);
        }
        $args                 = array_merge($args, $new_args);
        $url_uri_qsl['query'] = $this->build($args);
        $url_uri_qsl          = $this->c::unparseUrl($url_uri_qsl);

        return $url_uri_qsl;
    }
public function addArgs(array $new_args, string $url_uri_qsl): string
    {
        $url_uri_qsl = $this->c::parseUrl($url_uri_qsl);
        $args        = []; // Initialize.

        if (isset($url_uri_qsl['query'][0])) {
            $args = $this->parse($url_uri_qsl['query']);
        }
        $args                 = array_merge($args, $new_args);
        $url_uri_qsl['query'] = $this->build($args);
        $url_uri_qsl          = $this->c::unparseUrl($url_uri_qsl);

        return $url_uri_qsl;
    }
Add query arg(s) to a URL.

@since 150424 Initial release.

@param array  $new_args    Query args to add (not URL-encoded).
@param string $url_uri_qsl Input URL, URI, or query string w/ a leading `?`.

@return string The `$url_uri_qsl` w/ new query arg(s).