function ctools_set_callback_token in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools.module \ctools_set_callback_token()
 
Easily set a token from the page variables.
This function can be used like this: $token = ctools_set_variable_token('id', 'mymodule_myfunction');
1 call to ctools_set_callback_token()
- ctools_page_title_content_type_render in plugins/
content_types/ page/ page_title.inc  - Output function for the 'page_title' content type.
 
File
- ./
ctools.module, line 331  - CTools primary module file.
 
Code
function ctools_set_callback_token($token, $callback) {
  // If the callback uses arguments they are considered in the token.
  if (is_array($callback)) {
    $token .= '-' . md5(serialize($callback));
  }
  $string = '<!-- ctools-page-' . $token . ' -->';
  ctools_set_page_token($string, 'callback', $callback);
  return $string;
}