Title: Process shortcodes in bits
Last modified: October 2, 2017

---

# Process shortcodes in bits

 *  Resolved [michaelkrieger](https://wordpress.org/support/users/michaelkrieger/)
 * (@michaelkrieger)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/process-shortcodes-in-bits/)
 * Is it possible to have the plugin process shortcodes in HTML content?
 * For example, if a bit (of HTML) includes [contact-form-7 id=”25″ title=”Inline”],
   it would be nice if it detected and processed the contact form in its place (
   ie: <?php echo do_shortcode(‘[contact-form-7 id=”25″ title=”Inline”]’); ?> )
 * I include a patch should you choose to accept it. Doing so opens the possibility
   of including other components, widgets, etc. within bits.
 *     ```
       # diff -urN snippy.bak snippy.php
       --- snippy.bak  2017-10-02 11:45:33.508487494 -0400
       +++ snippy.php  2017-10-02 11:49:13.492500570 -0400
       @@ -282,7 +282,7 @@
                    else if ($bit_type === 'html') {
   
                        // replace placeholders in html value
       -                $html = html_entity_decode($bit_value);
       +                $html = do_shortcode(html_entity_decode($bit_value));
                        $placeholders_merged = Utils::merge_placeholders_and_atts($bit, $atts);
   
                        // if has content add content to placeholder
       @@ -334,4 +334,4 @@
        }
   
        // go!
       ```
   
    -  This topic was modified 8 years, 8 months ago by [michaelkrieger](https://wordpress.org/support/users/michaelkrieger/).
      Reason: Added DIFF

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Rik Schennink](https://wordpress.org/support/users/pqina/)
 * (@pqina)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/process-shortcodes-in-bits/#post-9590209)
 * Hi Michael,
 * Interesting idea, I’m going to take a look at this later this week, to see if
   it works as advertised 😉
 * Will get back to you.
 *  Plugin Author [Rik Schennink](https://wordpress.org/support/users/pqina/)
 * (@pqina)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/process-shortcodes-in-bits/#post-9603822)
 * Hi Michael,
 * I applied the changes, version 1.2.0 is now available.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Process shortcodes in bits’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/snippy_ffffff.svg)
 * [Snippy](https://wordpress.org/plugins/snippy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/snippy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/snippy/)
 * [Active Topics](https://wordpress.org/support/plugin/snippy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/snippy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/snippy/reviews/)

## Tags

 * [process](https://wordpress.org/support/topic-tag/process/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rik Schennink](https://wordpress.org/support/users/pqina/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/process-shortcodes-in-bits/#post-9603822)
 * Status: resolved