wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

Set default h/w proportion for Giphy embed; allow disabling responsiveness #150

Closed danielbachhuber closed 8 years ago

danielbachhuber commented 8 years ago

Fixes #149

danielbachhuber commented 8 years ago

@goldenapples #reviewmerge

danielbachhuber commented 8 years ago

@montchr This fixes your issue for me. I suppose if we can't know the actual width / height of the Giphy, then we'll need to allow manual override.

goldenapples commented 8 years ago

This looks good. I think it makes sense to add support for height/width in the reversal process too, though?

The giphy embed code includes a height and width: <iframe src="//giphy.com/embed/YqGeOQ0u6hB5u" width="480" height="501" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="http://giphy.com/gifs/YqGeOQ0u6hB5u">via GIPHY</a></p>

Extracting those and setting them on the shortcode would ensure that we keep the right proportions on display.

danielbachhuber commented 8 years ago

I think it makes sense to add support for height/width in the reversal process too, though?

Good call. Updated.

goldenapples commented 8 years ago

Looks good! I noted one unrelated bug as #151. But I'll merge this.