You are here

function hook_ctools_content_subtype_alter in Chaos Tool Suite (ctools) 7

Alter a content plugin subtype.

While content types can be altered via hook_ctools_plugin_pre_alter() or hook_ctools_plugin_post_alter(), the subtypes that content types rely on are special and require their own hook.

This hook can be used to add things like 'render last' or change icons or categories or to rename content on specific sites.

1 invocation of hook_ctools_content_subtype_alter()
ctools_content_prepare_subtype in includes/content.inc
Ensure minimal required settings on a content subtype exist.

File

./ctools.api.php, line 229
Hooks provided by the Chaos Tool Suite.

Code

function hook_ctools_content_subtype_alter($subtype, $plugin) {

  // Force a particular subtype of a particular plugin to render last.
  if ($plugin['module'] === 'some_plugin_module' && $plugin['name'] === 'some_plugin_name' && $subtype['subtype_id'] === 'my_subtype_id') {
    $subtype['render last'] = TRUE;
  }
}