Newer
Older
$civi_entity = civicrm_api3('ContributionPage', 'getsingle', $params);
$data['text'] = $civi_entity['intro_text'];
}
break;
case 'event':
$civi_entity = civicrm_api3('Event', 'getsingle', $params);
$civi_entity['title']
);
break;
case 'info':
default:
$data['title'] = '';
if (!empty($civi_entity['title'])) {
$data['title'] = $civi_entity['title'];
}
// Override with "description" if "summary" is empty.
if (empty($civi_entity['summary']) && !empty($civi_entity['description'])) {
$data['text'] = $civi_entity['description'];
}
break;
case 'user-dashboard':
// Set title.
$data['title'] = __('Dashboard', 'civicrm');
$civi_entity = civicrm_api3('UFGroup', 'getsingle', $params);
$data['text'] = '';
break;
case 'petition':
$civi_entity = civicrm_api3('Survey', 'getsingle', $params);
$data['text'] = $civi_entity['instructions'];
}
break;
default:
// Do we need to protect against malformed Shortcodes?
* This filter allows plugins or CiviCRM Extensions to modify the data used
* to display the Shortcode when there are multiple Shortcodes being rendered.
* @param array $data The existing Shortcode data.
* @param array $atts Shortcode attributes array.
* @param array $args Shortcode arguments array.
return apply_filters('civicrm_shortcode_get_data', $data, $atts, $args);