Newer
Older
// Set title.
$data['title'] = __('Dashboard', 'civicrm');
// Call API.
$civi_entity = civicrm_api('uf_group', 'getsingle', $params);
$data['text'] = '';
break;
case 'petition':
// Call API.
$civi_entity = civicrm_api('survey', 'getsingle', $params);
$data['text'] = $civi_entity['instructions'];
}
break;
default:
// Do we need to protect against malformed shortcodes?
/**
* Filter the CiviCRM shortcode data array.
*
* 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 array $data The modified shortcode data.
return apply_filters('civicrm_shortcode_get_data', $data, $atts, $args);