graceful_fail

The timeline below displays how wordpress function graceful_fail has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Deprecated functionality to gracefully fail.
 *
 * @since MU (3.0.0)
 * @deprecated 3.0.0 Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}

WordPress Version: 4.9

/**
 * Deprecated functionality to gracefully fail.
 *
 * @since MU (3.0.0)
 * @deprecated 3.0.0 Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}

WordPress Version: 4.6

/**
 * Deprecated functionality to gracefully fail.
 *
 * @since MU
 * @deprecated 3.0.0 Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}

WordPress Version: 4.4

/**
 * Deprecated functionality to gracefully fail.
 *
 * @since MU
 * @deprecated 3.0.0 Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}

WordPress Version: 3.9

/**
 * @since MU
 * @deprecated 3.0.0
 * @deprecated Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}

WordPress Version: 3.7

/**
 * @since MU
 * @deprecated 3.0.0
 * @deprecated Use wp_die()
 * @see wp_die()
 */
function graceful_fail($message)
{
    _deprecated_function(__FUNCTION__, '3.0', 'wp_die()');
    $message = apply_filters('graceful_fail', $message);
    $message_template = apply_filters('graceful_fail_template', '<!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>
<style type="text/css">
img {
	border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
	font-size: 22px;
	width: 350px;
	margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>');
    die(sprintf($message_template, $message));
}