There are a number of other gist-shortcode-providing plugins out there, almost
all of which use the 'id' attribute. This change honors that attribute as
well, to allow for an easy migration.
use content, attribute 0 -or- 'id'
FWIW, I'd tag this as more urgent than just an enhancement.. Unless someone is willing to go in and edit the jetpack plugin, anyone on 2.9 and using any sort of embedded gists via any of the other ``[gist]` shortcode-providing plugins is going to be force to make a choice between having all their gists broken, manually changing all the embed shortcodes in each post using them, or disabling all of jectpack's functionality.
Two changes before I'd be okay merging it in -- 1) make sure you quote strings, for example id as an array key, and 2) don't nest ternary conditionals like that, it gets really illegible. Do sequential if checks instead.
Also, in lines 19-20, it looks like you've inadvertently swapped out tab-based indentation for spaces?
@RsrchBoy slight bunny trail, but I wanted to make sure you have some additional information. Each shortcode in Jetpack passes through the jetpack_shortcodes_to_include filter. If someone has enabled the Jetpack shortcodes module and ever needs to turn one off they can tap into that filter.
@RsrchBoy There has been no update on this in 21 days. Is this something you would like to fix for inclusion? This PR will be closed soon if we do not hear back.
Closing due to lack of response to questions for original poster.