/** * Helper function to check whether the shortcode should be rendered or not * * @return type */ static function display_allowed() { global $rtmedia_query; $flag = !(is_home() || is_post_type_archive() || is_author()) && is_user_logged_in() && (is_rtmedia_upload_music_enabled() || is_rtmedia_upload_photo_enabled() || is_rtmedia_upload_video_enabled()) && (isset($rtmedia_query->is_upload_shortcode) && $rtmedia_query->is_upload_shortcode == true || is_rtmedia_bp_profile() && is_rtmedia_profile_media_enable() || is_rtmedia_bp_group() && is_rtmedia_group_media_enable()); $flag = apply_filters('before_rtmedia_uploader_display', $flag); return $flag; }
public function allowed_types($types) { if (isset($types[0]) && isset($types[0]['extensions'])) { if (is_rtmedia_upload_video_enabled() && strpos($this->video_extensions, $types[0]['extensions'])) { $types[0]['extensions'] .= $this->video_extensions; //Allow all types of video file to be uploded } if (is_rtmedia_upload_music_enabled() && strpos($this->music_extensions, $types[0]['extensions'])) { $types[0]['extensions'] .= $this->music_extensions; //Allow all types of music file to be uploded } } return $types; }
public function allowed_types($types) { if (isset($types[0]) && isset($types[0]['extensions'])) { if (is_rtmedia_upload_video_enabled()) { $types[0]['extensions'] .= ',mov,m4v,m2v,avi,mpg,flv,wmv,mkv,webm,ogv,mxf,asf,vob,mts,qt,mpeg,x-msvideo'; } //Allow all types of file to be uploded if (is_rtmedia_upload_music_enabled()) { $types[0]['extensions'] .= ',wma,ogg,wav,m4a'; } //Allow all types of file to be uploded } return $types; }