Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Rewrite pieces like (an example from flickr.module):
$location = !empty($country) ? ' ' . t('at') . ' ' . l($loc, 'https://www.flickr.com/photos/' . $info['owner']['nsid'] . '/map?&location=' . $neighbourhood . $locality . $region . $country, array(
'attributes' => array(
'title' => t('View photo on Flickr map.'),
'target' => '_blank',
'class' => array('flickr-location'),
),
)) : '';
// Compose extra Flickr info as HTML to render.
$metadata = $taken . $location . ' ' . t('by') . ' ' . $username . '.';
to be:
$loclink = l($loc, 'https://www.flickr.com/photos/' . $info['owner']['nsid'] . '/map?&location=' . $neighbourhood . $locality . $region . $country, array(
'attributes' => array(
'title' => t('View photo on Flickr map.'),
'target' => '_blank',
'class' => array('flickr-location'),
),
));
$location = !empty($country) ? ' ' . t('at !loclink', array('!loclink' => $loclink)) . ' ' . : '';
// Compose extra Flickr info as HTML to render.
$metadata = t('!taken !location by !username.', array('!taken' => $taken, '!location' => $location, '!username' => $username));