function getJsonItemDetailsTaskgroup($jsonItem, $post, $lang)
{
    $jsonItem->additional_tasks_count = get_post_meta($post->ID, "taskgroup_additional_tasks_count", true);
    $jsonItem->subtask_term = getJsonTaskTerm(get_post_meta($post->ID, "taskgroup_subtask_term", true), $lang);
    return $jsonItem;
}
예제 #2
0
                $taskgroup_term = getJsonSubtaskgroupTerm(get_post_meta($tree_item->ID, "taskgroup_subtaskgroup_term", true), strtolower($lang));
                if ($taskgroup_term) {
                    $jsonItem->taskgroup_term = $taskgroup_term;
                    break;
                }
            }
        } else {
            $jsonItem->taskgroup_term = $taskgroup_term;
        }
        break;
    case "task":
        $jsonItem = getJsonItemDetailsTask($jsonItem, $mypost, strtolower($lang));
        $task_term = getJsonTaskTerm(get_post_meta($mypost->ID, "task_task_term", true), strtolower($lang));
        if (empty($task_term)) {
            foreach ($tree_array_orig as $tree_item) {
                $task_term = getJsonTaskTerm(get_post_meta($tree_item->ID, "taskgroup_subtask_term", true), strtolower($lang));
                if ($task_term) {
                    $jsonItem->task_term = $task_term;
                    break;
                }
            }
        } else {
            $jsonItem->task_term = $task_term;
        }
        $jsonItem->level = pof_normalize_task_level(get_post_meta($mypost->ID, "task_level", true));
        $jsonItem->leader_tasks = get_post_meta($mypost->ID, "leader_tasks_" . strtolower($lang), true);
        break;
}
$agegroup_id = 0;
if (!empty($agegroup)) {
    $agegroup_id = $agegroup->ID;