custer format output works with numbers
This commit is contained in:
@@ -15,10 +15,15 @@ if (!defined('ABSPATH')) {
|
||||
*
|
||||
*/
|
||||
function return_result($output) {
|
||||
if (is_array($output) && count($output) === 0)
|
||||
if (is_array($output) && count($output) === 0) {
|
||||
$output = '';
|
||||
if (!is_string($output))
|
||||
}
|
||||
if (is_numeric($output)) {
|
||||
$output = (string)$output;
|
||||
}
|
||||
if (!is_string($output)) {
|
||||
$output = json_encode($output, JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
return esc_html($output);
|
||||
}
|
||||
|
||||
@@ -45,8 +50,7 @@ function format_user_info($query, &$current_user, $user_id) {
|
||||
|
||||
|
||||
/*
|
||||
* check if it's an acf field, and a date
|
||||
* second method : check what get_field_object() returns
|
||||
* check if it's an acf field
|
||||
*
|
||||
*/
|
||||
$acf_id = 'user_'.$user_id;
|
||||
|
||||
Reference in New Issue
Block a user