_scalar_wp_die_handler()
Kills WordPress execution and displays an error message.
This is the handler for wp_die() when processing APP requests.
Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
_scalar_wp_die_handler( $message, $title, $args );
- $message(строка)
- Response to print.
По умолчанию: empty string - $title(строка)
- Error title (unused).
По умолчанию: empty string - $args(строка|массив)
- Arguments to control behavior.
По умолчанию: empty array
Список изменений
| С версии 3.4.0 | Введена. |
| С версии 5.1.0 | Added the $title and $args parameters. |
Код _scalar_wp_die_handler() scalar wp die handler WP 6.9
function _scalar_wp_die_handler( $message = '', $title = '', $args = array() ) {
list( $message, $title, $parsed_args ) = _wp_die_process_input( $message, $title, $args );
if ( $parsed_args['exit'] ) {
if ( is_scalar( $message ) ) {
die( (string) $message );
}
die();
}
if ( is_scalar( $message ) ) {
echo (string) $message;
}
}