Ejemplo n.º 1
0
 public function defaults()
 {
     global $wpdb, $_wt_options;
     $options = $_wt_options->options();
     parent::defaults(array(WORDTOUR_EVENTS, WORDTOUR_EVENTS_META));
     if (!empty($options["default_artist"]) && empty($this->data["event_artist_id"])) {
         $id = $options["default_artist"];
         $artist = new WT_Artist($id);
         $data = $artist->retrieve();
         if ($data) {
             $this->data["event_artist_id"] = $id;
             $this->data["artist_name"] = $data["artist_name"];
         }
     }
     if (!empty($options["default_tour"]) && empty($this->data["event_tour_id"])) {
         $id = $options["default_tour"];
         $tour = new WT_Tour($id);
         $data = $tour->retrieve();
         if ($tour) {
             $this->data["event_tour_id"] = $id;
             $this->data["tour_name"] = $data["tour_name"];
         }
     }
     if (!empty($options["default_venue"]) && empty($this->data["event_venue_id"])) {
         $id = $options["default_venue"];
         $venue = new WT_Venue($id);
         $data = $venue->retrieve();
         if ($data) {
             $this->data["event_venue_id"] = $id;
             $this->data["venue_name"] = $data["venue_name"];
         }
     }
     $this->data = array_merge($this->data, array("event_thumbnail" => "", "event_videos" => array(), "event_gallery" => array(), "event_category" => array(), "event_genre" => array(), "comment_status" => $options["allow_comments"] ? $options["allow_comments"] : $this->data["comment_status"], "rsvp_status" => $options["allow_rsvp"] ? $options["allow_rsvp"] : $this->data["rsvp_status"], "gallery_status" => $options["show_gallery"] ? $options["show_gallery"] : $this->data["gallery_status"], "flickr_status" => $options["show_flickr"] ? $options["show_flickr"] : $this->data["flickr_status"], "video_status" => $options["show_videos"] ? $options["show_videos"] : $this->data["video_status"], "post_status" => $options["show_posts"] ? $options["show_posts"] : $this->data["post_status"], "event_more_artists" => array()));
     return $this->data;
 }
Ejemplo n.º 2
0
 public function defaults()
 {
     global $_wt_options;
     parent::defaults(WORDTOUR_TRACKS);
     $default_artist = $_wt_options->options("default_artist");
     if (!empty($default_artist) && empty($this->data["track_artist_id"])) {
         $id = $_wt_options->options("default_artist");
         $artist = new WT_Artist($id);
         $data = $artist->retrieve();
         if ($data) {
             $this->data["track_artist_id"] = $id;
             $this->data["artist_name"] = $data["artist_name"];
         }
     }
     $this->data = array_merge($this->data, array("track_id" => "", "track_title" => "", "track_lyrics" => "", "track_genre" => array()));
     return $this->data;
 }
Ejemplo n.º 3
0
 public function defaults()
 {
     parent::defaults(WORDTOUR_ARTISTS);
     $this->data = array_merge($this->data, array("is_default" => 0, "artist_thumbnail" => "", "artist_videos" => array(), "artist_gallery" => array(), "artist_category" => array(), "artist_genre" => array()));
     return $this->data;
 }
Ejemplo n.º 4
0
 public function defaults()
 {
     parent::defaults(WORDTOUR_VENUES);
     $this->data = array_merge($this->data, array("is_default" => 0, "venue_thumbnail" => "", "venue_videos" => array(), "venue_gallery" => array(), "venue_category" => array()));
     return $this->data;
 }