From 7b1adce8130925f6913dd5bf91d416743c72f546 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 2 May 2013 17:17:41 -0700 Subject: [PATCH] Updated Preparing your v1.x plugins for v2.x (markdown) --- Preparing-your-v1.x-plugins-for-v2.x.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Preparing-your-v1.x-plugins-for-v2.x.md b/Preparing-your-v1.x-plugins-for-v2.x.md index 742bd65..b67a683 100644 --- a/Preparing-your-v1.x-plugins-for-v2.x.md +++ b/Preparing-your-v1.x-plugins-for-v2.x.md @@ -33,11 +33,6 @@ eg. If your file is called **myplugin_template.php** , within this file you migh #### Shortcode Wrappers. -In v1.x you might create a wrapper around a shortcode (only when there is data returned) using the following code in your template: - - $sc_style['CONTACT_PERSON']['pre'] = "".LANCONTACT_14."
"; - $sc_style['CONTACT_PERSON']['post'] = "
"; - In v2.x there are two methods to add wrappers around your shortcodes. The way to declare them differs slightly from v1 in that we use a kind of 'shortcode-wildcard' `{---}`. @@ -46,11 +41,16 @@ The way to declare them differs slightly from v1 in that we use a kind of 'short A global shortcode wrapper. ie for shortcodes which are available site-wide. (for example those registered globally for use in menus or found in e107_core/shortcodes/single/) example: + // v1.x way of doing it. + $sc_style['CONTACT_PERSON']['pre'] = "".LANCONTACT_14."
"; + $sc_style['CONTACT_PERSON']['post'] = "
"; + + // v2.x way of doing it. $SC_WRAPPER['CONTACT_PERSON']= "".LANCONTACT_14."
{---}
"; ##### Template-Specific Shortcodes -A template-specific shortcode wrapper. ie. as used on a single page of your site. +v2.x introduces a template-specific shortcode wrapper. ie. as used on a single page of your site. example: $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "".LANCONTACT_14."
{---}
";