Skip to content
This repository
  • 2 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
3  modules/tap/includes/tourml.class.inc
@@ -73,7 +73,7 @@ class TourML {
73 73 {
74 74 global $language;
75 75 foreach($this->assets as $k => $asset) {
76   - $asset = module_invoke_all('tourml_asset', $asset);
  76 + module_invoke_all('tourml_asset', $asset);
77 77 $this->assets[$k]['rendered'] = theme('tap_tourml_asset', array(
78 78 'asset' => $asset,
79 79 'language' => $language->language,
@@ -121,6 +121,7 @@ class TourML {
121 121 }
122 122 break;
123 123 case 'tap_tourml_asset':
  124 + if (empty($field['#items'])) break;
124 125 $prefix = $field['#bundle'] . '-' . $field['#field_name'] . '-';
125 126
126 127 // Build an array of assets that will be rendered after all stops
9 modules/tap/tap.api.php
@@ -6,6 +6,15 @@
6 6 */
7 7
8 8 /**
  9 + * Allow alteration of assets before rendering
  10 + * @param $item
  11 + * The asset item passed by reference
  12 + */
  13 +function hook_tourml_asset(&$item) {
  14 + $item['new_property'] = TRUE;
  15 +}
  16 +
  17 +/**
9 18 * Allow creation of extra properties to media assets
10 19 *
11 20 * @param $item
2  modules/tap/tap.module
@@ -651,4 +651,4 @@ function _anti_field($text) {
651 651 */
652 652 function _clean_file_text($text) {
653 653 return preg_replace('/\s+/', '', check_plain($text));
654   -}
  654 +}
1  modules/tap/tap.templates.inc
@@ -45,7 +45,6 @@ function tap_preprocess_tap_tourml_asset(&$vars) {
45 45 $vars['source'] = FALSE;
46 46 $vars['content'] = FALSE;
47 47
48   -
49 48 // Handle File fields
50 49 if (isset($vars['asset']['fid'])) {
51 50 // Media fields nest the file object inside of the asset.

No commit comments for this range

Something went wrong with that request. Please try again.