<?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>SevenSpark</title> <atom:link href="http://sevenspark.com/feed" rel="self" type="application/rss+xml" /><link>http://sevenspark.com</link> <description>Hand crafted WordPress themes &#38; Plugins</description> <lastBuildDate>Mon, 20 May 2013 13:38:22 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>The WordPress Menu Item Limit or: Help! Half my menu items just disappeared!</title><link>http://sevenspark.com/wordpress/menu-item-limit?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=menu-item-limit</link> <comments>http://sevenspark.com/wordpress/menu-item-limit#comments</comments> <pubDate>Sat, 13 Apr 2013 15:01:53 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[menu]]></category> <category><![CDATA[menu item limit]]></category> <category><![CDATA[ubermenu]]></category> <category><![CDATA[WordPress Menu]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=581</guid> <description><![CDATA[Many an unsuspecting WordPress user has fallen victim to the menu item limit effect.  Here I'll attempt to explain why it happens, how to detect it before it becomes an issue, and how to properly configure the server to avoid limiting your menu items.]]></description> <content:encoded><![CDATA[<p>So, you just saved your WordPress 3 menu and found to your horror that you lost menu items &#8211; maybe a LOT of menu items.  And now you can&#8217;t add any more &#8211; when you add a new one, the one last drops off the end of the list.</p><p>Is this a WordPress bug?  Did one of those darn plugins do it?!  Nope, it&#8217;s a server configuration issue that silently cuts your menu items down before WordPress even knows about them, like wolves picking off sheep in the night.  Or you know, the HTTP/PHP equivalent of that.</p><p>Shake your fist at the sky and take a deep breath, and I&#8217;ll lay it out for you.</p><h3>High Level Overview</h3><p>Let&#8217;s start at the beginning.  There are three important things to understand:</p><p>1. To save a WordPress menu, <strong>you have to send data from the client (your web browser) to the server</strong>, where it is processed and stored by the WordPress Menu System.  This form data is submitted to the server via an <a
href="https://en.wikipedia.org/wiki/POST_(HTTP)">HTTP POST</a>.  PHP parses this data as a nice array that we know and love &#8211; <code>$_POST</code>.</p><p>2. The WordPress Menu System bases the menu items it saves on the data it receives from the client side via the <code>$_POST</code> array.  It assumes that data that is not present should be removed &#8211; that is, <strong>WordPress deletes menu items not present in the <code>$_POST</code> array upon save</strong>.</p><p>3. Depending on your server configuration, <strong>not all of the POSTed variables sent by the client may be received by the WordPress</strong>, as the <code>$_POST</code> array can be truncated.  And when that data is lost, we lose menu items.  Dang.</p><p
class="well">Hold on, I&#8217;ve had enough of the techno-babble. <a
class="btn btn-primary pull-right" href="#solution">Skip to the Solution <i
class="icon-circle-arrow-down"></i></a></p><h3>Here&#8217;s how it works</h3><p>Every menu item on the Appearance > Menus screen has about 11-12 fields associated with it (Title, Classes, Description, ID, etc).  There are also a few meta values for the menu overall (like the menu name, menu ID, and a few nonce-related fields for security).  All this data gets sent to the server as POST data.  Each field is a separate POST variable.  So if you have 10 menu items, you&#8217;re sending around 120 POST variables (11 per menu item + various menu meta fields).  If you have 100 menu items, you&#8217;re sending around 1200 POST variables.</p><h3>Here&#8217;s the problem</h3><p>Unfortunately, PHP&#8217;s desire to be secure and WordPress&#8217;s desire to be tidy conspire to stab you in the back.  Two wrongs might not make a right, but in this case, two rights make a big ol&#8217; headache.</p><h4>PHP&#8217;s Security</h4><p>For security reasons, PHP likes to limit the maximum numbers of POST vars you can submit.  This is to mitigate the effects of <a
href="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attacks</a>.  We&#8217;ll get into details below.  The important bit from the PHP manual:</p><blockquote><p>If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.</p></blockquote><p>This is good, but in practice, if you&#8217;re unaware of this setting (and aren&#8217;t paying attention to Warnings in the logs &#8211; and the average user isn&#8217;t), it can produce stress-induced manual hair extraction.</p><h4>WordPress&#8217;s housekeeping</h4><p>The WordPress Menu System save mechanism works by iterating over the <code>$_POST</code> array, and then discarding any menu items that weren&#8217;t present in the array.</p><pre class="brush: php; title: ; notranslate">
//nav-menus.php line 341
// Remove menu items from the menu that weren't in $_POST
if ( ! empty( $menu_items ) ) {
	foreach ( array_keys( $menu_items ) as $menu_item_id ) {
		if ( is_nav_menu_item( $menu_item_id ) ) {
			wp_delete_post( $menu_item_id );
		}
	}
}
</pre><p>That&#8217;s good, as it prevents us from having all sorts of orphaned menu items in the posts table.  But it also means that if the menu system is sent incomplete data, WordPress assumes the menu items corresponding to that data should be deleted, rather than that they should be ignored.</p><h4>The Upshot: The road to confounding data loss is paved with good intentions</h4><p>In the end, if the client submits more menu item variables than the PHP-configured limit, any menu items over the limit will be lost.  So if you submit 1200 variables, and the limit is 1000, the last 200 are simply discarded &#8211; WordPress never even knows they were sent.  These 200 variables will correspond to the last 18 items or so in your menu.</p><p><strong>And that is why the menu items are lost.  PHP prevents the menu items that you saved on the client side from reaching WordPress&#8217;s processing on the server side, so WordPress decides to delete the menu items.</strong> Who&#8217;s at fault?  (<em>I demand blood!</em>)  No one, really.  It&#8217;s just a situation where you need to configure your server properly.</p><div
class="well">Sidenote: If this happens, it&#8217;s all over.  We haven&#8217;t just lost pointers, we&#8217;ve lost the actual data.  The only way to recover the menu items would be to restore a backup of the database prior to the menu save.  Gotta catch it before it happens to avoid the repercussions.</div><h3>Menu Item Specifics</h3><p>Here&#8217;s how the POST variables that are submitted on menu save break down, for those who want specifics:</p><p><strong>Key</strong></p><table
class="table"><tr><th>Abbreviation</th><th>Example Value</th><th></th></tr><tr><td>n</td><td>100</td><td>Number of Menu Items</td></tr><tr><td>c</td><td>10</td><td>Number of Custom Menu Items</td></tr><tr><td>m</td><td>2</td><td>Number of Registered Theme Locations</td></tr></table><p><strong>POST Variables (Example values using 100 menu items)</strong></p><table
class="table table-striped" id="menu-item-post-meta-key-table"><tr ><th
class="s2">Key</th><th
class="s6">Variable Count</th><th
class="s6">Example Count</th><th
class="s6">Explanation</th></tr><tr ><td
 >menu-name</td><td
class="s8">1</td><td >1</td><td
class="s4">User-defined Menu Name</td></tr><tr ><td
 >save_menu</td><td
class="s8">1</td><td >1</td><td
class="s4">Submit button</td></tr><tr ><td
 >closedpostboxesnonce</td><td
class="s8">1</td><td >1</td><td
class="s4">nonce</td></tr><tr ><td
 >meta-box-order-nonce</td><td
class="s8">1</td><td >1</td><td
class="s4">nonce</td></tr><tr ><td
 >update-nav-menu-nonce</td><td
class="s8">1</td><td >1</td><td
class="s4">nonce</td></tr><tr ><td
 >_wp_http_referer</td><td
class="s8">1</td><td >1</td><td
class="s4">nonce</td></tr><tr ><td
 >action</td><td
class="s8">1</td><td >1</td><td
class="s4">Form meta</td></tr><tr ><td
 >menu</td><td
class="s8">1</td><td >1</td><td
class="s4">Menu ID</td></tr><tr ><td
 >menu-item-url</td><td
class="s9">c</td><td >10</td><td
class="s4">Link URL for custom menu items</td></tr><tr ><td
 >menu-item-title</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Title</td></tr><tr ><td
 >menu-item-attr-title</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Title Attribute</td></tr><tr ><td
 >menu-item-classes</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Custom Classes</td></tr><tr ><td
 >menu-item-xfn</td><td
class="s9">n</td><td >100</td><td
class="s4">Item XFN Attribute (rel=)</td></tr><tr ><td
 >menu-item-description</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Description</td></tr><tr ><td
 >menu-item-db-id</td><td
class="s9">n</td><td >100</td><td
class="s4">Menu Item ID</td></tr><tr ><td
 >menu-item-object-id</td><td
class="s9">n</td><td >100</td><td
class="s4">Linked object ID</td></tr><tr ><td
 >menu-item-object</td><td
class="s9">n</td><td >100</td><td
class="s4">Linked object type (post/page/custom)</td></tr><tr ><td
 >menu-item-parent-id</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Parent ID</td></tr><tr ><td
 >menu-item-position</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Position</td></tr><tr ><td
 >menu-item-type</td><td
class="s9">n</td><td >100</td><td
class="s4">Item Type</td></tr><tr ><td
 >menu-locations</td><td
class="s9">m</td><td >2</td><td
class="s4">Theme Location</td></tr><tr ><td
 >uber_options</td><td
class="s9">n</td><td >100</td><td
class="s4">UberMenu Options</td></tr><tr ><td ></td><td
class="s11"></td><td></td><td></td></tr><tr ><td ><strong>Total</strong></td><td
class="s11"></td><td><strong>1220</strong></td><td></td></tr></table><p>You can estimate about 12 variables per menu item to be safe.  So if you want to save a menu with 150 items, you&#8217;d want a POST variable limit of no less than 150*12 + 10 = <strong>1810</strong>.</p><div
class="well">Sidenote: the actual number varies because some menu item types have more fields than others.  For example, custom menu items have an extra field to set a URL as they are not linked to a post object.</div><h3>So why does this happen suddenly and without warning?</h3><p>Sometimes this issue manifests as a user reaching a simple limit: they&#8217;ve added 50 menu items.  They try to add the 51st, and nothing happens if they&#8217;re adding it at the end.  Or if they add it in the middle, the last menu item is dropped.  The limit is 50, so every time they add X more items, the last X are deleted.</p><p>Much more distressing is the case where a user has happily had 120 menu items for the last month.  Then, one fateful day, they go to manage their menu, as they have new content they wish to add.  Upon adding their 121st menu item and saving, they find that suddenly, to their horror, <em>the last 40 menu items have been deleted</em>. <strong>How could that happen?</strong> The POST vars limit should have prevented them from adding 120 menu items in the first place, right?</p><p>The most likely scenario leading to this massive frustration is that the server&#8217;s PHP version has been updated, either by the user or the web host (or possibly added Suhosin, but let&#8217;s focus on one thing at a time).  And here&#8217;s why:</p><p>The PHP directive <strong><a
href="http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars"><code>max_input_vars</code></a></strong> was introduced in <a
href="http://php.net/releases/5_3_9.php">PHP 5.3.9</a> (a relatively recent addition from January 10, 2012).  The real issue is that this directive has a <em>default</em> value of 1000.  That&#8217;s a limit of around 80 menu items.  The problem comes from this sequence of events:</p><ol><li>User adds 120 menu items while host is at PHP version < 5.3.9 (no menu item limit, because <code>max_post_vars</code> does not exist)</li><li>Host upgrades server PHP to 5.3.9+</li><li>User adds 121st menu item.  Only the first 80 are sent to the server due to new POST variable limit.  User loses 40ish menu items</li><li>User rips out hair and smashes computer against wall.  Vows to quit WordPress once and for all</li></ol><div
class="well">Sidenote: I don't actually recommend approaching 100 menu items, even in a mega menu.  The general rule of thumb is that having more than 100 links on a page can have a negative impact on SEO.  Plus, presenting a user with 100 options is generally overkill, and you should probably be rethinking the navigation on your site to make it more user-friendly</div><h3 id="ubermenu">How UberMenu factors in (for those who care)</h3><p>I'd like to quickly address the impact my plugin, <a
href="http://wpmegamenu.com">UberMenu - WordPress Mega Menu Plugin</a>, has on this scenario.  While UberMenu does not <em>cause</em> this limit, it does cause the user to reach their menu item limit <em>faster</em>, because it adds one extra variable to each menu item.</p><p>Note that UberMenu actually adds around 10 extra settings to each menu item. <em>However</em>, in an effort to minimize this limitation effect, UberMenu serializes all of its settings into a single active form field (via javascript), so that it only contributes one additional POST variable per menu item, rather than 10 per item.  This optimization was added in UberMenu 2.0.</p><p>So here's how it breaks down with some quick examples.</p><table
class="table"><tr><th>max_input_vars</th><th>Normal Menu Item Limit (approx)</th><th>UberMenu Item Limit (approx)</th></tr><tr><td>1000</td><td>82</td><td>76</td></tr><tr><td>2000</td><td>165</td><td>153</td></tr><tr><td>3000</td><td>249</td><td>230</td></tr></table><p>Adding UberMenu to the mix means the limit decreases by about 6 menu items per 1000 POST vars.</p><p>Unfortunately, this has the effect of customers believing UberMenu is the cause of the issue, because with UberMenu enabled they can only add 76 menu items; with UberMenu disabled, they can add 77, 78, 79... and as such it is natural to confuse symptom for cause and conclude that UberMenu is the problem.  It's not; it just makes the problem apparent sooner, unfortunately.</p><h3 id="solution">Server Configuration Solution</h3><p>As with most problems, once you understand the issue, it's easy to solve it.  The server configuration is limiting the number of POST variables the can be submitted to the server; we need to increase that.</p><p>There are two ways this limit may be imposed</p><h4>1. PHP's <code>max_input_vars</code></h4><p>The increasingly common issue is the <code>max_input_vars</code> PHP directive.  By default, it is set to 1000.  To increase this, simply set it in <a
href="http://php.net/manual/en/ini.php">php.ini</a>.  I'd suggest 3000 to be safe, but 2000 should be sufficient for most sites.</p><pre class="brush: php; title: ; notranslate">
max_input_vars = 3000
</pre><p>How do you edit php.ini?  That depends on your host.  If you have access to the php.ini file, simply add or edit the directive, save, and restart Apache.  If you're with a web host that doesn't give you access (common with shared hosting), you may have to contact your host and have them make the change for you.</p><h4>2. Suhosin</h4><p>Prior to PHP's <code>max_input_vars</code>, the <a
href="http://www.hardened-php.net/suhosin/">Suhosin PHP Security module</a> introduced a similar pair of <code>max_vars</code> directives that are identical in purpose.  Not all servers run Suhosin, but those that do will need to increase the following directives in php.ini:</p><pre class="brush: php; title: ; notranslate">
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000
</pre><p>Again, you may need to contact your host to get them to make these changes if you don't know how or can't do it yourself.</p><p>Restarting Apache with the new maximum POST variable values should allow you to submit all of your menu item variables and therefore save new menu items.  Hoorah!</p><p
class="well">Keep in mind this won't actually recover your lost menu items - that data is gone.  The only way to get it back would be to restore from a backup copy of your database.</p><h5>How to edit php.ini on various hosts:</h5><ul><li><a
href="https://kb.mediatemple.net/questions/137/How+can+I+edit+the+php.ini+file%3F#gs">MediaTemple</a></li><li><a
href="https://my.bluehost.com/cgi/help/128">BlueHost</a></li><li><a
href="http://support.hostgator.com/articles/what-is-php-ini">HostGator</a></li><li><a
href="http://wiki.dreamhost.com/PHP.ini">DreamHost</a></li></ul><h3>Is there a better solution?</h3><p>Wouldn't it be nice if this wasn't an issue?  Theoretically, there may be a few options.  In practice, most are more easily said than done.</p><h4>Option 1: Condense all of the WordPress Menu Item fields into a single input before submitting</h4><p>This is what I did with UberMenu - just serialize all the settings and decode the string on the server side.  It works well, with two caveats.  First, we still have the potential to reach a menu item limit <em>eventually</em>.  Second, it means we don't have a non-javascript fallback, and for core WordPress functionality, that's a no-go.  So that solution is probably out.</p><h4>Option 2: Save menu items individually</h4><p>We could save menu items via AJAX, individually, so we'd only ever submit data for one menu item at a time.  Again, this requires javascript, and I suspect it would also require a major reworking of how the menu system works.  It would also have to be implemented carefully in order to be intuitive and convenient; I think there would still need to be a Save-All button that would sequence all of the menu items for processing.</p><p>I don't have enough expertise in the nitty gritty of the menu system to say whether this is truly a viable/practical option.</p><h4>Option 3: Use a "checksum" to protect from unintended deletions</h4><p>I'm using the term loosely here, but we could submit an extra form field that acts as a "<a
href="http://en.wikipedia.org/wiki/Checksum">checksum</a>", indicating how many menu items are being sent to the server for processing.  WordPress's menu save process could then check this value to make sure the number of menu items that it has received in the <code>$_POST</code> array is equivalent to the number of items it <em>expects</em> to receive.  If it finds a discrepancy, it could avoid deleting missing menu items; however, it may be too late to save newly submitted menu items that were previously unknown.</p><h4>Option 4: Native Nested Menus</h4><p>Another thought would be to provide a native nesting/import functionality in WordPress.  Essentially, each menu item would have an option to nest a separate menu as its submenu.  This would allow users to divide up their menu items among multiple menu trees, to be dynamically assembled when the menu is printed.  There are some existing plugin solutions out there that already do this, I believe.  This would also enhance the reusability of the menu system, as users could potentially use the same menu subtree fragments in multiple menus.</p><h4>Option 5: Provide a Warning</h4><p>I think this is really the best option, at least in the short term.  Simply detect the potential issue and alert the user to it. Providing explanations and solutions (or links to solutions) within the interface is generally the most efficient way to inform a user of what they need to be aware of and resolve.</p><p>And that brings us to...</p><h3>The Menu Item Limit Detector Plugin</h3><p>As a first step toward this, I've written a rudimentary plugin that attempts to detect impending menu item limits by roughly (and conservatively) estimating the remaining POST variables based on the prior save and the current variable limits.  It adds an alert in the Appearance > Menus screen when the user approaches the limit, and explains the issue.</p><p><img
src="http://i.imgur.com/y3YdIOy.png" alt="Menu Item Limit Warning" /></p><div
class="well">Note that I've already included a very similar piece of code within my UberMenu plugin to detect this scenario for UberMenu customers. Available in UberMenu 2.3+</div><p>The obvious downside to the plugin is that users need to be aware of the issue in order to install it in the first place... and the whole point of the plugin is to provide that awareness.  Chicken and egg much?  This'd be far more useful in WordPress Core.</p><p><a
href="https://github.com/sevenspark/menu-limit-detector/archive/master.zip" class="btn btn-success">Download the Plugin</a> <a
href="https://github.com/sevenspark/menu-limit-detector" class="btn btn-primary">Contribute on Github</a></p><p>Please try out the plugin and let me know if it helps!  If it's useful, I'll add it to the WordPress plugin repository.</p><p>And let me know if you have any creative suggestions for solving this problem!  I highly doubt the options I've presented are comprehensive, but I hope they start the conversation going in the right direction.</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/wordpress/menu-item-limit/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>UberMenu 2.3 Released &amp; Important Upgrade Notes</title><link>http://sevenspark.com/announcements/ubermenu-2-3-released-important-upgrade-notes?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubermenu-2-3-released-important-upgrade-notes</link> <comments>http://sevenspark.com/announcements/ubermenu-2-3-released-important-upgrade-notes#comments</comments> <pubDate>Thu, 11 Apr 2013 17:49:35 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[feature release]]></category> <category><![CDATA[ubermenu]]></category> <category><![CDATA[update]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=570</guid> <description><![CDATA[Hit a snag? Head to the Support Forum UberMenu 2.3.0.2 is now available, and upgrade is recommended. UberMenu 2.3 was released today, and includes a variety of updates and feature enhancements: Updated Search Box Styling Ability to name custom widget areas Improved localization Added ability to include custom javascript Ability to disable updates Separated basic.css [...]]]></description> <content:encoded><![CDATA[<p>Hit a snag?  Head to the <a
class="btn" href="http://support.sevenspark.com">Support Forum</a></p><div
class="alert alert-warning"> UberMenu 2.3.0.2 is now available, and upgrade is recommended.</div><p>UberMenu 2.3 was released today, and includes a variety of updates and feature enhancements:</p><ul><li>Updated Search Box Styling</li><li>Ability to name custom widget areas</li><li>Improved localization</li><li>Added ability to include custom javascript</li><li>Ability to disable updates</li><li>Separated basic.css into LESS stylesheets for easier customization</li><li>Improved compatibility with nested plugin styles</li><li>Improved Windows 8 Mobile touch compatibility</li><li>Fixed minor skin bugs</li></ul><h3>Important upgrade notes</h3><p>For those upgrading from a previous version of UberMenu, there are a few changes to the plugin to be aware of.</p><h4>General upgrade</h4><p>UberMenu 2.3 has a lot of refactoring and refining to the core code.  It&#8217;s best to delete the previous plugin files and replace them with the new version. <strong>Don&#8217;t forget to back up any changes!</strong></p><h4>Style Generator Skins</h4><p>In the latest version of UberMenu, LIs are now qualified with the .menu-item class in stylesheets in an effort to improve widget and shortcode style compatibility.  As a result, you may need to re-save your style generator styles in order to update the skin to be compatible with the latest version.</p><h4>custom.css Skins</h4><p>If you are using a custom.css file, you will need to move it into the new /custom folder for it to be picked up by the new version of UberMenu.  That is, save your custom.css before upgrading, then move it to the /custom folder.</p><p>Also, in the latest version of UberMenu, <strong>LIs are now qualified with the .menu-item class</strong> in stylesheets in an effort to improve widget and shortcode style compatibility.  You will likely need to qualify all of the appropriate LIs in your custom stylesheet with the .menu-item class as well in order to make sure your styles have a high enough specificity to be applied.  Generally, a simple find-and-replace from &#8221; li&#8221; to &#8221; li.menu-item&#8221; will resolve the issue &#8211; just be careful not to duplicate the class, and not to replace any LIs that aren&#8217;t actually menu items in your style selectors.</p><p>You may also need to add the class <strong>.megaMenu</strong> to any top level ULs in your skins to make sure your styles are specific enough.</p><p>Sorry for the inconvenience!  But these changes will help improve future compatibility with other content you might like to place in your menu <img
src="http://sevenspark.com/wp-includes/images/smilies/icon_smile.gif?b71dfe" alt=':)' class='wp-smiley' /></p><h4>Search Bar</h4><p>UberMenu 2.3 introduces a new search bar style and functionality, and will replace your old UberMenu search short code automatically.  If you wish to revert to the old style, please use the short code [ubermenu-search-v1]</p><p>Enjoy UberMenu 2.3!</p><p><strong>Update April 13, 2013</strong></p><h3>UberMenu 2.3 bugs that have now been resolved in 2.3.0.1</h3><p>Unfortunately, a few bugs were introduced in UberMenu 2.3, and have now been resolved.  They are noted below for your reference:</p><p><strong>Easy Integration Shortcode</strong><br/><br
/> Please note, if you are using the Easy Integration <em>shortcode</em> &#8211; [uberMenu_easyIntegrate] (normal PHP Easy Integration should not be affected), <del
datetime="2013-04-13T15:01:26+00:00">do <strong>not</strong> update yet. </del></p><p><strong>TimThumb</strong><br/><br
/> I introduced a bug with timthumb in 2.3.  If you are using Timthumb, <del
datetime="2013-04-13T15:01:26+00:00">please do not upgrade yet. </del></p><p>I have a fix and have already submitted version 2.3.0.1 (April 12 4PM EDT), and I will update this post when it is approved by CodeCanyon and ready for download.  Thanks for your understanding and sorry for the inconvenience!</p><p>Update April 13: Version 2.3.0.1 is now available and safe to upgrade &#8211; thanks!</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/announcements/ubermenu-2-3-released-important-upgrade-notes/feed</wfw:commentRss> <slash:comments>22</slash:comments> </item> <item><title>Easy WordPress Theme Template Identification</title><link>http://sevenspark.com/tutorials/easy-wordpress-theme-template-identification?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=easy-wordpress-theme-template-identification</link> <comments>http://sevenspark.com/tutorials/easy-wordpress-theme-template-identification#comments</comments> <pubDate>Fri, 05 Apr 2013 12:37:03 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[code]]></category> <category><![CDATA[comments]]></category> <category><![CDATA[easy]]></category> <category><![CDATA[template]]></category> <category><![CDATA[theme]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://mavair.local/~chris/tinder/?p=523</guid> <description><![CDATA[Making it easy to locate which template is producing a block of code from the front end of the site can take a lot of the frustration out of theme development and customization.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been developing a new commercial WordPress theme, and one of the main goals I&#8217;ve had in mind is to make customizations as easy as possible for customers.  One sticking point and a question I often receive in my support forums, is &#8220;where do I find XYZ&#8230;&#8221;.  This technique automatically adds HTML comments around the various template code blocks, making it easy to identify the source of any code within the template.</p><p>The basic idea is this:  Each template is wrapped in HTML comments so that the output on the front end looks something like this (simplified):</p><pre class="brush: xml; title: ; notranslate">
&lt;body&gt;
    &lt;header&gt;
      ...
    &lt;/header&gt;

    &lt;div class=&quot;main&quot;&gt;

        &lt;!-- begin archive.php [theme_name] --&gt;
        &lt;div class=&quot;primary&quot;&gt;

              &lt;!-- begin content.php [theme_name] --&gt;
              &lt;article class=&quot;post&quot;&gt;

              &lt;/article&gt;
              &lt;!-- end content.php --&gt;
        &lt;/div&gt;
        &lt;!-- end archive.php --&gt;

        &lt;!-- begin sidebar.php [theme_name] --&gt;
        &lt;div class=&quot;sidebar&quot;&gt;

        &lt;/div&gt;
        &lt;!-- end sidebar.php --&gt;

    &lt;/div&gt;
  

    &lt;footer class=&quot;site-footer&quot;&gt;
      ...
    &lt;/footer&gt;

&lt;/body&gt;
</pre><p>This gives the developer/customer an immediate reference for where to start looking in the theme files in order to locate the appropriate spot to make changes/override in a child theme.  Of course, you could do this with static HTML comments in each template &#8211; I&#8217;ve done this in my previous theme, and it has definitely helped customers.  The downside is that every time you make a new template, if you base it off of an existing template (which I expect is a common scenario), you have to remember to update the comments.  That can be a bit tedious, and failure to do so can result in inaccurate comments, and the last thing we want is to send the customer on a wild goose chase.  This technique avoids that.</p><div
class="well"><em>Sidenote: The sidebar template, sidebar.php, the header template, header.php, and the footer template, footer.php, are of course called within the archive template, archive.php &#8211; so the HTML comments aren&#8217;t technically in the proper locations.  The comment locations used here represent the practical divisions within standard WordPress themes in order to provide users with the most useful guidance, rather than the most accurate technical locations.</em></div><p>Of course, sometimes the classes applied to the body tag can be enough to identify the template for advanced users, but the source of a template file can still be ambiguous if a child theme is in use, or when we are using nested content templates.  This technique makes it immediately clear which template is producing which code.</p><p>We&#8217;ll define two functions that dynamically output the template location within the theme.  Then we just add these functions to the start and end of each template file to act as bookends for the code.  We can copy these functions as many times as we want, and they will always remain accurate within the template they appear (just remember that wherever the __FILE__ magic constant is invoked is the location that will be printed &#8211; that&#8217;s why __FILE__ must be passed as a parameter).  Moreover, if we want to change the structure of the comment, or remove them altogether based on a setting, that becomes trivial to accomplish.  Here are the functions, which you should namespace:</p><pre class="brush: php; title: ; notranslate">
function begin_template( $file ){
	?&gt;	&lt;!-- begin &lt;?php echo basename( $file ) . &quot; [&quot;.basename( dirname( $file ) ) .&quot;]&quot; ; ?&gt; --&gt;
	&lt;?php
}
function end_template( $file ){
	?&gt;&lt;!-- end &lt;?php echo basename( $file ); ?&gt; --&gt;
	&lt;?php
}
</pre><p>Then within the template files, they are called like this:</p><pre class="brush: php; title: ; notranslate">
&lt;?php tinderbox_begin_template( __FILE__ ); ?&gt;
&lt;?php tinderbox_end_template( __FILE__ ); ?&gt;
</pre><p>Each function determines the file name and prints it within an HTML comment.  For the beginning comment, we also print out the directory in which the template appears &#8211; this makes it easy to determine if the template is from the parent or child theme.</p><p>Here&#8217;s a basic example of how index.php might look (this is Underscores-based):</p><pre class="brush: php; title: ; notranslate">
get_header(); ?&gt;
		
		&lt;?php begin_template( __FILE__ ); ?&gt;
		&lt;div id=&quot;primary&quot; class=&quot;content-area span8&quot;&gt;
			&lt;div id=&quot;content&quot; class=&quot;site-content&quot; role=&quot;main&quot;&gt;

			&lt;?php if ( have_posts() ) : ?&gt;

				&lt;?php tinderbox_content_nav( 'nav-above' ); ?&gt;

				&lt;?php /* Start the Loop */ ?&gt;
				&lt;?php while ( have_posts() ) : the_post(); ?&gt;

					&lt;?php
						/* Include the Post-Format-specific template for the content.
						 * If you want to overload this in a child theme then include a file
						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
						 */
						get_template_part( 'content', get_post_format() );
					?&gt;

				&lt;?php endwhile; ?&gt;

				&lt;?php tinderbox_content_nav( 'nav-below' ); ?&gt;

			&lt;?php else : ?&gt;

				&lt;?php get_template_part( 'no-results', 'index' ); ?&gt;

			&lt;?php endif; ?&gt;

			&lt;/div&gt;&lt;!-- #content .site-content --&gt;
		&lt;/div&gt;&lt;!-- #primary .content-area --&gt;
		&lt;?php begin_template( __FILE__ ); ?&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
</pre><p>The functions bookend the meat of the template, excluding headers, sidebars, and footers.  In the content-{type}.php templates, the comment functions would wrap the entire contents of the file.</p><p>Now we can make as many copies of this template as we want, and never worry about updating the comments.  Nifty.</p><p>I think if more developers adopt this type of commenting (in addition to standard code commenting), it&#8217;ll go a long way toward customers becoming self-sufficient in sourcing template files and making their own customizations.  Plus, I find it makes things much easier for myself during the development process.</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/tutorials/easy-wordpress-theme-template-identification/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to add links to WordPress image captions</title><link>http://sevenspark.com/code/how-to-add-links-to-wordpress-image-captions?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-links-to-wordpress-image-captions</link> <comments>http://sevenspark.com/code/how-to-add-links-to-wordpress-image-captions#comments</comments> <pubDate>Tue, 24 Apr 2012 22:35:37 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[captions]]></category> <category><![CDATA[how to]]></category> <category><![CDATA[images]]></category> <category><![CDATA[shortcodes]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=448</guid> <description><![CDATA[One issue I've run into in WordPress is that you can't add HTML tags, specifically anchors, into your image captions.  This tutorial will show you how to insert links into your image captions so you can link back for photo credits, etc.]]></description> <content:encoded><![CDATA[<p>The WordPress media manager allows you to add captions to your images, which can be inserted into your post content wrapped in the <strong>caption</strong> shortcode.</p><p><a
target="_blank" href="http://i.imgur.com/EZrWU.png"><img
src="http://i.imgur.com/EZrWU.png" style="max-width:100%;" /></a></p><p>You can see that I&#8217;ve placed anchor tags in the photo caption to link to the photo credit:</p><pre class="brush: xml; title: ; notranslate">
Photo credit: &lt;a href=&quot;http://www.flickr.com/photos/nattu/2735064420&quot;&gt;nattu&lt;/a&gt;&lt;/code&gt;
</pre><p>When you click the &#8220;Insert into Post&#8221; button, you end up with this markup in your editor:</p><pre class="brush: xml; title: ; notranslate">[ caption id=&quot;attachment_1133&quot; align=&quot;alignleft&quot; width=&quot;300&quot; 
caption=&quot;Photo credit: &lt;a href=&amp;quot;http://www.flickr.com/photos/nattu/2735064420&amp;quot;&amp;gt;nattu&amp;lt;/a&amp;gt;&quot;]
&lt;a data-rel=&quot;prettyPhoto&quot; title=&quot;The Entrance&quot; href=&quot;http://localhost/agility/wp-content/uploads/2012/03/TheEntrance.jpg&quot;&gt;
&lt;img src=&quot;http://localhost/agility/wp-content/uploads/2012/03/TheEntrance-300x199.jpg&quot; alt=&quot;&quot; title=&quot;The Entrance&quot; width=&quot;300&quot; height=&quot;199&quot; class=&quot;scale-with-grid size-medium wp-image-1133&quot; /&gt;&lt;/a&gt;[/caption]</pre><p><a
href="#code-solution">Skip to the code solution</a></p><h3>The Problem</h3><p>The issue is that all the HTML entities in the caption attribute (specifically, the anchor tags) are encoded.  That is, instead of</p><pre class="brush: xml; title: ; notranslate">Photo credit: &lt;a href=&quot;http://www.flickr.com/photos/nattu/2735064420&quot;&gt;nattu&lt;/a&gt;</pre><p>we have</p><pre class="brush: xml; title: ; notranslate">Photo credit: &amp;lt;a href=&amp;quot;http://www.flickr.com/photos/nattu/2735064420&amp;quot;&amp;gt;nattu&amp;lt;/a&amp;gt;</pre><p>As a result, instead of getting the desired output in our caption:</p><pre class="brush: xml; title: ; notranslate">
Photo credit: &lt;a href=&quot;http://www.flickr.com/photos/nattu/2735064420&quot;&gt;nattu&lt;/a&gt;
</pre><p>We get the encoded HTML markup instead:</p><pre class="brush: xml; title: ; notranslate">
Photo credit: &amp;lt;a href=&amp;quot;http://www.flickr.com/photos/nattu/2735064420&amp;quot;&amp;gt;nattu&amp;lt;/a&amp;gt;
</pre><h3>The Solution</h3><p>Now, the HTML entities have to be escaped in order to safely place them in the caption=&#8221;" attribute of the caption shortcode (or at least the double quotes do), and in any event it&#8217;s very inconvenient to decode the entities manually.  What we&#8217;ll need to do is decode them programmatically when the shortcode is processed at run time.</p><p>Helpfully, WordPress&#8217;s <strong>img_caption_shortcode</strong> function (wp-includes/media.php) includes a filter that allows us to hook in and override the caption.  Here&#8217;s the original function:</p><pre class="brush: php; title: ; notranslate">
/**
 * The Caption shortcode.
 *
 * Allows a plugin to replace the content that would otherwise be returned. The
 * filter is 'img_caption_shortcode' and passes an empty string, the attr
 * parameter and the content parameter values.
 *
 * The supported attributes for the shortcode are 'id', 'align', 'width', and
 * 'caption'.
 *
 * @since 2.6.0
 *
 * @param array $attr Attributes attributed to the shortcode.
 * @param string $content Optional. Shortcode content.
 * @return string
 */
function img_caption_shortcode($attr, $content = null) {

	// Allow plugins/themes to override the default caption template.
	$output = apply_filters('img_caption_shortcode', '', $attr, $content);
	if ( $output != '' )
		return $output;

	extract(shortcode_atts(array(
		'id'	=&gt; '',
		'align'	=&gt; 'alignnone',
		'width'	=&gt; '',
		'caption' =&gt; ''
	), $attr));

	if ( 1 &gt; (int) $width || empty($caption) )
		return $content;

	if ( $id ) $id = 'id=&quot;' . esc_attr($id) . '&quot; ';

	return '&lt;div ' . $id . 'class=&quot;wp-caption ' . esc_attr($align) . '&quot; style=&quot;width: ' . (10 + (int) $width) . 'px&quot;&gt;'
	. do_shortcode( $content ) . '&lt;p class=&quot;wp-caption-text&quot;&gt;' . $caption . '&lt;/p&gt;&lt;/div&gt;';
}

add_shortcode('gallery', 'gallery_shortcode');
</pre><p>We&#8217;re just going to hook in and use the same code, but add a line of our own to decode the HTML tags.</p><pre class="brush: php; title: ; notranslate">
$caption = html_entity_decode( $caption );
</pre><h3 id="code-solution">The Code</h3><p>So, our final function, which I&#8217;ve placed in <strong>functions.php</strong>, looks like this:</p><pre class="brush: php; title: ; notranslate">
//Our custom caption shortcode function is based on the WordPress Core version with a small change
function custom_img_caption_shortcode( $a , $attr, $content = null) {

	extract(shortcode_atts(array(
		'id'	=&gt; '',
		'align'	=&gt; 'alignnone',
		'width'	=&gt; '',
		'caption' =&gt; ''
	), $attr));

	if ( 1 &gt; (int) $width || empty($caption) )
		return $content;

	$caption = html_entity_decode( $caption );  //Here's our new line to decode the html tags

	if ( $id ) $id = 'id=&quot;' . esc_attr($id) . '&quot; ';

	return '&lt;div ' . $id . 'class=&quot;wp-caption ' . esc_attr($align) . '&quot; style=&quot;width: ' . (10 + (int) $width) . 'px&quot;&gt;'
	. do_shortcode( $content ) . '&lt;p class=&quot;wp-caption-text&quot;&gt;' . $caption . '&lt;/p&gt;&lt;/div&gt;';
}
//Add the filter to override the standard shortcode
add_filter( 'img_caption_shortcode', 'custom_img_caption_shortcode', 10, 3 );
</pre><p>And that&#8217;s it!  Just pop that code into your functions.php and you should be able to add links to your photo captions.  If anyone knows a better way of doing this, let me know in the comments.  Enjoy!</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/code/how-to-add-links-to-wordpress-image-captions/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>How to Add a Custom Class to a WordPress Menu Item</title><link>http://sevenspark.com/how-to/how-to-add-a-custom-class-to-a-wordpress-menu-item?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-a-custom-class-to-a-wordpress-menu-item</link> <comments>http://sevenspark.com/how-to/how-to-add-a-custom-class-to-a-wordpress-menu-item#comments</comments> <pubDate>Fri, 20 Apr 2012 12:27:06 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[How To]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=439</guid> <description><![CDATA[Get acquainted with this very useful core WordPress feature that many users aren't aware of, since it's hidden by default.]]></description> <content:encoded><![CDATA[<p>This is a question I get a lot related to <a
href="http://bit.ly/UberMenu">UberMenu &#8211; WordPress Mega Menu Plugin</a>, though it&#8217;s actually baked into WordPress Core.  It&#8217;s a very powerful feature, as it allows you to target either a single menu item or a group of menu items with a single class.  However, the option is hidden from the UI by default.  In order to add a class to a menu item, you first have to reveal it.</p><h4>1. In Appearance > Menus, click the <em>Screen Options</em> tab</h4><p><img
src="http://i.imgur.com/HjhgL.png" alt="Click the Screen Options tab" /></p><h4>2. Under <em>Show advanced menu properties</em>, check <strong>CSS Classes</strong></h4><p><img
src="http://i.imgur.com/x19jQ.png" alt="Check CSS Classes option" /></p><h4>3. Now expand any menu item to reveal the <em>CSS Classes (optional)</em> text input.</h4><p><img
src="http://i.imgur.com/Xe2if.png" alt="CSS Classes text input" /></p><h4>4. Enter your class name and save your menu to apply the class to the menu item</h4><p>The class will be added to the LI (list item) element, the same element that has the menu item ID attached.  You can then style your item like this, where .menu is replaced by the class used for your menu:</p><pre class="brush: css; title: ; notranslate">/* Target the menu item LI */
.menu li.myClass{
  /* Margin might go here */
}
/* Target the menu item Anchor (link) */
.menu li.myClass &gt; a{
  /* Colors, font sizes, would normally go here */
}

/* Target the menu item LI in UberMenu */
#megaMenu ul.megaMenu li.myClass{

}
/* Target the menu item Anchor (link) in UberMenu */
#megaMenu ul.megaMenu li.myClass &gt; a{
  /* Colors, font sizes, would go here */
}
</pre><p>Remember that you may need to increase your selector specificity or use the !important flag in order to ensure that your new styles are applied.</p><h4>5. Enjoy even more customization control over your menu!</h4><p>Note that this is a standard WordPress feature and works with or without UberMenu.</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/how-to/how-to-add-a-custom-class-to-a-wordpress-menu-item/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>What&#8217;s new in UberMenu 2.0? (A Responsive, More Flexible WordPress Mega Menu)</title><link>http://sevenspark.com/wordpress-plugins/responsive-wordpress-mega-menu?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=responsive-wordpress-mega-menu</link> <comments>http://sevenspark.com/wordpress-plugins/responsive-wordpress-mega-menu#comments</comments> <pubDate>Fri, 10 Feb 2012 14:30:51 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[flexible]]></category> <category><![CDATA[improved]]></category> <category><![CDATA[mega menu]]></category> <category><![CDATA[new]]></category> <category><![CDATA[responsive]]></category> <category><![CDATA[ubermenu]]></category> <category><![CDATA[update]]></category> <category><![CDATA[upgrade]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=406</guid> <description><![CDATA[UberMenu 2.0 - WordPress Mega Menu Plugin brings some awesome new features to the table, including responsive menus, enhanced CSS, refreshed skins, and easily defined submenu columns.]]></description> <content:encoded><![CDATA[<p>It&#8217;s been a year since I first released <a
href="http://wpmegamenu.com">UberMenu &#8211; WordPress Mega Menu Plugin</a>.  In that time it has sold almost 4,000 copies and continues to be an extremely popular WordPress menu solution.  I&#8217;m so lucky that this plugin has had such success &#8211; it has allowed me to move my business to digital goods development full-time, which has been wonderful.  I&#8217;d like to thank all of the great customers who have bought UberMenu, I truly appreciate it.</p><div
class="alert alert-warning">Are you upgrading from an old version of UberMenu to version 2.0?  Please read the <a
href="#">Important Upgrade Instructions</a></div><p>In the last year I&#8217;ve gathered a lot of insight into the menu process through my interactions with the many users I&#8217;ve supported.  I&#8217;ve learned a lot about what features users make the most use of, what tends to cause confusion, common customization needs, and a whole lot more.</p><p>I&#8217;ve spent the last month and a half distilling this accumulated knowledge into what is now UberMenu 2.0, refining functionality and enhancing the feature set.  My goals with UberMenu 2.0 have been:</p><ol><li>Increase the intuitiveness of the plugin</li><li>Improve areas that tend to cause customer confusion</li><li>Increase javascript efficiency</li><li>Increase plugin extensibility</li><li>Improve menu design, robustness, and flexibility</li></ol><p>I&#8217;m very proud of the new UberMenu 2.0, which represents a huge time investment to deliver major enhancements.  Here are some of the new features in UberMenu 2.0.</p><h3>Enhanced CSS</h3><p>The basic CSS structure of UberMenu has been torn down and rebuilt to provide an even stronger foundation for the menu.  This means menus act more intuitively out of the box, and customizations are simpler to implement.  It also means that UberMenu works excellently as a pure CSS menu with full-width submenus.</p><h3>More Efficient Javascript</h3><p>A stronger CSS foundation means less calculations in the javascript, which leaves us with a much lighter weight and more efficient jQuery plugin enhancing UberMenu.  The javascript has also been rewritten as a jQuery plugin, implementing jQuery best practices.  The upshot is that UberMenu now loads and runs faster than ever.</p><h3>Full Width Submenus and Defined Columns</h3><p>One part of UberMenu 1.x which was less intuitive than it could be was column formatting.  Columns were sized entirely based on their content size, which led to some interesting corner cases. While these issues were easily resolvable via custom CSS, for users without a working knowledge of the box model, such strange behavior was frustrating and confusing.</p><p>In UberMenu 2.0, columns can be sized in two ways, on a per-submenu basis: naturally, or in grid based columns.  In a natural layout, each column is sized to its contents, and each column may be a different width.  This is great for single-row submenus.  For multiple-row submenus, UberMenu 2.0 adds the ability to set a submenu to be full-width, and apply a specific number of columns to the submenu.  These columns will be uniformly sized, and extend the entire width of the submenu automatically.</p><p>I believe this new system is much more intuitive and will provide users a much better experience when wrangling their submenus into the formats they desire.</p><p><img
src="http://i.imgur.com/ydvZs.png" alt="Grid Columns" title="Grid Columns" style="width:100%;" /></p><h3>Fully Responsive Menus</h3><p>When designing <a
href="http://labs.sevenspark.com/Agility-HTML">Agility HTML5 Template</a>, I spent a long while studying responsive design best practices.  UberMenu makes use of that knowledge to deliver a responsive mega menu.  As the viewport changes, UberMenu&#8217;s contents size intelligently to optimize display at each size.  (Note this can be disabled for non-responsive themes).</p><p><img
src="http://i.imgur.com/SMsKO.png" alt="Responsive - Mobile Landscape" title="Responsive - Mobile Landscape" style="width:48%; float:left;" /><img
src="http://i.imgur.com/1rwFR.png" alt="Responsive - Mobile Portrait" title="Responsive - Mobile Portrait" style="width:48%; float:right;" /></p><div
style="clear:both;"></div><h3>iPhone and iPad Compatibility</h3><p>Going hand in hand with the responsive mega menu enhancements, UberMenu is now even more compatible with iOS devices, delivering an intuitive user experience for responsive themes.</p><h3>More Flexibility</h3><p>Another goal of UberMenu 2.0 is to build in some of the most common customizations into the Control Panel, to avoid core UberMenu edits.  Now you can:</p><ol><li>Customize dropdown animation speeds</li><li>Trigger via hover in addition to hoverIntent and click</li><li>Customize hover intent timing</li><li>Disable image resizing</li><li>Enable or disable loading UberMenu on registration and login pages</li></li></ol><p><img
src="http://i.imgur.com/SYplp.png" style="max-width:100%" /></p><h3>Fresh menu skins</h3><p>Both design trends and my own design skills have advanced a lot in the last year.  UberMenu 2.0 features refreshed menu skins, with progressive CSS3 enhancements.  The designs are now cleaner and more modern (the old designs are still included for legacy use, if desired).</p><p><strong>Watch for more menu skin options coming soon!</strong></p><h3>Rewritten Style Generator</h3><p>The UberMenu Style Generator has been completely rewritten to make use of LESS via <a
href="http://leafo.net/lessphp/">lessphp</a>.  This means more consistency and easier upgrades.  The new Style Generator also has the ability to write your custom style to an external stylesheet rather than including the CSS in the site header (though that is still an option).</p><h3>A note on backwards compatibility</h3><p>In developing UberMenu 2.0, I&#8217;ve made every effort to maximize compatibility with previous UberMenu installations.  All menu items and their options, as well as UberMenu Control Panel options, will remain intact.  Unfortunately, some sacrifices had to be made in the name of progress.  Because the underlying CSS structure has been enhanced, some types of customizations may no longer appear as desired and may need to be reworked &#8211; though in some cases they will no longer be necessary at all!  Specifically, submenu positioning and column resizing may need to be readdressed.  However, all previous class names and IDs have remained consistent to minimize the impact and make the transition for users from 1.x to 2.0 as smooth as possible.</p><p><br/></p><hr/> <br/></p><p>Well, that&#8217;s about it.  I hope UberMenu customers enjoy the upgrade!  It&#8217;s been a long process getting to this point, and I&#8217;m very pleased with the results.  Feedback is always welcome and will be considered for future releases whenever possible.</p><p>Thanks again to all UberMenu customers for your business!</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/wordpress-plugins/responsive-wordpress-mega-menu/feed</wfw:commentRss> <slash:comments>28</slash:comments> </item> <item><title>ReplyPantry &#8211; Text in a Can for the Envato Marketplaces</title><link>http://sevenspark.com/free-stuff/replypantry-text-in-a-can-for-the-envato-marketplaces?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replypantry-text-in-a-can-for-the-envato-marketplaces</link> <comments>http://sevenspark.com/free-stuff/replypantry-text-in-a-can-for-the-envato-marketplaces#comments</comments> <pubDate>Sun, 01 Jan 2012 16:34:21 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Free Stuff]]></category> <category><![CDATA[author tool]]></category> <category><![CDATA[Chrome Extension]]></category> <category><![CDATA[CodeCanyon]]></category> <category><![CDATA[Envato]]></category> <category><![CDATA[Envato Marketplaces]]></category> <category><![CDATA[free]]></category> <category><![CDATA[free stuff]]></category> <category><![CDATA[ThemeForest]]></category> <category><![CDATA[utility]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=396</guid> <description><![CDATA[ReplyPantry is a Google Chrome Extension that allows Envato Marketplace users to insert customized text snippets into forum posts or item comments.]]></description> <content:encoded><![CDATA[<div
class="ss-buttons"> <a
href="https://github.com/sevenspark/ReplyPantry/raw/master/replypantry.crx" alt="Download ReplyPantry" title="Download ReplyPantry" class="ss-button ss-button-large">Download</a> <a
href="https://github.com/sevenspark/ReplyPantry" class="ss-button ss-button-large" target="_blank">View on GitHub</a></div><p>ReplyPantry is a Google Chrome Extension that allows Envato Marketplace users to insert customized text snippets into forum posts or item comments.</p><p>Once you install ReplyPantry you&#8217;ll see the can icon below your reply boxes in the forums – and above in the item comments. Click the can icon to show the canned text snippets (“cans”), and click a can title to insert that canned text. You’re able to add, save, edit, and remove cans. Hopefully it’s fairly intuitive.</p><p>If you&#8217;re using Google Chrome, clicking the download link should allow you to download and prompt you to install the extension.</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/free-stuff/replypantry-text-in-a-can-for-the-envato-marketplaces/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to create a mail counter for Contact Form 7</title><link>http://sevenspark.com/tutorials/how-to-create-a-counter-for-contact-form-7?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-a-counter-for-contact-form-7</link> <comments>http://sevenspark.com/tutorials/how-to-create-a-counter-for-contact-form-7#comments</comments> <pubDate>Thu, 03 Nov 2011 21:07:48 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[contact form]]></category> <category><![CDATA[contact form 7]]></category> <category><![CDATA[counter]]></category> <category><![CDATA[how to]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=376</guid> <description><![CDATA[Learn how to implement a simple sent mail counter for your contact form using shortcodes and action hooks.]]></description> <content:encoded><![CDATA[<p>Here&#8217;s an easy way to set up a counter for your contact form using <a
href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a> and <a
href="http://wordpress.org/extend/plugins/contact-form-7-dynamic-text-extension/">Contact Form 7 Dynamic Text Extension</a>.  Basically, we&#8217;re setting up an action that will increment a counter each time an email is sent.  We&#8217;re grabbing that count and placing it in the email using CF7 DTX.</p><h3>Add the functional code</h3><p>First, here&#8217;s the code to add (anywhere, but functions.php works well.  It&#8217;ll be added to CF7 DTX some time down the road hopefully).</p><pre class="brush: php; title: ; notranslate">//Define the key to store in the database
define( 'CF7_COUNTER', 'cf7-counter' );

//Create the shortcode which will set the value for the DTX field
function cf7dtx_counter(){
    $val = get_option( CF7_COUNTER, 0) + 1;  //Increment the current count
    return $val;
}
add_shortcode('CF7_counter', 'cf7dtx_counter');

//Action performed when the mail is actually sent by CF7
function cf7dtx_increment_mail_counter(){
    $val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
    update_option(CF7_COUNTER, $val); //Update the settings with the new count
}
add_action('wpcf7_mail_sent', 'cf7dtx_increment_mail_counter');
</pre><h3>Configure the Contact Form</h3><p>Next, we set up our contact form.  We&#8217;re going to add a new hidden dynamic field to it using CF7 DTX and the new shortcode we just wrote.  Here&#8217;s what that code would look like in the Contact Form 7 Form Settings:</p><p><code>[dynamichidden cf7-counter "CF7_counter"]</code></p><p>Finally, we want to include the count in the message we receive, so we&#8217;ll add it to the CF7 Message Body field:</p><p><code>Count: [cf7-counter]</code></p><h3>Some Notes</h3><ul><li>The counter only increments when the mail is actually sent.  Form loads and failed sends won&#8217;t trigger the count to increase.</li><li>If two contact forms are submitted without reloading the page, the count will be incremented properly, but it won&#8217;t be reflected in the email.  This is because the count that is sent in the email is only updated when the page loads.  To update it without a page load, you&#8217;d need to write some JS that hooks into CF7&#8242;s send callbacks.</li></ul><p>That&#8217;s about it &#8211; enjoy!  Let me know in the comments if you find this useful (or run into any trouble).</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/tutorials/how-to-create-a-counter-for-contact-form-7/feed</wfw:commentRss> <slash:comments>46</slash:comments> </item> <item><title>Apple-style Menu Skin for UberMenu</title><link>http://sevenspark.com/free-stuff/apple-style-menu-skin-for-ubermenu?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apple-style-menu-skin-for-ubermenu</link> <comments>http://sevenspark.com/free-stuff/apple-style-menu-skin-for-ubermenu#comments</comments> <pubDate>Tue, 04 Oct 2011 17:53:02 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Free Stuff]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[free]]></category> <category><![CDATA[mega menu]]></category> <category><![CDATA[menu]]></category> <category><![CDATA[ubermenu]]></category><guid
isPermaLink="false">http://sevenspark.com/?p=354</guid> <description><![CDATA[Here is a free CSS3 Apple-style menu skin for <a
href="http://wpmegamenu.com">UberMenu</a>.]]></description> <content:encoded><![CDATA[<div
class="alert">This skin was for UberMenu 1.x, and is now a bit obsolete.  Please look for new UberMenu 2.0 Skins coming soon!</div><p>Here&#8217;s a free CSS3 Apple-style menu skin for use with <a
href="http://wpmegamenu.com">UberMenu &#8211; WordPress Mega Menu Plugin</a>.</p><h3>How to install</h3><ol><li>Copy the contents of the download to your <strong>plugins/wp-uber-menu/styles/skins/custom.css</strong> file.</li><li>In <em>Appearance > UberMenu > Style Settings</em>, set <em>Style Application</em> to <em>Preset</em></li><li>Set <em>Style Preset</em> to <em>Custom</em></li></ol><p>Enjoy!</p> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/free-stuff/apple-style-menu-skin-for-ubermenu/feed</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>CSS3 Progress Bars</title><link>http://sevenspark.com/free-stuff/css3-progress-bars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css3-progress-bars</link> <comments>http://sevenspark.com/free-stuff/css3-progress-bars#comments</comments> <pubDate>Tue, 13 Sep 2011 13:35:44 +0000</pubDate> <dc:creator>Chris Mavricos</dc:creator> <category><![CDATA[Free Stuff]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[free]]></category> <category><![CDATA[progress bar]]></category><guid
isPermaLink="false">http://localhost/sevenspark/?p=310</guid> <description><![CDATA[Demo Code Here&#8217;s a set of pure CSS3 Progress Bars. They are currently static (their progress percentage is set via CSS), but they could be adapted to any progress bar script I expect. Inspiration and Resources: Orman Clark&#8217;s Miniature Progress Bar Lea Verou&#8217;s Checkerboard, striped &#038; other background patterns with CSS3 gradients]]></description> <content:encoded><![CDATA[<p><a
href="http://jsfiddle.net/sevenspark/EAQD9/embedded/result/?iframe=true&#038;width=800&#038;height=530" alt="CSS3 Progress Bars" title="Demo the CSS3 Progress Bars - hover for progress effect" class="btn" rel="prettyPhoto">Demo</a> <a
href="http://jsfiddle.net/sevenspark/EAQD9/" class="btn" target="_blank">Code</a></p><p>Here&#8217;s a set of pure CSS3 Progress Bars.  They are currently static (their progress percentage is set via CSS), but they could be adapted to any progress bar script I expect.</p><p>Inspiration and Resources:</p><ul><li><a
href="http://www.premiumpixels.com/freebies/miniature-progress-bar-psd/" rel="nofollow">Orman Clark&#8217;s <em>Miniature Progress Bar</em></a></li><li><a
href="http://leaverou.me/2010/12/checkered-stripes-other-background-patterns-with-css3-gradients/" rel="nofollow">Lea Verou&#8217;s <em>Checkerboard, striped &#038; other background patterns with CSS3 gradients</em></a></li></ul> ]]></content:encoded> <wfw:commentRss>http://sevenspark.com/free-stuff/css3-progress-bars/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

 Served from: sevenspark.com @ 2013-05-21 06:55:54 by W3 Total Cache -->