From c6c8942ec0eab2640db15fdf19599f8a82c21e90 Mon Sep 17 00:00:00 2001 From: ozh Date: Mon, 11 May 2015 09:16:53 +0200 Subject: [PATCH] Allow interception of yourls_die() [skip ci] --- includes/functions-html.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/functions-html.php b/includes/functions-html.php index ac3a67e..fd3b642 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -423,6 +423,8 @@ function yourls_share_box( $longurl, $shorturl, $title = '', $text='', $shortlin * */ function yourls_die( $message = '', $title = '', $header_code = 200 ) { + yourls_do_action( 'pre_yourls_die', $message, $title, $header_code ); + yourls_status_header( $header_code ); if( !yourls_did_action( 'html_head' ) ) { @@ -431,6 +433,7 @@ function yourls_die( $message = '', $title = '', $header_code = 200 ) { } echo yourls_apply_filter( 'die_title', "

$title

" ); echo yourls_apply_filter( 'die_message', "

$message

" ); + // Hook into 'yourls_die' to add more elements or messages to that page yourls_do_action( 'yourls_die' ); if( !yourls_did_action( 'html_footer' ) ) { yourls_html_footer(); -- 2.45.0