gMagicScott / wordpress-plugin_amazing-system

0 stars 1 forks source link

Integrate with Instabuilder's `[ez_box]` shortcode to allow our shortcodes in the title #14

Open gMagicScott opened 10 years ago

gMagicScott commented 10 years ago

From ZenDesk Ticket 402

Many Amazing System members use the Instabuilder plugin to help style their E-Promo-Kits.

The email

Hey @twinsmagic (was David)

Great training today. I ran into a little hick up when inserting the Swap code into the instabuilder fancy boxes.

I want to have it in the colored header of the box, rather then inside the content area of the box. Right now with the current code, the box messes up.

Do you know how i can insert the code without messing up the fancy box.

Here is the code i used

[ez_box title="(1 hour) Silver Package -[switch field="field25" a="$500" b="$600" c="$700" d="$800" e="$900"] color="blue"]

-Full 30 minute magic show
-Amazing balloon designs up to 20 kids
-Cartoon bill souvenir for all
(this cartoon bill will teach the kids 4 easy to learn magic tricks)
[/ez_box]

Screenshot

Broken Title Box The top blue box has the nested shortcode and displays no real title, and has an extra [color="blue"] The yellow box is set up with plain text and functions as expected.

My Notes

Now there is a WordPress limitation with additional shortcodes inside the attributes [shortcode attribute="**in here**" /] but we may be able to overwrite Instabuilder's version with our own to account for this. The resulting code may look like this...

[ez_box color="blue"]
<h2> (1 hour) Silver Package - [switch field="field25" a="$500" b="$600" c="$700" d="$800" e="$900"] </h2>

...

[/ez_box]

From there it may be possible to grab everything inside the <h2></h2>, process the added shortcode, and hook back into Instabuilder's version.

It's complex and round-about, but it just may be crazy enough to work.

twinsmagic commented 10 years ago

I like crazy!