You are here

vimeo_video_uploader.install in Vimeo Video Uploader 7

Installation file for the Vimeo Video Uploader.

File

vimeo_video_uploader.install
View source
<?php

/**
 * @file
 * Installation file for the Vimeo Video Uploader.
 */

/**
 * Implements hook_disable().
 */
function vimeo_video_uploader_disable() {
  vimeo_video_uploader_data_remove();
}

/**
 * Implements hook_uninstall().
 */
function vimeo_video_uploader_uninstall() {
  vimeo_video_uploader_data_remove();
}

/**
 * Delete fields and fields data.
 */
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");
  }
}

Functions