backdrop-contrib / socialfield

The Social field module provides a field that allows you to collect links to social network profiles like facebook, twitter, google+, linkedin, etc.
GNU General Public License v2.0
2 stars 4 forks source link

Add a theme function so link output can be overridden #16

Closed jenlampton closed 7 years ago

jenlampton commented 7 years ago

We identified in https://github.com/backdrop-contrib/socialfield/issues/13 that there was no way to override the output of a sociallink in the theme. This will be a problem for many other use-cases as well and should be addressed.

jenlampton commented 7 years ago

I've created a PR at https://github.com/backdrop-contrib/socialfield/pull/17 that will allow variations on theme_link for the socialfield links. theme_link__socialfield will work on all socialfield links, and theme_link__socialfield__[service] will work for a service-specific override (for example, facebook only).

CybersecDan commented 7 years ago

Cool. Thanks for the PR Jen. Would you like me to complete the merge? Also, will this make it so we can override "nofollow" via theme-override instead?

jenlampton commented 7 years ago

Would you like me to complete the merge?

It could use some testing. If it looks good to you too, then yes merge away. :) And yes, this will allow all the output to be overridden, including both adding (or removing) the nofollow links.

CybersecDan commented 7 years ago

Awesome. I'll do some testing as well then. :)

CybersecDan commented 7 years ago

Tested and confirmed it works. Thanks for the help and the PR @jenlampton. :)