add theme_token_list to support module development integrated with token
providen a centralized way to theme available replacements list
for example

  ...
  $token_list = token_get_list('field');
  unset($token_list['node reference']['link']); // remove html link if it doesn't makes sense
  // remove other available replacements that won't make sense in this context
  $form['node_link']['hover_title_replacements'] = array(
    '#value' => theme('token_list', $token_list),
  );

this certainly will avoid duplicated code and easier future support for other features

PS: a similar (but not the same) issue exists for D5 #163275: theme_token_help for a specific node.

Comments

dave reid’s picture

Version: 6.x-1.12 » 6.x-1.x-dev
Component: Code » User interface

Status: Needs review » Needs work

The last submitted patch, 2009-09-14 theme_token_list.patch, failed testing.

arhak’s picture

Status: Needs work » Needs review
StatusFileSize
new1011 bytes

that patch still applies with fuzz 1,
the space in the filename seems to be a problem

renamed and rerolled (now should cleanly apply)

dave reid’s picture

Category: support » feature
dave reid’s picture

BTW you should be using theme('token_tree') for D7 and D6 now.

dave reid’s picture

Status: Needs review » Closed (won't fix)

This is a won't fix.