function id_projectPercentBar($attrs) { global $wpdb; if (isset($attrs['product'])) { $project_id = $attrs['product']; $project = new Deck($project_id); $post_id = $project->get_project_postid(); //$percent = $project->percent(); $percent = apply_filters('id_percentage_raised', $project->percent(), apply_filters('id_funds_raised', $project->get_project_raised(), $post_id, true), $post_id, apply_filters('id_project_goal', $project->the_goal(), $post_id, true)); $progress_bar = '<div class="ignitiondeck"><div class="progress-wrapper" style="clear: both;"> <div class="progress-percentage"> ' . $percent . '% </div> <div style="width: ' . $percent . '%" class="progress-bar"> </div> </div></div>'; } else { $progress_bar = null; } return $progress_bar; }