WordPress开发者和主题制作者的搜索引擎



wpmu_admin_redirect_add_updated_param ›

Since3.0.0
已弃用3.3.0
wpmu_admin_redirect_add_updated_param ( $url = '' )
参数:
  • (string) $url Optional. Redirect URL. Default empty.
    Required: No
    默认: (empty)
查看:
返回:
  • (string)
定义在:
文档:
Change Log:
  • MU

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



源码

function wpmu_admin_redirect_add_updated_param( $url = '' ) {
	_deprecated_function( __FUNCTION__, '3.3.0', 'add_query_arg()' );

	if ( strpos( $url, 'updated=true' ) === false ) {
		if ( strpos( $url, '?' ) === false )
			return $url . '?updated=true';
		else
			return $url . '&updated=true';
	}
	return $url;
}