graceful_fail_template

The WordPress Core graceful fail template hook.

Description

Parameters (1)

0. $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 — Optional. (string) => 'Error!

%s

'
The 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.

Usage

To run the hook, copy the example below.
  1. $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 = 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 ); 
  2.  
  3. if ( !empty( $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 ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the graceful_fail_template callback 
  2. function filter_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 ) { 
  3. // make filter magic happen here... 
  4. return $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
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'graceful_fail_template', 'filter_graceful_fail_template', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'graceful_fail_template', 'filter_graceful_fail_template', 10, 1 ); 

Defined (1)

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

/wp-includes/ms-deprecated.php  
  1. $message_template = apply_filters( 'graceful_fail_template',