Jetpack: Add WordPress.com Shortcodes to Jetpack

Created on 4 Nov 2016  路  10Comments  路  Source: Automattic/jetpack

Synopsis: We need to move some additional shortcodes from WordPress.com over into Jetpack so that users can more easily move from WordPress.com to WordPress.org

  • [x] spotify
  • [ ] code (sourcecode, source)
  • [x] tweet
  • [x] googleapps
  • [x] brightcove
  • [ ] playlist
  • [ ] display-posts
  • [x] getty
  • [x] blog_subscription_form (needs parity with jetpacksubscriptionform)
  • [ ] list-pages (sibling-pages, child-pages)
  • [ ] ebay
  • [ ] vodpod
  • [ ] 8tracks
  • [x] archiveorg
  • [x] gravatar
  • [x] hulu
  • [x] kickstarter
  • [x] sitemap
  • [x] lytro
  • [x] mailchimp
  • [x] quiz
  • [ ] upcomingevents
  • [x] ustream

Responsible: Tentatively @eliorivero

User experience: Functionality should be the same as on WordPress.com, see https://en.support.wordpress.com/shortcodes/

Complete: 0%

Difficulty: 23

Related: 87-gh-io

Last Updated: 2016-11-07 (by @jeherve)

Primary Issue Shortcodes / Embeds Touches WP.com Files [Pri] BLOCKER [Type] Enhancement

Most helpful comment

@apeatling -- @eliorivero is actively working on this, hoping to get through it by end of the week

All 10 comments

Do we have a great way of handling conflicts here? Some of these are for sure going to conflict with other plugins (I know I have a sourcecode handler on my site already).

  • spotify: Core supports it with oEmbed, our shortcode would only add a little feature, that turns text like this into an embed: spotify:track:4bz7uB4edifWKJXSDxwHcs. Maybe we should propose this to Core?
  • code (sourcecode, source): currently offered by SyntaxHighlighter Evolved
  • tweet: #1168
  • googleapps: #947
  • playlist: we will need to be careful with that one, as it can potentially conflict with Core's Audio shortcode. #5518
  • display-posts: #1780 Currently available on WordPress.org with this plugin.
  • getty: #338
  • archiveorg: #1355
  • hulu: Core supports it with oEmbed.
  • kickstarter: Core supports it with oEmbed.
  • mailchimp: most of the shortcodes on this list can potentially conflict with other existing plugins in the repo, but this one is probably very high on the list.
  • quiz: with sub shortcodes question, answer, wrong, explanation, this shortcode will also conflict with other shortcodes in the repo.
  • upcomingevents: related to #5493, where the rest of the Upcoming Events structure will be merged.

Not sure what the best approach is for the 2 following scenarios:

  1. The shortcode is already part of another popular plugin on WordPress.org.
  2. Core already supports oEmbeds for that service, and thus offers a better user experience in the editor (pasting a URL in the editor automatically transforms into an embed.)

An idea:

What if we registered our shortcodes as late as possible, and, for each one, registered two versions: [jetpack_spotify] AND, if there's not an existing shortcode set, then [spotify] as well?

Maybe having two shortcodes will lead to confusion, not knowing which one to use. It would also have the effect that if users use Jetpack's [jetpack_spotify]and later remove Jetpack and activate a Spotify plugin that only has a [spotify] shortcode, those [jetpack_spotify] will end up dangling.
So I think we should register only one, spotify, but only if shortcode_exists( 'spotify' ) is false

About hulu and kickstarter: even if we don't add any feature at all with the shortcode, we _have_ to add them for feature parity with wpcom.

I think we should register only one, spotify, but only if shortcode_exists( 'spotify' ) is false

I would agree 馃憤 . Do we have a way to do that late enough so we never register our shortcode before another plugin?

About hulu and kickstarter: even if we don't add any feature at all with the shortcode, we have to add them for feature parity with wpcom.

馃憤

Talked with @beaulebens -- he agrees. Let's get in as late as possible so we defer to other plugins, then only register is if a shortcode with the same slug doesn't exist

@samhotchkiss Just checking in on this and seeing what the plan is for development. Any thoughts on when you'll start tackling?

@apeatling -- @eliorivero is actively working on this, hoping to get through it by end of the week

Shortcodes that won't be included in this PR:

code: available as plugin in repo
display-posts: we would have to pack a plugin that's available in the repo
list-pages: it's also a plugin available in repo
ebay: currently the shortcode is no longer working since eBay doesn't provide a method for this. Will be introduced after finding an alternative
vodpod: service is no longer available
8tracks: requires an api key which will require some setup from users and this is not part of the Jetpack experience where things just work. If this is offer in the future, it will have to be setup somehow similar to Publicize.
playlist: provided by core
upcomingevents: will be introduced with this PR https://github.com/Automattic/jetpack/issues/5493

Was this page helpful?
0 / 5 - 0 ratings