函数原型
add_query_arg( $args ): string
函数描述
Retrieves a modified URL query string.
是否弃用
未弃用
函数参数
-
$key
string|array
Required - Either a query variable key, or an associative array of query variables.
-
$value
string
Optional - Either a query variable value, or a URL to act upon.
-
$url
string
Optional - A URL to act upon.
函数返回值
string New URL query string (unescaped).
函数位置
File: wp-includes/functions.php.
函数源码
add_query_arg( 'key', 'value', 'http://example.com' );源码链接
变更日志
| Version | Description |
|---|---|
| 5.3.0 | Formalized the existing and already documented parameters by adding ...$args to the function signature. |
| 1.5.0 | Introduced. |

