diff --git a/includes/views_ctools_field_handler_field.inc b/includes/views_ctools_field_handler_field.inc index 5249ab8..3c76dde 100644 --- a/includes/views_ctools_field_handler_field.inc +++ b/includes/views_ctools_field_handler_field.inc @@ -16,7 +16,7 @@ class views_ctools_field_handler_field extends views_handler_field { if ($this->table == 'ctools_field_global') { $this->field_alias = 'ctools_field_markup_' . $this->position; - if(!empty($this->options['value']) && $value = $this->options['value']) { + if (!empty($this->options['value']) && $value = $this->options['value']) { $this->query->add_field('', "'$value'", $this->field_alias); } } @@ -27,7 +27,7 @@ class views_ctools_field_handler_field extends views_handler_field { function option_definition() { $options = parent::option_definition(); - $options['views_ctools_field'] = array('default' => array()); + $options['views_ctools_field'] = array('default' => array()); return $options; } @@ -45,7 +45,7 @@ class views_ctools_field_handler_field extends views_handler_field { $defaults = $plugin['defaults']; $this->options['views_ctools_field'] = $defaults; } - + $edit_form_callback = $plugin['module'] . '_' . $plugin_id . '_content_type_edit_form'; if (function_exists($edit_form_callback)) { $form['views_ctools_field'] = array( diff --git a/views_ctools_field.module b/views_ctools_field.module index 735cf44..f9ba896 100644 --- a/views_ctools_field.module +++ b/views_ctools_field.module @@ -41,7 +41,16 @@ function views_ctools_field_context_config($id = NULL) { ); if ($id) { - if (!empty($id) && array_key_exists($id, $config)) { + if (is_array($id)) { + $config_return = array(); + foreach ($id as $val) { + if (!empty($val) && array_key_exists($val, $config)) { + $config_return[$val] = $config[$val]; + } + } + return $config_return; + } + elseif (!empty($id) && array_key_exists($id, $config)) { return $config[$id]; } }