Esempio n. 1
0
function race_sandbox_class($c)
{
    // remove date crap, untagged
    // remove ids of -1, or - dangling at end
    $c = preg_grep('/(^[ymdh]\\d{2,4}|untagged|-(-1)?)$/', $c, PREG_GREP_INVERT);
    // aleph
    if (is_profile()) {
        $c[] = "profile";
    } else {
        if (is_user_list()) {
            $c[] = "userlist";
        }
    }
    return $c;
}
Esempio n. 2
0
 function configure_instance()
 {
     $is_profile = is_profile();
     if (is_user_list() || $is_profile) {
         global $post;
         $this->validate($post);
         if ($this->valid_content && $is_profile) {
             global $user;
             $this->set_user($user);
         }
         if ($this->valid_content) {
             $this->set_args(array('path' => $is_profile ? 'donations/online' : 'warriors/current', 'key' => $is_profile ? 'ID' : 'post_parent'));
             // add filter for customization
             add_filter('race_submenu', array(&$this, 'filter_submenu'));
         }
     }
 }