function totalPledged($format = true) { $total = race_sum_donations($this->user); if ($format) { return wp_sprintf('<strong>$%d</strong> pledged so far', $total); } return $total; }
function configure_instance() { global $post, $user; $this->validate($post); if (array_key_exists('runner', $_GET)) { $user = $_GET['runner']; $this->valid_content = true; } if ($this->valid_content) { global $user; $this->set_user($user); if ($this->user) { $progress = race_sum_donations($this->user); $this->set_args(array('progress' => $progress, 'goal' => $this->profile['goal'], 'ticks' => array(100, 50, 75, 25))); } } }