Synapse 3.0 Update

  • Posted on Sep 22, 2013

Synapse 3.0 was pushed out this weekend which includes some cool new features and fixes. This is a major version update, so please be sure to follow the on-screen instructions and back up your current version just in case.

(Please see important notes on updating)


Added Iris Color Picker with theme-matching presets

As you'll notice, the color picker presets use the primary colors of your selected theme style. If you've customized your color scheme, you can override (colorpicker.js) via child theme function. See function st_colorpicker_options() and copy colorpicker.js to your child theme to customize and override.


Added a new content template


Added responsive dropdown menu option

In addition to the select menu option (which doesn't seem to be a great implementation in iOS7) we've added a dropdown menu as another option.


New Maximum Container Width Breakpoint Option

960 is feeling more like 1960 these days, so we added an option for maximum container width of your preference (960px,1140px,1200px).


Added WP editor to Theme Options and Slides

This is something you've been asking for. Instead of a basic textarea, you can now use the WP Editor in the theme options as a field. We've also added this to the Slides Custom Field text.


Fixes and Other Improvements

  • Improved script/CSS enqueue and optimization
  • Child theme is now a requirement
  • Theme Options saves last tab state
  • Added background header color

Important Notes on Updating

If you're updating your theme (from 2.x to 3.x) you'll need to go to theme options (Appearance → Theme Options),review the new settings and re-save.

If you have overriding functions in your child theme functions.php, you might experience some minor issues:

Potential Issues with Core Changes

Below is a list of some theme properties that have changed and what we've done to ensure a seamless update process.

Sidebar Position and Individual Slides Settings

First of all, the reasoning behind this change: Upon choosing a custom page layout (or sidebar position), you may have noticed the custom field values would show up in your "Custom Fields" box (e.g; "st_layout_box"). This was kind of ugly and we just wanted to get it out of the way.

The way to suppress the options from the custom field dialog is to prefix them with an underscore. This inherently changes the way they are stored in the database (wp_postmeta).

For existing sites running Synapse, we added a function called update_synapse(). This is hooked to the after_setup_theme() function. Saving the theme options should trigger this function and update your existing custom fields and slide options.

This function is referenced below for better understanding:

function update_synapse() {
	global $wpdb;
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_layout_box' WHERE meta_key = 'st_layout_box';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_slide_type' WHERE meta_key = 'st_slide_type';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_slide_thumb_size' WHERE meta_key = 'st_slide_thumb_size';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_customexcerpt' WHERE meta_key = 'st_customexcerpt';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_customurlname' WHERE meta_key = 'st_customurlname';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_customurl' WHERE meta_key = 'st_customurl';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_slide_linktarget' WHERE meta_key = 'st_slide_linktarget';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_st_show_title' WHERE meta_key = 'st_show_title';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '_st_0' WHERE meta_key = '_st_slide_type' AND meta_value = 'st_0';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '_st_1' WHERE meta_key = '_st_slide_type' AND meta_value = 'st_1';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '_st_2' WHERE meta_key = '_st_slide_type' AND meta_value = 'st_2';");
	$wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '_st_3' WHERE meta_key = '_st_slide_type' AND meta_value = 'st_3';");
}
add_action ('after_setup_theme', 'update_synapse');
comments powered by Disqus