Sayontan

Sayontan Sinha is a technology strategy consultant living in Houston, Texas. Coding is his hobby, as are philately, numismatics, classical music, creative writing and quizzing. He is the author of numerous pieces of WordPress software, including the ultra-popular Suffusion WordPress theme and the versatile Photonic (for Flickr, Picasa, Smugmug and 500px.com integration) and FontMeister.

Jul 092012
 
Design

Nope, I am not back from vacation yet. On an extremely long layover at JFK I managed to add a few touches to release 4.2.4, queued up the changes for release, typed up this post and packed up. The changes are really minor in nature:

  1. I added new action hooks suffusion_before_custom_layout_widgets and suffusion_after_custom_layout_widgets, using which you can add sections in between the widget areas of the Custom Layout Template. So if you are using a child theme you can make use of these hooks to define things like headers etc. for each section of the Custom Layout Template.
  2. I also extended the suffusion_admin_modify_option_list support for “associative arrays” in the back-end. This means you should be able to tweak the options lists for dynamically generated multi-dimensional arrays in the back-end. In really simple terms, you can do things like adding options to the byline position drop-downs for custom post types.
  3. The post_class filter was causing issues for bbPress custom post types. This has been addressed.

In other good news I have coded up a bbPress pack to help you extend bbPress template support for Suffusion.

I will be back from my vacation on 19th. Till then, enjoy!

Jun 302012
 
Design

The one last version I managed to squeeze in before I embarked on my vacation was 4.2.4. Don’t worry, this post has been written prior to my vacation – it is only being posted while I am holidaying.

This is another small release (which is what I like doing, really, as opposed to humongous ones), with the following:

  1. New Features
    1. Rudimentary Device Support
      As promised in my last post, I have added support for some mobile-specific classes. There are a bunch of conditionals available, such as is_mobile, is_iphone and is_ipad, which determine the device-type based on the user-agent of the browser. Based on this, certain classes are added to the body element of the page. E.g. device-desktop is added as a class if you are browsing through a desktop. The code for all of this has been liberally lifted from the mobble plugin.
      I didn’t have the time to fit in the sidebar positioning features – those will happen after I return.
    2. More Byline Control
      I have added the capability to specify starting and trailing texts for bylines. This means you can remove things like the “Tagged with: ” for tags and add text like “Filed under” for categories. Check out the options under Other Graphical Elements → Byline Configuration. For people desiring additional control, I have added the filters suffusion_before_byline_html and suffusion_after_byline_html to help you modify the strings based on your display etc.
    3. Some Admin Extensibility
      So far Suffusion has been fairly rigid about the back-end options. Of course, you can do insane amount of stuff with the options, but there has been no way to extend the options via child themes. In a first step to even better flexibility (who knew that was possible?), you can now use the suffusion_admin_modify_option_list filter and enhance the option list. E.g. if you are building a child theme with a new byline style, you could add the byline style to your list and make it available to all users of the child theme.
  2. Bug Fixes
    1. In some cases incorrect byline information was appearing if displayed in the post footer. This has been rectified.
    2. There was a bug in the reset capability for custom backgrounds – I have taken care of that.

Hope you enjoy this release, while I enjoy my vacation.

Jun 222012
 
Design

Version 4.2.3 of Suffusion was approved today. This is a small update with the following changes:

  1. The Magazine template was not showing any <h1> tag. This has been addressed.
  2. I made a small change to the way Suffusion interacts with the Category Icons plugin. In some cases the plugin was displaying 2 category icons. This shouldn’t happen now.
  3. This was a weird one. The site that distributed the original “Now Reading” plugin is currently infected. Suffusion’s admin pages had a link to this plugin, and some “security” plugins were reporting this as a critical problem, indicating that your site and / or Suffusion were infected. Be assured that there is nothing wrong with either. Nonetheless I have changed the link to the “Now Reading Reloaded” plugin’s WordPress page, which in turn points to the infected URL.
  4. The date box wasn’t lining up properly in IE. This has been fixed.
  5. Custom Background Changes:
    1. I wrote about this in depth in my previous post (see the “Impact on Suffusion” section).

      If you are using a custom background from Appearance → Suffusion Options → Skinning → Body Background, there is a high likelihood that your background will not work.

      Don’t be alarmed – this is very easy to fix. Just go to Appearance → Background, and restore the settings to the defaults.

    2. This is essentially a BP bug – BuddyPress doesn’t respect the custom background defined via Appearance → Background, so I took care of it in Suffusion. A custom background will be preserved on BP pages as well.

Baby Steps Towards “Responsive” Design

Version 4.2.4 will take baby steps towards responsive design. The first thing it will do is add device-specific classes to the <body> element. I lifted most of the code for this from the “Mobble” plugin. The second thing it will probably do is shuffle the sidebars around for narrower layouts. Of course, if it does this, it will be configurable, entirely optional and switched off by default.

My thoughts around this kind of design are no secret – I believe that is defeating the true purpose of mobile design. All it is doing is saving the users the effort to do a pinch / zoom and a horizontal pan (never mind that the effort for the vertical pan increases). It is not going to save any bandwidth. However, till I come up with more innovative ways to make sites truly responsive, this is the best I can offer.

Time Out

It has been a while since I have visited India – back then the football and cricket World Cups hadn’t happened and Roger Federer was still the master of all he surveyed. I am looking forward to my vacation a good bit, and needless to say, I will not be logging into the forum for support requests on a daily basis. Hopefully the galaxy of Suffusion will not collapse. Don’t panic!

Jun 192012
 
Announcement

The biggest event in the WP universe last week was the release of version 3.4 of WP. While the event generated a fair amount of press, I honestly found the release very underwhelming. Broadly speaking, here are a few highlights of this release:

  1. New Theme Customizer
    From your Appearance → Themes menu you will see an option to “Customize” themes or see a “Live Preview” of them, in addition to the already existing “Options” link. The key difference is that for the “Customize” or “Live Preview” feature to work, your theme doesn’t have to be active. You could try out basic customizations and then activate the theme. While this is a useful feature, from a developers’ point of view this is merely eye-candy with very little value addition. Themes that rely extensively on options will find it nearly impossible to embed all their options in the customizer, and I don’t believe the intent of the customizer was to have developers do this (Suffusion has more than 700 options – imagine all of them in the Customizer!!). The only benefit I can see is from a skinning perspective, if a developer offers previews of multiple skins via the customizer (which is something I have bundled with Suffusion)
  2. Header and Body Background Customization
    Back in version 3.0 of WP, capabilities were introduced to natively support custom headers and backgrounds from WP itself. The functionality has been modified in version 3.4 and custom headers now support flexible widths. Apart from this, there is no impact to end-users.
  3. Better Theme Searching
    The theme installer has been improved to have an “infinite scroll”. In other words, if you search for a theme from Appearance → Themes → Install Themes and there are several matches, WP displays a few, then loads the rest on the same page as you scroll down.
  4. Templates in Sub-Directories
    One of the more painful aspects of developing a theme was in the way WP handled template files: all template files had to be in the theme’s root directory. In this release you can have template files in sub-directories. This is a feature I like, because it simplifies file organization significantly. For an end-user this has no impact.

What didn’t make it

There are several tickets that have been submitted with patches to the WP core, and they have been submitted several months back. Yet, release after release such tickets fail to get merged into the core, though the changes would be small to add and would provide immense benefit. Here is an example that I had submitted, which incidentally was a duplicate of an ages old ticket. This is an easy change to make and verify, and adding this ticket would let different plugins play nicely with each other while modifying the custom menu functionality. As things stand now, two different plugins cannot modify the menu items under Appearance → Menus.

This is one ticket I am aware of because I wrote a patch for it, and I am sure there are scores of others that got triaged in such a manner. Another that didn’t make the cut was the support for multiple screenshots in the theme back-end. Of course, the live preview functionality makes up for this somewhat.

In essence, the feeling I got from this release is that it was very light on good features. The developers might point to the Theme Customizer, but, the Live Preview feature apart, the only people who will benefit from it are those who have just a handful of options screens. Bear in mind that theme developers have been building options screens since a really long time, so a lot of users are used to seeing comprehensive options.

Having been in consulting for a while managing projects worth a few million on occasion, I do understand the process of triaging and prioritizing issues and fixes. It is perfectly normal for a few things to be prioritized over others, but maybe the good folks developing WP should stop once in a while and grab the low-hanging fruit. This is not meant as a criticism of this release of WP – I am sure what was done was done well enough. It is just that I was very happy when the last few releases came out: 3.0 had navigation menus, custom post types and native support for custom headers & backgrounds, 3.1 had custom post formats, 3.2 had TwentyEleven and had phased out PHP 4 support, and 3.3 had some neat APIs. But in 3.4 apart from the ability to define templates in sub-folders I didn’t find many appealing features.

Impact on Suffusion

In general I manage to stay on top of releases by silently yet actively tracking changing requirements and issues reported on other folks’ tickets. So most of the time users don’t have to wait for me to make Suffusion compatible with a new WP version.

However, this time I am compelled to make a change in theme behaviour. Recently there was a heated discussion on the Theme Reviewers’ mailing list about the way WP’s custom background works. The TL;DR version of the discussion was:

If a theme implements WP’s “custom background” feature, it should do it fully. In other words, if Appearance → Background doesn’t have an image, the site background mustn’t show an image.

So here is what I did for the next version of Suffusion:

  1. If Appearance → Background has a background image, that image will be shown as your site’s background (no change in this behaviour).
  2. If Appearance → Background has no background image, there will be no background image for your site. This is a big and disruptive change, because users might have set no image in this section. Sorry, but if I had my way, I wouldn’t have forced this on you.
  3. If Appearance → Background has the default background image, only then will the settings from Appearance → Suffusion Options → Skinning → Body Background take effect. If you have left this section to have “Theme Styles”, then everything will be as default.

So, if you upgrade to the next version of Suffusion (4.2.3) and your background suddenly goes AWOL, please don’t be alarmed. You can go into Appearance → Background and simply restore the defaults there.

This is something that bears repeating, so I am going to post the instructions again when the new version is released.

Jun 132012
 
Photonic

After a long time I managed to do something on Photonic. This is for the users of 500px.com: Photonic now supports tag and term based search of images.

In addition, the following new capabilities have been added for 500px.com:

  1. Support for category exclusion by use of the exclude parameter
  2. Inclusion of some more “sort by” types
  3. Inclusion of new categories added by 500px.com

In all, 500px.com’s API is still not on par with the other providers, and the features that Photonic provides are restricted due to this. Nonetheless the photos on their site are awe-inspiring, so I am happy to support them.

Jun 122012
 
Design

Version 4.2.1 of Suffusion had an issue with RSS feeds. Feeds were not validating correctly due to an improper character in the feed title. So I patched the issue and submitted version 4.2.2.

Additionally version 4.2.2 addresses a minor issue – the blog title and description were not getting placed on the right side of the header. I have fixed this as well.

Jun 112012
 
Design

For the first time in several months I had a release of Suffusion submitted and approved on the same day. Version 4.2.1 of Suffusion is a moderately big release with the following updates, with a lot of focus on the upcoming version 3.4 of WordPress:

  1. New Features
    1. Scribbles
      The biggest feature of this release is the new skin, “Scribbles”. It features more than moderate use of CSS3, a wooden background, “Post It” and notebook styling and the “Coming Soon” font.
    2. New Iconset
      In keeping with “Scribbles”, I have added a new iconset. This iconset is largely based on the offbeat Web Design Creatives icons.
    3. New Byline Styles
      Again, another change courtesy “Scribbles” – there is now a new byline type that lets you position the bylines outside the post, by the side. Think of it like a pullout, except that in the incumbent pullout bylines, the byline was below the post title, but here the title is beside the byline. Try it out at Other Graphical Elements → Post and Page Bylines.
    4. Custom classes for Custom Post Types
      As a part of my ongoing efforts to support Custom Post Types better, I have added the capability to specify a CSS class for both, the Custom Post Type Archive template (seen under Additional Options for Suffusion → Custom Post Type Archive) and individual custom post types (seen under Custom Types → Layouts)
    5. Native Custom Headers
      This is to gear up for WP 3.4. I was earlier unable to add support for WP’s native custom headers, because WP didn’t support flexible widths. But with 3.4 this is not going to be an issue, so Suffusion 4.2.1 has support for custom headers, assuming you are on WP 3.4.
    6. WP 3.4 Theme Customizer Support
      WP 3.4 has introduced a new concept called Theme Customizer. I have added an option to just try out the skins of the theme from the Customizer without having to activate the theme. This is more of an “FYI” for you and shouldn’t have any bearing on how you use the theme.
  2. Changed Features
    1. “Follow Me” Icon Changes
      This was necessitated because there was some ambiguity around the licensing for some of the previous icons. I have replaced them with reasonable facsimiles that I have built myself. Hopefully the effect will not be too jarring.
    2. Markup Changes
      There are several markup changes due to the introduction of the new byline styles.

      Child theme users, please check your child theme template files for any differences with respect to the theme files.

    3. Translations
      In the last file I had forgotten to update the PO file for the theme. I have updated the same now.
    4. Code Housekeeping
      1. Some API calls that get deprecated with WP 3.4 have now been removed.
      2. Some “custom post meta fields” have been renamed and prefixed with “suf_”. The named fields are meta_keywords, meta_description, thumbnail and featured_image. This should be transparent from your perspective.
      3. Most of the post_class arguments have now been added through a filter. This is to facilitate better integration with plugins, but for most users it should have no effect. This is in accordance with the new guidelines from the WP Theme Review Team.
      4. The calls to wp_title have all been replaced with the appropriate filter. This is in accordance with the new guidelines from the WP Theme Review Team.
      5. Uses of get_stylesheet_directory_uri have been appropriately replaced with get_stylesheet_uri in accordance with the new guidelines from the WP Theme Review Team.
      6. The template files now have no inline styles. This means that you can use custom CSS without having to force the !important directive for many cases.
  3. Bug Fixes
    1. The Authors template had a minor (undetected) bug, that would cause issues due to a potential conflict of global variables. This should be fine now.
    2. The Custom Layout Template was not respecting the option to “Keep original heights” for the widgets. I have fixed this.
    3. The rotating headers capability was not working if the generated CSS was being linked as a file. This should be fine now, too.
    4. Under some very rare cases the breadcrumbs code was crashing. I have taken care to ensure that the appropriate checks are in place so that the code no longer crashes.

What I couldn’t fix

There were some reports of issues with incorrect tags showing up on posts. This wasn’t something I could replicate, hence I couldn’t fix this.

Additionally, I was not able to add the features of “Scribbles” to Suffusion BP Pack or Suffusion Commerce Pack.

I am going to switch to a “minor release” mode till I am done with my vacation that ends in mid-July. This means I am not going to push any big items out during this time. Photonic is due an update, as are the two Suffusion packs, so you can expect new versions of those in the near future.

Hope you enjoy this release.

Jun 052012
 
Opinion

This is something I hate doing, but unfortunately with new features come new changes. I did mention in my previous posts that I am working on a new skin. The skin is called “Scribbles” and you can see a demo of it.

If you look at this skin closely, you will see a lot of new features such as:

  1. A new byline style (which places the byline beside the post, unlike the earlier “pullout” style).
  2. Some markup changes, allowing you to use a separate image for the post header (like the top of a notebook) vs. one for the rest of the post (like the rules of a notebook).
  3. Some snazzy CSS effects, like the “tape” at the top of widgets, more use of shadows etc.
  4. A very informal looking icon set based on the superb Web Design Creatives icons, which is a GPL-licensed icon set.

The first two in the above have required me to closely scrutinize all my existing markup up to this point, and at several places I have had to add a few new lines of code, mostly to ensure that a particular action or filter was getting executed. Unfortunately this has meant changing some of the files in the custom folder, some layouts etc.

So, if you are upgrading to the new version, you will have to reconcile any files you may have edited in a child theme with the original source files. If you want to get a headstart, take a look at the GIT repository for the theme.

I am putting the finishing touches on this version and I should be able to submit it in a week or two. I desperately want it in before I leave for my vacation at the end of this month, so I will make every effort to ensure that the development is completed.

May 222012
 
Plugin

I have released version 1.02 of FontMeister with a minor feature addition: TinyMCE support. Fonts that you add through FontMeister will now be visible in the drop-down list of fonts that you see in your visual editor in WP for editing posts and pages.

Note that for Typekit fonts you will not be able to see the font taking effect in the back-end. This is due to how Typekit and the WP Editor respectively operate, and is not a bug with the plugin.