wpmu_admin_redirect_add_updated_param()WP 3.0.0

Deprecated from version 3.3.0. It is no longer supported and can be removed in future releases. Use add_query_arg() instead.

Adds an 'updated=true' argument to a URL.

No Hooks.

Return

String.

Usage

wpmu_admin_redirect_add_updated_param( $url );
$url(string)
Redirect URL.
Default: ''

Notes

Changelog

Since 3.0.0 Introduced.
Deprecated since 3.3.0 Use add_query_arg()

wpmu_admin_redirect_add_updated_param() code WP 6.5.2

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;
}