updated etxlink, ctools, colorbox, computed_field
This commit is contained in:
@@ -140,7 +140,7 @@ function ctools_entity_from_field_get_children($parent_plugin, $parent) {
|
||||
|
||||
$plugin_entities = array(
|
||||
'to' => array($to_entity => $to_entity_info),
|
||||
'from' => array($from_entity => $from_entity_info)
|
||||
'from' => array($from_entity => $from_entity_info),
|
||||
);
|
||||
drupal_alter('ctools_entity_context', $plugins[$key], $plugin_entities, $key);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ function ctools_entity_from_query_string_context($context, $conf) {
|
||||
*/
|
||||
function ctools_entity_from_query_string_settings_form($form, &$form_state) {
|
||||
|
||||
//Get all avalible enity types
|
||||
// Get all avalible enity types.
|
||||
foreach (entity_get_info() as $key => $value) {
|
||||
$entity_types[$key] = $value['label'];
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ function ctools_entity_from_schema_get_children($parent_plugin, $parent) {
|
||||
$plugin_entities = array('to' => $from_entity_info, 'from' => $to_entity_info);
|
||||
$plugin_entities = array('to' => array($from_entity => $from_entity_info), 'from' => array($to_entity => $to_entity_info));
|
||||
drupal_alter('ctools_entity_context', $plugin, $plugin_entities, $plugin_id);
|
||||
$plugins[$plugin_id] = $plugin;
|
||||
$plugins[$plugin_id] = $plugin;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file relationships/term_parent.inc
|
||||
* @file
|
||||
* Plugin to provide an relationship handler for term parent.
|
||||
*/
|
||||
|
||||
|
@@ -31,7 +31,7 @@ function ctools_terms_from_node_context($context, $conf) {
|
||||
// Collect all terms for the chosen vocabulary and concatenate them.
|
||||
$node = $context->data;
|
||||
$terms = array();
|
||||
|
||||
|
||||
$fields = field_info_instances('node', $node->type);
|
||||
foreach ($fields as $name => $info) {
|
||||
$field_info = field_info_field($name);
|
||||
@@ -43,8 +43,24 @@ function ctools_terms_from_node_context($context, $conf) {
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($field_info['type'] == 'entityreference' && $field_info['settings']['target_type'] == 'taxonomy_term') {
|
||||
$items = field_get_items('node', $node, $name);
|
||||
if (is_array($items)) {
|
||||
$tids = array();
|
||||
foreach ($items as $item) {
|
||||
$tids[] = $item['target_id'];
|
||||
}
|
||||
|
||||
$term_objects = taxonomy_term_load_multiple($tids);
|
||||
foreach ($term_objects as $term) {
|
||||
if (empty($conf['vocabulary']) || in_array($term->vocabulary_machine_name, $conf['vocabulary'])) {
|
||||
$terms[] = $term->tid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty($terms)) {
|
||||
$all_terms = ctools_break_phrase(implode($conf['concatenator'], $terms));
|
||||
return ctools_context_create('terms', $all_terms);
|
||||
|
@@ -27,7 +27,7 @@ function ctools_user_category_edit_form_from_user_context($context, $conf) {
|
||||
return ctools_context_create_empty('user_edit_form', NULL);
|
||||
}
|
||||
|
||||
if(!empty($conf['category'])) {
|
||||
if (!empty($conf['category'])) {
|
||||
return ctools_context_create('user_edit_form', $context->data, array('category' => $conf['category']));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ function ctools_user_category_edit_form_from_user_settings_form($form, &$form_st
|
||||
|
||||
$categories = _user_categories();
|
||||
$options = array();
|
||||
foreach($categories as $category) {
|
||||
foreach ($categories as $category) {
|
||||
$options[$category['name']] = $category['title'];
|
||||
}
|
||||
$form['category'] = array(
|
||||
|
Reference in New Issue
Block a user