I'm trying to theme the social-share class and I'd like to remove the   suffix for designing purposes.

Can this be done without touching social_share.theme.inc (line 180)?

Comments

atiba created an issue. See original summary.

atiba’s picture

Issue summary: View changes
blacksnipe’s picture

Assigned: Unassigned » blacksnipe
Status: Active » Needs work

Hi Atiba,

I'll look into an easier way to hook into the theme-function of the links, but for now I'd suggest copying the function theme_social_share_link() in your theme functions and remove (or change) the attribute in line 180.

Thanks for pointing this one out.

atiba’s picture

Ok, thank you. I'll do that for now.

  • blacksnipe committed 1e45242 on 7.x-2.x
    Issue #2715939 by atiba: How do I remove the   suffix? (...
blacksnipe’s picture

Status: Needs work » Closed (fixed)

I've managed to throw most of the code in a preprocess_hook in order to separate the logic behind the links and the settings for the output.

Now you can just use something like this for fixing the suffix:

/**
 * Implements theme_social_share_link().
 */
function YOUR_THEME_social_share_link($variables) {
  // Call to original function for basic link settings
  $link = theme_social_share_link($variables);
  $link['#suffix'] = '';

  // Return the link
  return $link;
}

 
Pretty simple, right? ;-)

atiba’s picture

Hah thanks! Much easier! You're my hero of today sir. ;D