- added debug function
- fixed issues in acf fields use
This commit is contained in:
@@ -8,12 +8,14 @@ if (!defined('ABSPATH')) {
|
||||
}
|
||||
|
||||
function extract_if_array_size_one_CIPF($value) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
if (is_array($value) && count($value) === 1)
|
||||
return reset($value);
|
||||
return $value;
|
||||
}
|
||||
|
||||
function merge_two_arrays_CIPF($array1, $array2) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$new_array = $array1;
|
||||
foreach ($array2 as $key2 => $value2) {
|
||||
$value = extract_if_array_size_one_CIPF($value2);
|
||||
@@ -38,6 +40,7 @@ function merge_two_arrays_CIPF($array1, $array2) {
|
||||
|
||||
|
||||
function output_list_front_CIPF($array) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$output = '<ul>';
|
||||
foreach ($array as $key => $value) {
|
||||
if (str_starts_with($key, '_'))
|
||||
@@ -59,6 +62,7 @@ function output_list_front_CIPF($array) {
|
||||
|
||||
|
||||
function format_user_info_CIPF($output, $query, &$current_user, $user_id) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$output_date_format = PLGNTLS_class::USER_INFO_DATE_FORMAT;
|
||||
|
||||
$is_acf = false;
|
||||
@@ -127,6 +131,7 @@ function format_user_info_CIPF($output, $query, &$current_user, $user_id) {
|
||||
*
|
||||
*/
|
||||
function current_user_infos_CIPF($atts) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
if (!is_user_logged_in())
|
||||
return ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user