'#value' => '\s+return\s+('. $argex .');',
'#warning_callback' => '_coder_6x_form_submit_warning',
),
+ array(
+ '#type' => 'regex',
+ '#function' => '_menu$',
+ '#source' => 'allphp',
+ '#value' => '\'title\'\s*=>\s*t\(|\'description\'\s*=>\s*t\(',
+ '#warning_callback' => '_coder_6x_menu_localization_warning',
+ ),
);
$review = array(
);
}
+
+function _coder_6x_menu_localization_warning() {
+ return array(
+ '#warning' => t('Menu item titles and descriptions should now no longer be wrapped in t() calls.'),
+ '#link' => 'http://drupal.org/node/140311',
+ );
+}
function mymodule_access($op, $node) { // Not ok.
}
+
+function coder_6x_tests_menu() {
+ $items = array();
+
+ $items['test_good'] = array(
+ 'title' => 'My title', // Ok.
+ 'description' => 'My description', // Ok.
+ );
+
+ $items['test_bad'] = array(
+ 'title' => t('My title'), // Not Ok.
+ 'description' => t('My description'), // Not Ok.
+ );
+
+}