You are here

function vimeo_video_uploader_data_remove in Vimeo Video Uploader 7

Same name and namespace in other branches
  1. 8.4 vimeo_video_uploader.install \vimeo_video_uploader_data_remove()
  2. 8 vimeo_video_uploader.install \vimeo_video_uploader_data_remove()
  3. 7.2 vimeo_video_uploader.install \vimeo_video_uploader_data_remove()

Delete fields and fields data.

2 calls to vimeo_video_uploader_data_remove()
vimeo_video_uploader_disable in ./vimeo_video_uploader.install
Implements hook_disable().
vimeo_video_uploader_uninstall in ./vimeo_video_uploader.install
Implements hook_uninstall().

File

./vimeo_video_uploader.install, line 25
Installation file for the Vimeo Video Uploader.

Code

function vimeo_video_uploader_data_remove() {
  $field_vimeo_file_browse = field_info_field('field_vimeo_file_browse');
  if (!empty($field_vimeo_file_browse)) {
    field_delete_field("field_vimeo_file_browse");
  }
  $field_embeddedvideo = field_info_field('field_embeddedvideo');
  if (!empty($field_embeddedvideo)) {
    field_delete_field("field_embeddedvideo");
  }
  $vimeo_user_id = variable_get("vimeo_user_id");
  if (!empty($vimeo_user_id)) {
    variable_del("vimeo_user_id");
  }
  $vimeo_api_key = variable_get("vimeo_api_key");
  if (!empty($vimeo_api_key)) {
    variable_del("vimeo_api_key");
  }
  $vimeo_api_secret = variable_get("vimeo_api_secret");
  if (!empty($vimeo_api_secret)) {
    variable_del("vimeo_api_secret");
  }
  $vimeo_oauth_access_token = variable_get("vimeo_oauth_access_token");
  if (!empty($vimeo_oauth_access_token)) {
    variable_del("vimeo_oauth_access_token");
  }
  $vimeo_oauth_request_token_secret = variable_get("vimeo_oauth_request_token_secret");
  if (!empty($vimeo_oauth_request_token_secret)) {
    variable_del("vimeo_oauth_request_token_secret");
  }
  $vimeo_content_type_select = variable_get("vimeo_content_type_select");
  if (!empty($vimeo_content_type_select)) {
    variable_del("vimeo_content_type_select");
  }
}