wp-shortcake / shortcake-bakery

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

Giphy shortcode should handle embed codes without a hyphenated slug #151

Closed goldenapples closed 8 years ago

goldenapples commented 8 years ago

Currently, the callback for the Giphy shortcode is trying to extract the gif ID from the giphy URL by exploding the URL on dashes.

This works for URLs of the pattern [giphy url="http://giphy.com/gifs/mulder-wheelies-FcHcQIpQD5Bmg"]

However, the url [giphy url="http://giphy.com/gifs/FcHcQIpQD5Bmg"] is also a valid link to the same gif and should be handled, as it is what we will get if pasting the embed code into a post and doing a reversal on it.