You are here

function i18nviews_ctools_plugin_post_alter in Internationalization Views 7.3

Implements hook_ctools_plugin_post_alter

Register Translate operation in ctools export ui.

Parameters

$plugin: An associative array defining a plugin.

$info: An associative array of plugin type info.

File

./i18nviews.module, line 134
Views support for Internationalization (i18n) package

Code

function i18nviews_ctools_plugin_post_alter(&$plugin, &$info) {
  if ($info['type'] == 'export_ui' && $plugin['module'] == 'views_ui' && i18nviews_localization_plugin_enabled()) {
    $plugin['allowed operations']['translate']['title'] = t('Translate');
    $plugin['menu']['items']['translate'] = array(
      'path' => 'view/%ctools_export_ui/translate',
      'title' => t('Translate'),
    );
  }
}