<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Longhouses &#187; shortcodes</title>
	<atom:link href="http://www.longhouses.nl/tag/shortcodes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.longhouses.nl</link>
	<description>creëert business</description>
	<lastBuildDate>Mon, 10 Feb 2014 12:13:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Shortcodes settings</title>
		<link>http://www.longhouses.nl/shortcodes-settings-2/</link>
		<comments>http://www.longhouses.nl/shortcodes-settings-2/#comments</comments>
		<pubDate>Thu, 12 Jul 2012 13:12:49 +0000</pubDate>
		<dc:creator><![CDATA[webmaster]]></dc:creator>
				<category><![CDATA[Theme back-end]]></category>
		<category><![CDATA[back-end]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[shortcodes]]></category>

		<guid isPermaLink="false">http://www.longhouses.nl/?p=397</guid>
		<description><![CDATA[Shortcodes are facilities which are not used by everyone. Besides, XHTML code of the majority of typography elements can be generated manually. It causes that not all CSS and JavaScript files connected with Shortcodes are needed while loading a page. Thanks to a Shortcodes tab, it is possible to switch off chosen groups of Shortcodes: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Shortcodes are facilities which are not used by everyone. Besides, XHTML code of the majority of typography elements can be generated manually. It causes that not all CSS and JavaScript files connected with Shortcodes are needed while loading a page.</p>
<p>Thanks to a Shortcodes tab, it is possible to switch off chosen groups of Shortcodes:</p>
<p><a href="http://www.longhouses.nl/wp-content/uploads/2012/07/MeetGavernWP-‹-Meet-Gavern-WP-—-WordPress-9.jpg"><img class="aligncenter size-full wp-image-695" title="Shortcodes" src="http://www.longhouses.nl/wp-content/uploads/2012/07/MeetGavernWP-‹-Meet-Gavern-WP-—-WordPress-9.jpg" alt="" width="555" height="223" /></a></p>
<p>Note! Switching off a given group of Shortcodes will cause not only switching off adding CSS and JS files connected with a group given but will also switch off functions which parse Shortcodes in articles. That&#8217;s why, you have to make sure that Shortcodes groups you want to switch off, are not used in existing articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.longhouses.nl/shortcodes-settings-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typography button</title>
		<link>http://www.longhouses.nl/typography-button/</link>
		<comments>http://www.longhouses.nl/typography-button/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 14:52:14 +0000</pubDate>
		<dc:creator><![CDATA[webmaster]]></dc:creator>
				<category><![CDATA[Theme back-end]]></category>
		<category><![CDATA[back-end]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.longhouses.nl/?p=386</guid>
		<description><![CDATA[To simplify shortcodes use available in themes based on GavernWP framework, a button for theme&#8217;s typography has been implemented which is available in a posts editor: &#160; By clicking this button, you will see a list of available typography elements: &#160; It is possible to choose a version with a stylistic specified for the majority [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>To simplify shortcodes use available in themes based on GavernWP framework, a button for theme&#8217;s typography has been implemented which is available in a posts editor:<a href="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-4.jpg"><img class="aligncenter size-full wp-image-705" title="button typo" src="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-4.jpg" alt="" width="474" height="118" /></a></p>
<p>&nbsp;</p>
<p>By clicking this button, you will see a list of available typography elements:<a href="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-5.jpg"><img class="aligncenter size-full wp-image-706" title="typo button popup" src="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-5.jpg" alt="" width="265" height="353" /></a></p>
<p>&nbsp;</p>
<p>It is possible to choose a version with a stylistic specified for the majority of elements. After choosing a particular style, a shortcode will appear which will be replaced in entry content by scripts to structure styled in a way given.</p>
<p>Please, note that adding a new Shortcode code requires three operations:</p>
<ul>
<li>adding an entry in shortcodes.js configuration file</li>
<li>adding PHP code supporting a shortcode given</li>
<li>adding optional CSS and JavaScript code (if a shortcode given requires it)</li>
</ul>
<p><strong>shortcodes.js</strong> file in <strong>config</strong> catalog includes entries which are replaced to menu structure visible after clicking a typography button &#8211; it includes <strong>$GAVERNWP_SHORTCODES</strong> variable which is a table including objects representing elements of a menu. Each object has three features: <strong>title</strong>, <strong>code</strong> and <strong>submenu</strong>. Let&#8217;s analyze this structure with a <strong>Highlight</strong> position:</p>
<pre class="gk-code" data-style="style1"><code>{
"title": "Highlight",<br />
"code": "[highlight]Your text[/highlight]",<br />
"submenu": [<br />
{<br />
"title": "Style I",<br />
"code": "[highlight style=\"1\"]Your text[/highlight]"<br />
},<br />
{<br />
"title": "Style II",<br />
"code": "[highlight style=\"2\"]Your text[/highlight]"<br />
},<br />
{<br />
"title": "Style III",<br />
"code": "[highlight style=\"3\"]Your text[/highlight]"<br />
}<br />
]<br />
},</code></pre>
<ul>
<li><strong>title</strong> &#8211; it includes a menu positon name displayed by a script</li>
<li><strong>code</strong> &#8211; it is a shortcode code which will be added to an entry when clicking a menu position given &#8211; you have to remember that not all menu positions on the first level have a value in this field &#8211; if it was an empty sequence of symbols, it means for a script that clicking on a menu position given does not request any action.</li>
<li><strong>submenu</strong> &#8211; it is a table  of a submenu of a menu position given. Each submenu position is built the same as menu positions as these on the first level but with one difference &#8211; a submenu cannot have the next submenu, so you do not add a <strong>submenu</strong> feature in a submenu object.</li>
</ul>
<p>Let&#8217;s say, we added our shortcode to a typography button using shortcodes.js file. So, there is one thing left to do &#8211; support our shortcode from a theme side.</p>
<p>To do this, you have to open <strong>gavern/helpers/helpers.shortcodes.php</strong> file.</p>
<p>This file is divided into three main sections starting with lines similar to:</p>
<pre class="gk-code" data-style="style1"><code>if(get_option($tpl-&gt;name . '_shortcodes1_state', 'Y') == 'Y') {</code></pre>
<p>It is a conditional  IF instruction connected with a group of typography elements given. Gavern icludes three groups:</p>
<ul>
<li>typography elements &#8211; functions connected with it have <strong>gavern_ts_</strong> prefix in the title</li>
<li>interactive elements &#8211; functions connected with it have <strong>gavern_ies_</strong> prefix in the title</li>
<li>elements characteristic for a particular theme &#8211; functions connected with it have <strong>gavern_tss_</strong> prefix in the title</li>
</ul>
<p>We recommend to add new typography elements in the last group &#8211; in Meet GavernWP theme, it is empty by default. Please, remember about using an appropriate prefix in a function name for a group given, e.g. in the case of the third group, it will be <strong>gavern_tss_</strong>. The code itself of a shortcode given has to be created according to guidelines described in<a href="http://codex.wordpress.org/Shortcode_API"> Shortcode API</a>.</p>
<p>The last step is rather optional and depends on your Shortcode type. If your Shortcode requires additional CSS or JavaScript code, you have to define it in <strong>shortcodes.*.css</strong> i <strong>shortcodes.*.js</strong> files, where <strong>*</strong> is a group name to which a Shortcode given was assigned.</p>
<p>It is very important to place elements of CSS and JavaScript code in an appropriate file, as it will give a possibility of optimizing whole theme code when switching off given group of Shortcodes codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.longhouses.nl/typography-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
