wpseek.com
A WordPress-centric search engine for devs and theme authors



wpmu_admin_redirect_add_updated_param › WordPress Function

Since
Deprecated3.3.0
wpmu_admin_redirect_add_updated_param ( $url = '' )
Parameters:
  • (string) $url Optional. Redirect URL. Default empty.
    Required: No
    Default: (empty)
See:
Returns:
  • (string)
Defined at:
Codex:
Change Log:
  • MU

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



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