예제 #1
0
파일: warrior.php 프로젝트: evocateur/race
 function totalPledged($format = true)
 {
     $total = race_sum_donations($this->user);
     if ($format) {
         return wp_sprintf('<strong>$%d</strong> pledged so far', $total);
     }
     return $total;
 }
예제 #2
0
파일: widgets.php 프로젝트: evocateur/race
 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)));
         }
     }
 }