/**
  *Load all functions that are needed for both front and backend
  **/
 public function init()
 {
     if (isset($_GET['avia_mode'])) {
         AviaBuilder::$mode = esc_attr($_GET['avia_mode']);
     }
     $this->createShortcode();
     $this->addActions();
     AviaStoragePost::generate_post_type();
     //hook into the media uploader. we always need to call this for several hooks to be active
     new AviaMedia();
     //on ajax call load the functions that are usually only loaded on new post and edit post screen
     if (AviaHelper::is_ajax()) {
         $this->admin_init();
     }
 }