You are here

function _viewfield_migrate_legacy_tokens in Viewfield 7.2

Same name and namespace in other branches
  1. 7.3 viewfield.module \_viewfield_migrate_legacy_tokens()

Substitute core tokens for legacy tokens (%nid, %author, %viewer) in text.

2 calls to _viewfield_migrate_legacy_tokens()
viewfield_content_migrate_data_record_alter in ./viewfield.module
Implements hook_content_migrate_data_record_alter().
viewfield_content_migrate_instance_alter in ./viewfield.module
Implements hook_content_migrate_instance_alter().

File

./viewfield.module, line 537
Defines a field type to display a view.

Code

function _viewfield_migrate_legacy_tokens($text) {
  return strtr($text, array(
    '%nid' => '[node:nid]',
    '%author' => '[node:author]',
    '%viewer' => '[current-user:uid]',
  ));
}