strip emoji when updating node title in presave hook
This commit is contained in:
@@ -6,8 +6,16 @@ function booking_node_presave($node) {
|
||||
|
||||
if($node->type == 'booking')
|
||||
{
|
||||
$node->title = t('!event registration: !name',
|
||||
array('!event' => $event->booking_eventname, '!name' => $node->booking_firstname . ' ' . $node->booking_lastname));
|
||||
$title = t('!event registration: !name', array(
|
||||
'!event' => $event->booking_eventname,
|
||||
'!name' => $node->booking_firstname . ' ' . $node->booking_lastname,
|
||||
));
|
||||
$title = _booking_remove_emoji($title);
|
||||
$node->title = $title;
|
||||
|
||||
|
||||
//$node->title = t('!event registration: !name',
|
||||
// array('!event' => $event->booking_eventname, '!name' => $node->booking_firstname . ' ' . $node->booking_lastname));
|
||||
//watchdog('booking', 'Presave of person: @info', array('@info' => var_export($node, TRUE)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user