Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_die [ WordPress Function ]

wp_die ( $message = '', $title = '', $args = array() )
Parameters:
  • (string) $message Error message.
  • (string) $title Error title.
  • (string|array) $args Optional arguments to control behavior.
Defined at:



Kill WordPress execution and display HTML message with error message.

This function complements the die() PHP function. The difference is that HTML will be displayed to the user. It is recommended to use this function only, when the execution should not continue any further. It is not recommended to call this function very often and try to handle as many errors as possible silently.

Source


<?php
function wp_die$message ''$title ''$args = array() ) {
    if ( 
defined'DOING_AJAX' ) && DOING_AJAX )
        
$function apply_filters'wp_die_ajax_handler''_ajax_wp_die_handler' );
    elseif ( 
defined'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
        
$function apply_filters'wp_die_xmlrpc_handler''_xmlrpc_wp_die_handler' );
    elseif ( 
defined'APP_REQUEST' ) && APP_REQUEST )
        
$function apply_filters'wp_die_app_handler''_scalar_wp_die_handler' );
    else
        
$function apply_filters'wp_die_handler''_default_wp_die_handler' );

    
call_user_func$function$message$title$args );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics