Adds an ‘updated=true’ argument to a URL.
$urlstringoptional
Default:''
function wpmu_admin_redirect_add_updated_param( $url = '' ) {
_deprecated_function( __FUNCTION__, '3.3.0', 'add_query_arg()' );
if ( ! str_contains( $url, 'updated=true' ) ) {
if ( ! str_contains( $url, '?' ) )
return $url . '?updated=true';
else
return $url . '&updated=true';
}
return $url;
}
| Version | Description |
|---|---|
| 3.3.0 | Use add_query_arg() |
| MU (3.0.0) | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wpmu_admin_redirect_add_updated_param