themovation / th-widget-pack

Theme Widget Pack
19 stars 6 forks source link

Icon - Markup ready #28

Closed teaganm closed 8 years ago

teaganm commented 8 years ago

Examples shown represent the 4 main options:

Previously we were including the icons with a different method, but I tried to match how it was in the SO icon widget, so whatever is most straight forward

adiraoco commented 8 years ago

Implemented in f74e65f0abb5aaf52369454ed23e08892938f4a8

The alt tag is automatically added with the image. I use wp_get_attachment_image.

For the icons, I am using siteorigin_widget_get_icon. This function has the benefit of making the plugin more lightweight. However it does not allow us to add classes to the <span>. This is why you will not see th-icon class attached to the icons. On the other hand siteorigin_widget_get_icon allows us to add an array for inline styles, so if the need arises we can use it.

adiraoco commented 8 years ago

In addition I have added a function to https://github.com/ryanlabelle/themovation-so-widgets-bundle/blob/master/inc/template-functions.php.

This function will allow us to easily implement this widget where we need it.

teaganm commented 8 years ago

Thanks! Sounds great, I think that will work just fine without the class. We can come back to this if needed though.

teaganm commented 8 years ago

Thanks!

adiraoco commented 8 years ago

Done and done :)

Implemented in 700896ba3e7eb95a168ec91f72c2273929978549

teaganm commented 8 years ago

Looks great, thanks Adi!