Title: Shortcake Bakery
Author: Daniel Bachhuber
Published: <strong>July 17, 2015</strong>
Last modified: May 2, 2017

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/shortcake-bakery.svg)

# Shortcake Bakery

 By [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)

[Download](https://downloads.wordpress.org/plugin/shortcake-bakery.0.2.0.zip)

 * [Details](https://frp.wordpress.org/plugins/shortcake-bakery/#description)
 * [Reviews](https://frp.wordpress.org/plugins/shortcake-bakery/#reviews)
 *  [Installation](https://frp.wordpress.org/plugins/shortcake-bakery/#installation)
 * [Development](https://frp.wordpress.org/plugins/shortcake-bakery/#developers)

 [Support](https://wordpress.org/support/plugin/shortcake-bakery/)

## Description

Shortcake Bakery adds a fine selection of shortcodes to your WordPress site. Use
with [Shortcake](https://wordpress.org/plugins/shortcode-ui/) for the optimal experience.

The following shortcodes are now available for your use within the content field:

 * ABC_News `[abc-news]`
 * Facebook `[facebook]`
 * Flickr `[flickr]`
 * Giphy `[giphy]`
 * GoogleDocs `[googledocs]` (Includes several common formats: Documents, Spreadsheets,
   Presentations, Forms, Maps, and Fusion Tables.)
 * Guardian `[guardian]`
 * Image Comparison `[image-comparison]` (Uses the juxtapose.js script from Knight
   Labs.)
 * Infogram `[infogram]`
 * Instagram `[instagram]`
 * Live Photo `[live-photo]`
 * Livestream `[livestream]`
 * PDF Viewer `[pdf]` (PDF documents can be uploaded attachments or remotely hosted
   documents. A code-based proxy pass can be made available for external documents
   with a filter.)
 * Playbuzz `[playbuzz]`
 * Rap_Genius `[rap-genius]`
 * Scribd `[scribd]`
 * Script `[script]` (Requires code-level configuration of accepted domains.)
 * Silk `[silk]`
 * SoundCloud `[soundcloud]`
 * Twitter `[twitter]`
 * Videoo `[videoo]`
 * Vimeo
 * Vine `[vine]`
 * YouTube
 * iFrame `[iframe]` (Requires code-level configuration of accepted domains.)

Shortcake Bakery also enables an “Add Embed Code” experience for Shortcake shortcodes.
Clicking the “Add Embed Code” media button will display a form in the media modal
where a user can paste an embed code as received from a provider (by copying the
embed code from a YouTube video, for one example). If that embed code matches a 
shortcode registered with the Shortcake Bakery shortcode API, the matched shortcode
will be sent to the editor.

See the [Installation](https://frp.wordpress.org/plugins/shortcake-bakery/?output_format=md#Installation)
section for code-level configuration details. Get involved with the project and 
[submit your own shortcodes](https://github.com/fusioneng/shortcake-bakery) on Github.

## Screenshots

 * [[
 * Shortcodes are accessible through the Insert Element screen, exposed in the media
   library.
 * [[
 * Shortcodes preview in the visual editor, with a quick edit button to provide 
   easy access to attribute fields.
 * [[
 * The image comparison shortcode is powered by JuxtaposeJS, a tool built by the
   Northwestern University Knight Lab.
 * [[
 * We’ve added an Infogram shortcode that accepts public Infogram URL’s.
 * [[
 * Scribd shortcodes let you embed documents easily in your WordPress content.
 * [[
 * The script shortcode lets you embed whitelisted sources.
 * [[
 * Same with the iFrame shortcode.
 * [[
 * The RapGenius shortcode doesn’t do anything in the admin – but on the frontend,
   it adds annotations to your post.
 * [[
 * The PDF shortcode wraps your document in a nifty viewer tool.
 * [[
 * Most Facebook URL’s can be embedded with ease.
 * [[
 * Playbuzz quizs can be embedded, with a few options supported.
 * [[
 * An “Add Embed” button is added to the editor media buttons.
 * [[
 * Clicking the “Add Embed” button brings up a from to insert a provided embed code.
   If an embed code doesn’t match a known shortcode, a warning will be displayed.(
   Note – other plugins such as WordPress VIP’s Protected Embeds functionality that
   reverse arbitrary embed codes to shortcodes in other ways can also hook in to
   this and make their own replacements.)
 * [[
 * If an embed code can be recognized as matching one of the Shortcake Bakery shortcodes,
   or any shortcodes which make use of this plugin’s API, it can be inserted from
   this screen…
 * [[
 * … and it will be sent to the editor as the corresponding shortcode, rather than
   the full embed code.

## Installation

It’s a plugin! Install it like any other.

Most of the shortcodes work out of the box, but you’ll need to whitelist any domains
you want to be eligible for script and iFrame tag use.

    ```
    add_filter( 'shortcake_bakery_whitelisted_script_domains', function(){
        return array(
            'ajax.googleapis.com',
        );
    });



    add_filter( 'shortcake_bakery_whitelisted_iframe_domains', function(){
        return array(
            'buzzfeed.com',
        );
    });
    ```

If you don’t want to enable all of the shortcodes which are bundled with this plugin,
you can filter them by returning a smaller array from the filter ‘shortcake_bakery_shortcode_classes’:

    ```
    add_filter( 'shortcake_bakery_shortcode_classes', function() {
        return array(
            'Shortcake_Bakery\Shortcodes\Facebook',
            'Shortcake_Bakery\Shortcodes\Twitter',
            'Shortcake_Bakery\Shortcodes\YouTube',
        );
    });
    ```

Because of cross-domain issues, the `[pdf]` shortcode will only work out of the 
box with PDFs uploaded as local attachments, or that are served with appropriate
Cross-Origin Resource Sharing headers. (If you don’t know about the domain you’re
hosting the PDFs on, most likely it doesn’t include these headers and as a result,
the PDF will not render properly on the front end.)

If you need to be able to serve pdf documents from other domains, you will need 
to set up an asset proxy for them. We have a basic PHP-based asset proxy built in
to the plugin, which is disabled by default. If you want to enable it, return true
from the following filter:

    ```
    add_filter( 'shortcake_bakery_pdf_enable_cors_proxy', '__return_true' );
    ```

This feature should be enabled only with conscious thought, though, as if this is
used heavily, it has the potential to cause serious performance issues. If you will
be serving many, or very large PDFs, we recommend building your own proxy for these–
using an nginx [proxy_pass](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass)
directive, for example.

## FAQ

  Installation Instructions

It’s a plugin! Install it like any other.

Most of the shortcodes work out of the box, but you’ll need to whitelist any domains
you want to be eligible for script and iFrame tag use.

    ```
    add_filter( 'shortcake_bakery_whitelisted_script_domains', function(){
        return array(
            'ajax.googleapis.com',
        );
    });



    add_filter( 'shortcake_bakery_whitelisted_iframe_domains', function(){
        return array(
            'buzzfeed.com',
        );
    });
    ```

If you don’t want to enable all of the shortcodes which are bundled with this plugin,
you can filter them by returning a smaller array from the filter ‘shortcake_bakery_shortcode_classes’:

    ```
    add_filter( 'shortcake_bakery_shortcode_classes', function() {
        return array(
            'Shortcake_Bakery\Shortcodes\Facebook',
            'Shortcake_Bakery\Shortcodes\Twitter',
            'Shortcake_Bakery\Shortcodes\YouTube',
        );
    });
    ```

Because of cross-domain issues, the `[pdf]` shortcode will only work out of the 
box with PDFs uploaded as local attachments, or that are served with appropriate
Cross-Origin Resource Sharing headers. (If you don’t know about the domain you’re
hosting the PDFs on, most likely it doesn’t include these headers and as a result,
the PDF will not render properly on the front end.)

If you need to be able to serve pdf documents from other domains, you will need 
to set up an asset proxy for them. We have a basic PHP-based asset proxy built in
to the plugin, which is disabled by default. If you want to enable it, return true
from the following filter:

    ```
    add_filter( 'shortcake_bakery_pdf_enable_cors_proxy', '__return_true' );
    ```

This feature should be enabled only with conscious thought, though, as if this is
used heavily, it has the potential to cause serious performance issues. If you will
be serving many, or very large PDFs, we recommend building your own proxy for these–
using an nginx [proxy_pass](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass)
directive, for example.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Shortcake Bakery” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ fusionengineering ](https://profiles.wordpress.org/fusionengineering/)
 *   [ Davis Shaver ](https://profiles.wordpress.org/davisshaver/)

[Translate “Shortcake Bakery” into your language.](https://translate.wordpress.org/projects/wp-plugins/shortcake-bakery)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/shortcake-bakery/),
check out the [SVN repository](https://plugins.svn.wordpress.org/shortcake-bakery/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/shortcake-bakery/)
by [RSS](https://plugins.trac.wordpress.org/log/shortcake-bakery/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.2.0 (April 17, 2017)

This release includes 14 new shortcodes, and some major new features for users.

 * Add “Add embed” media button; allow users to enter an arbitrary code from a provider,
   and convert it to a shortcode if that shortcode is available (as defined by the
   shortcode’s “reversal” method). Developers: note that this only works with shortcodes
   that extend \Shortcode_Bakery\Shortcode and implement the reversal()” method.
   You may also disable this button using the `shortcake_bakery_show_add_embed` 
   filter.
 * Updated the format of Instagram embeds.
 * Added several new URL patterns for Facebook embeds. Groups, Pages, and videos
   are now supported in addition to Posts.
 * New shortcode: `[soundcloud]` Shortcode for Soundcloud embeds.
 * New shortcode: `[abc-news]` Shortcode for ABC News embeds.
 * New shortcode: `[flickr]` Shortcode for Flickr embeds.
 * New shortcode: `[giphy]` Shortcode for Giphy embeds.
 * New shortcode: `[google-docs]` Shortcode for Google Docs embeds.
 * New shortcode: `[guardian]` Shortcode for embeds from The Guardian.
 * New shortcode: `[instagram]` Shortcode for Instagram embeds.
 * New shortcode: `[live-photo]` Shortcode for Apple Live Photo embeds.
 * New shortcode: `[livestream]` Shortcode for Livestream embeds.
 * New shortcode: `[pdf]` Embed local or external PDF documents using pdf.js.
 * New shortcode: `[silk]` Shortcode for Silk embeds
 * New shortcode: `[videoo]` Shortcode for Videoo embeds.
 * New shortcode:  Shortcode for Vimeo embeds.
 * New shortcode: `[vine]` Shortcode for Vine embeds.
 * Improved UI for selecting post elements; consistant icons for all embeds.
 * Bug fix: Allow Giphy embeds with hyp0hens in URLs.
 * Added Japanese translation
 * Allow the source of iframe and script embeds to be filtered, for SSL compatability.

#### 0.1.0 (July 17, 2015)

 * Initial release.
 * [Full release notes](http://fusion.net/story/167993/introducing-shortcake-bakery-a-selection-of-fine-shortcodes/)

## Meta

 *  Version **0.2.0**
 *  Last updated **9 years ago**
 *  Active installations **50+**
 *  WordPress version ** 4.2 or higher **
 *  Tested up to **4.7.33**
 *  Language
 * [English (US)](https://wordpress.org/plugins/shortcake-bakery/)
 * Tags
 * [facebook](https://frp.wordpress.org/plugins/tags/facebook/)[Infogram](https://frp.wordpress.org/plugins/tags/infogram/)
   [Playbuzz](https://frp.wordpress.org/plugins/tags/playbuzz/)[shortcodes](https://frp.wordpress.org/plugins/tags/shortcodes/)
 *  [Advanced View](https://frp.wordpress.org/plugins/shortcake-bakery/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/shortcake-bakery/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/shortcake-bakery/reviews/)

## Contributors

 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ fusionengineering ](https://profiles.wordpress.org/fusionengineering/)
 *   [ Davis Shaver ](https://profiles.wordpress.org/davisshaver/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/shortcake-bakery/)