Same name and namespace in other branches
  1. 7.x-1.x color_field.drush.inc \drush_color_field_plugin_download() 1 comment

Commands to download a Color Picker plugin.

File

./color_field.drush.inc, line 87

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);
    }
}