wpmu_admin_redirect_add_updated_param( string $url =  ): string

This function has been deprecated. Use add_query_arg() instead.

Adds an ‘updated=true’ argument to a URL.

Description

See also

Parameters

$urlstringoptional
Redirect URL.

Default:''

Return

string

Source

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

Changelog

VersionDescription
3.3.0Use add_query_arg()
MU (3.0.0)Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.