Skip to content
Snippets Groups Projects
Commit 090c725d authored by Matthieu Scarset's avatar Matthieu Scarset Committed by Martin Anderson-Clutz
Browse files

Issue #3433267 by matthieuscarset: Smart date value custom format tokens empty

parent d850e48f
No related branches found
Tags 4.1.0-rc7
No related merge requests found
......@@ -191,3 +191,19 @@ function smart_date_config_schema_info_alter(&$definitions) {
function smart_date_views_plugins_argument_alter(array &$plugins) {
$plugins['date']['class'] = 'Drupal\smart_date\Plugin\views\argument\Date';
}
/**
* Implements hook_module_implements_alter().
*
* Move smart_date hook_tokens() implementation to the end of the list to avoid
* conflict with the Tokens module's remplacement for custom date format/values.
*/
function smart_date_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
case 'tokens':
$group = $implementations['smart_date'];
unset($implementations['smart_date']);
$implementations['smart_date'] = $group;
break;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment