coresocial_ajax_live_handler_error
Developer Knowledge Level
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
PHP
Definition
do_action( "coresocial_ajax_live_handler_error", $error, $message, $code, $data );
coreSocial 4.0 — core/basic/AJAX.php:290
Arguments
Name
Type
Description
$error
string
Error identifier.
$message
string
Resolved error message.
$code
int
HTTP response status.
$data
array
Context array containing request, item, uid, and data keys.
Fires in process_error() immediately before the plugin sends its JSON error response and exits. An empty message has already been replaced with the default message.
This action covers errors routed through process_error(); paths that call error() directly do not emit it. It cannot change the response by returning a value.
Example
add_action( 'coresocial_ajax_live_handler_error', function ( $error, $message, $code, $data ) {
error_log( sprintf( 'coreSocial error %s (HTTP %d)', $error, $code ) );
}, 10, 4 );