</h3> <?php echo wpautop(do_shortcode($post->post_content), true); ?> <div class="clearfix"></div> </div><!--#task_breaker-dashboard-about--> <div id="task_breaker-dashboard-at-a-glance"> <?php // Total tasks. $total = intval(task_breaker_count_tasks($post->ID)); // Completed tasks. $completed = intval(task_breaker_count_tasks($post->ID, $type = 'completed')); // Remaining Tasks. $remaining = absint($total - $completed); ?> <h3> <?php _e('At a Glance', 'task_breaker'); ?> </h3> <ul> <li> <div class="task_breaker-dashboard-at-a-glance-box"> <h4> <span id="task_breaker-total-tasks-count" class="task_breaker-total-tasks"> <?php
function task_breaker_project_meta($project_id = 0) { if (0 === $project_id) { return; } $tasks_total = absint(task_breaker_count_tasks($project_id, $type = 'all')); $tasks_completed = absint(task_breaker_count_tasks($project_id, $type = 'completed')); $tasks_remaining = absint($tasks_total - $tasks_completed); if (0 !== $tasks_total) { $tasks_progress = ceil($tasks_completed / $tasks_total * 100); $args = array('tasks_total' => $tasks_total, 'tasks_completed' => $tasks_completed, 'tasks_remaining' => $tasks_remaining, 'tasks_progress' => $tasks_progress); task_breaker_locate_template('task-meta', $args); } // end if return; }