_deprecated_function( __FUNCTION__, '3.0', 'wp_die()' );
$message = apply_filters( 'graceful_fail', $message );
$message_template = apply_filters( 'graceful_fail_template',
-'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+'<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
}
return array_slice( $most_active, 0, $num );
}
-?>
+
+/**
+ * Redirect a user based on $_GET or $_POST arguments.
+ *
+ * The function looks for redirect arguments in the following order:
+ * 1) $_GET['ref']
+ * 2) $_POST['ref']
+ * 3) $_SERVER['HTTP_REFERER']
+ * 4) $_GET['redirect']
+ * 5) $_POST['redirect']
+ * 6) $url
+ *
+ * @since MU
+ * @deprecated 3.3.0
+ * @deprecated Use wp_redirect()
+ * @uses wpmu_admin_redirect_add_updated_param()
+ *
+ * @param string $url
+ */
+function wpmu_admin_do_redirect( $url = '' ) {
+ _deprecated_function( __FUNCTION__, '3.3' );
+
+ $ref = '';
+ if ( isset( $_GET['ref'] ) )
+ $ref = $_GET['ref'];
+ if ( isset( $_POST['ref'] ) )
+ $ref = $_POST['ref'];
+
+ if ( $ref ) {
+ $ref = wpmu_admin_redirect_add_updated_param( $ref );
+ wp_redirect( $ref );
+ exit();
+ }
+ if ( empty( $_SERVER['HTTP_REFERER'] ) == false ) {
+ wp_redirect( $_SERVER['HTTP_REFERER'] );
+ exit();
+ }
+
+ $url = wpmu_admin_redirect_add_updated_param( $url );
+ if ( isset( $_GET['redirect'] ) ) {
+ if ( substr( $_GET['redirect'], 0, 2 ) == 's_' )
+ $url .= '&action=blogs&s='. esc_html( substr( $_GET['redirect'], 2 ) );
+ } elseif ( isset( $_POST['redirect'] ) ) {
+ $url = wpmu_admin_redirect_add_updated_param( $_POST['redirect'] );
+ }
+ wp_redirect( $url );
+ exit();
+}
+
+/**
+ * Adds an 'updated=true' argument to a URL.
+ *
+ * @since MU
+ * @deprecated 3.3.0
+ * @deprecated Use add_query_arg()
+ *
+ * @param string $url
+ * @return string
+ */
+function wpmu_admin_redirect_add_updated_param( $url = '' ) {
+ _deprecated_function( __FUNCTION__, '3.3' );
+
+ if ( strpos( $url, 'updated=true' ) === false ) {
+ if ( strpos( $url, '?' ) === false )
+ return $url . '?updated=true';
+ else
+ return $url . '&updated=true';
+ }
+ return $url;
+}
+
+?>
\ No newline at end of file