graceful_fail

Deprecated functionality to gracefully fail.

Description

graceful_fail( $message ); 

Parameters (1)

0. $message
The message.

Usage

  1. if ( !function_exists( 'graceful_fail' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-deprecated.php'; 
  3.  
  4. // The message. 
  5. $message = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = graceful_fail($message); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-deprecated.php  
  1. function graceful_fail( $message ) { 
  2. _deprecated_function( __FUNCTION__, '3.0.0', 'wp_die()' ); 
  3. $message = apply_filters( 'graceful_fail', $message ); 
  4. $message_template = apply_filters( 'graceful_fail_template',  
  5. '<!DOCTYPE html> 
  6. <html xmlns="http://www.w3.org/1999/xhtml"><head> 
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
  8. <title>Error!</title> 
  9. <style type="text/css"> 
  10. img { 
  11. border: 0; 
  12. body { 
  13. line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto; 
  14. text-align: center; 
  15. .message { 
  16. font-size: 22px; 
  17. width: 350px; 
  18. margin: auto; 
  19. </style> 
  20. </head> 
  21. <body> 
  22. <p class="message">%s</p> 
  23. </body> 
  24. </html>' ); 
  25. die( sprintf( $message_template, $message ) );