You are here

function drush_color_field_plugin_download in Color Field 7

Same name and namespace in other branches
  1. 7.2 color_field.drush.inc \drush_color_field_plugin_download()

Commands to download a Color Picker plugin.

File

./color_field.drush.inc, line 87
Drush integration for color fields plugin.

Code

function drush_color_field_plugin_download($path = 'sites/all/libraries', $plugin) {
  $options = array(
    'simple' => 'Simple Color Picker',
    'eyecon' => 'EyeCon Color Picker',
    'dematte' => 'Dematte Color Picker',
    'spectrum' => 'Spectrum Color Picker',
  );
  $choice = drush_choice($options, dt('Which plugin do you want to download?'));
  if ($choice) {
    drush_print(dt('Downloading @choice...', array(
      '@choice' => $options[$choice],
    )));
    $args = func_get_args();
    call_user_func_array('drush_color_field_' . $choice, $args);
  }
}