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.
I cobbled this code from this Quote module issue #1167094: "Themeing" the quote text/button. But I don't know how to adapt it for the PM link. Could somebody please lend a hand?
<?php
/**
* Adds af-button-small class to anchor tab and span tag to link text on nodes.
*/
function harp_preprocess_node(&$vars) {
if ($vars['type'] == 'forum' && isset($vars['content']['links']['quote']['#links']['quote'])) {
$vars['content']['links']['quote']['#links']['quote']['html'] = TRUE;
$vars['content']['links']['quote']['#links']['quote']['title'] = "<span>" . $vars['content']['links']['quote']['#links']['quote']['title'] . "</span>";
$vars['content']['links']['quote']['#links']['quote']['attributes']['class'] = array('af-button-small');
}
}
?>
Comments
Comment #1
topdillon CreditAttribution: topdillon commentedI also tried the following and it didn't work. What am I doing wrong?
Comment #2
ptmkenny CreditAttribution: ptmkenny commentedComment #3
ivnish CreditAttribution: ivnish commented