function ctools_custom_content_type_render

cis7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)
cle7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)
elmsmedia7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)
icor7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)
meedjum_blog7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)
mooc7 custom.inc ctools_custom_content_type_render($subtype, $conf, $args, $contexts)

Output function for the 'custom' content type. Outputs a custom based on the module and delta supplied in the configuration.

File

sites/all/modules/ulmus/ctools/plugins/content_types/custom/custom.inc, line 175
Custom content type.

Code

function ctools_custom_content_type_render($subtype, $conf, $args, $contexts) {
  $settings = ctools_custom_content_type_get_conf(ctools_custom_content_type_content_type($subtype), $conf);

  static $delta = 0;

  $block = new stdClass();
  $block->subtype = ++$delta;
  $block->title = filter_xss_admin($settings['title']);

  // Add keyword substitutions if we were configured to do so.
  $content = $settings['body'];
  if (!empty($contexts) && !empty($settings['substitute'])) {
    $content = ctools_context_keyword_substitute($content, array(), $contexts);
  }

  $block->content = check_markup($content, $settings['format']);
  if ($settings['custom_type'] == 'fixed' && user_access('administer custom content')) {
    $block->admin_links = array(
      array(
        'title' => t('Configure content pane'),
        'alt' => t("Configure this pane in administer >> structure >> custom content panes"),
        'href' => 'admin/structure/ctools-content/list/' . $settings['content']->name . '/edit',
        'query' => drupal_get_destination(),
      ),
    );
  }

  return $block;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.