Thematic 1.0.4

Version 1.0.4 has a number of improvements over the previous version.

  • I18n updates to almost every locale. I’d like to extend a big Thanks to all our translators and validators!
  • Middlesister and HelgatheViking were added to the contributors list on the readme  for their continued effort to make Thematic awesome. w00t!
  • Thematic is now supported for use with WordPress version 3.4 and above. Please upgrade your WordPress to it’s current release.
  • The Legacy- Dynamic Class bugs were resolved from the 1.0.3.2 release
  • Props Scottnix for helping fix a warning in thematic_content() and cleaning up thematic_category_archives()
  • Props josephting for helpin restore thematic_validate_opt() to its intended functionality. Child themes can now override the options validation process effectively

Find a bug… report it here. Fix a bug! Even better… give us a pull request at github. Need support? Get it here.

This post is being published upon the version acceptance into the repo it may take a bit longer for the theme to appear in your WP’s auto-updater. If you want it early you can get version 1.0.4 here.

Thematic 1.0.3.3-beta

Thematic 1.0.3.3-beta is availaible on github for anyone interested in testing the latest developments. Any comments and issue discussion of the beta can be made at our github issue tracker

There were dynamic class bugs introduced in Thematic version 1.o.3.1. The symptoms would be that your body and post class filters are not working properly. If you feel that you’ve been affected by them come by the forums. There is an active discussion of this issue here.

Whats Changed:

  • Fixed thematic_body_class() and thematic_post_class() to correctly filter body_class() and post_class()
  • Fixed nextpaged and excerpt classes in thematic_body_class() and thematic_post_class()
  • Removed _deprecated_function() from: thematic_body_class() thematic_post_class() childtheme_override_body_class() childtheme_override_post_class() due to issues with WP_DEBUG breaking the post div and body tag class attributes
  • Moved the thematic_bodyopen() functionality to thematic_body()
  • Deprecated thematic_bodyopen() because it was redundant
  • Moved thematic_body() and childtheme_override_thematic_body() from dynamic-classes.php to header-extensions.php

Thematic 1.0.3.2 release notes

Thematic version 1.0.3.2 has been released! You can get it from the WordPress theme repository.

What changed:

  • A parse error introduced in 1.0.3.1 that was generated from the links.php has been fixed.
  • The latest language updates have been included. Thanks to all the translators and validators at translate.thematic.com
  • The custom header functionality of the included sample child theme has given some more attention.

For anyone who wants to see exactly what changed, the unified diff from the previous version can be seen on Trac. If you find yourself having trouble with the latest version com over to the forums to see if it’s being discussed and start a topic if you need help. If you find a bug our github issue tracker is the place to report it.

Thematic 1.0.3.1 release notes

Thematic 1.0.3.1 is now available from the WordPress theme repository. This release was focusing on improving the internationalization and localization, with a complete string overhaul and updated pot-file. The introduction of glotpress to manage translations have been a success, and several languages have already been updated and are included in this release. Many languages still need updating though, so if you speak a language where the translation is incomplete we would be happy if you helped us with translating.

WPML logoAlso, Thematic is now fully compatible with WPML multilingual plugin! They worked well together already before, but this release includes a XML config file for even better integration.

Other new things are that the sample child theme have been updated to include sample code for custom headers and background.

And that the functions thematic_body_class() and thematic_post_class() have been moved/removed to filtering the core filters body_class and post_class respectively. Adding the following code to your child theme will enable Thematic’s classes to filter into the body_class() and post_class() output.

add_theme_support('thematic_legacy_body_class');
add_theme_support('thematic_legacy_post_class');

There are some more minor changes and bugfixes too, full changelog is in the readme file. Get the latest version from the WordPress theme repository.

Report any bugs you find on the github issue tracker and head over to the forums if you are having any trouble with upgrading.

Updating strings for upcoming 1.0.3

Update Oct 26th 2012: Thematic 1.0.3.1 has been released. Thanks to all that contributed. Keep the translations coming!

The time has come folks! We have gone through all of the Thematic strings and optimized them. This means removing leading and trailing whitespaces, include punctuation for better support of rtl languages, and generally making sentences complete instead of broken up in seperate pieces. We have also removed html markup from the strings as far as possible.

There are also comments and contexts on some strings so that placeholders (all the strange %s-es) are explained. Hopefully it will help in cases where the translation would differ depending on the content of the placeholder, for example in languages with different genders depending on the objects.

All in all almost half of the strings have changed, and we now need help to make the translations up to date. The new pot-file is uploaded to the Thematic glotpress so head over to translate.thematictheme.com and start adding strings in your languages!

Consider this a first runthrough, we are mostly there but small details might change. There are a lot of strings and it’s quite possible that something slipped throught the cracks, so if you spot something weird create an issue on github for it.

Note: If you prefer to use the traditional way of translating with poedit or similar software, the actual potfile can be found on a branch on github included in the release. Though you certainly can use it as a base and send a pull request with your translation, we would prefer if you use glotpress since it makes our lives easier to keep the translations in one place. But your contribution is welcome no matter how you choose to do it!

Thematic Development Moves to Github

At the begging and insistence of myself and Middlesister, we’ve shifted all the Thematic development over to Github.

Find us on the hub: https://github.com/ThematicTheme/Thematic

Github's octocat logo

Come on, Octocats are cute.

Visually, the Github website makes me feel like we’re not coding in the dark ages any more, I personally find the git fork and pull idea more intuitive and inclusive, but the biggest benefit (in my sometimes humble opinion) is that Github is infinitely more social.  There is a community of coders working on different things, and that’s what Thematic really needs right now.  We need more people chipping in or Thematic will get stagnant again.

The next major release for Thematic is going to be 1.0.3 and it is intended to be a major improvement to all the theme’s translatable strings, but this is going pretty slowly since those of us who work on it have been busy.  We need your help.  If you are already on github and understand how git works (I am still learning too!) then please Fork Us, read Otto’s definitive article on Internationalization and just go through 1 or 2 files to improve all the strings, then send a pull request.

And I’m aware that getting set up with git is not the easiest.  If anybody would like to step up and write a tutorial on how to set up a fork that’d be amazing.  If you think git is a bit over your head, don’t worry you can still help out by reporting bugs at: https://github.com/ThematicTheme/Thematic/issues

Thematic 1.0.2 Release Notes

Thematic 1.0.2 has been available in the WordPress Theme Repository for about a week now and a few bugs have been reported in the forums.

The title tag not displaying properly and shortcodes not producing the expected output. I’m glad to say that thanks to helgatheviking the bugs have been patched and you can find the officially theme reviewed, latest, and greatest Thematic 1.0.2.1 here:

http://wordpress.org/extend/themes/download/thematic.1.0.2.1.zip

An easier way to translate Thematic

The main focus for the upcoming 1.0.3 release is to improve and optimize the internationalization and localization of Thematic. The internationalization part refers to simply enable things to be translated, whereas the localization is the actual process of translating to different languages. Both of these things needs some attention.

There are many language files that come with Thematic but not many of them is up to date. With the 1.0 update, the pot file used for translations became out of sync and was regenerated for 1.0.2. This means that the language files need to be updated again, or some strings that have not been translated yet will show up in english on your site.

Regarding the strings, there are some issues regarding leading and trailing spaces in the translatable strings that needs to be looked over. Some needs to include punctuation so to better support rtl languages. This would mean that when we are finished, the pot file will need to be regenerated again and all languages will become out of sync. Again. Plus, since many strings will change in the backend, there is a high probability of untranslated content showing up on your site until the languages files become updated.

To speed up the process of localization and hopefully make it easier for everyone, we have decided to install Glotpress. This is the same tool that is used by WordPress itself for handling translations. You can read about the basics at their own Glotpress installation. Translation of strings will be done through the web, powered by the community. Say hello to translate.thematictheme.com!

In short, if you are a registered member of the forum, you are a contributor and can suggest translations for strings in any language. The current language files are loaded here. As you can see, not very many are up to date. You can log in with the same credentials as for the forum and start adding suggestions. A validator will then need to choose the correct translation if there are several suggestions and mark it as such. If you are a native speaker of a language and wish to become validator, talk to one of the admins. The same applies if you want to add a locale not yet in the list, tell us so we can add it.

When we are finished with the internationalization part, we will regenerate the pot file and give everyone a heads up so you can go to glotpress and start working on the localization part. Since we don’t speak all languages of the world, we are dependent on your contributions for this. Easiest way of contributing to Thematic!

So what happens when all is translated? Well in each language screen, there are export links at the bottom. You can at any given moment export your desired translation files. You will need to export twice, once for the .mo file and once for the .po file. Rename your files to locale.mo and locale.po (for example sv_SE.mo and sv_SE.po) and drop them in the library/languages folder of thematic.

This means that you are no longer tied to waiting for Thematic releases to get your translations. We will of course continue to include language files in the releases, but this will hopefully speed up the process and  make it easier for everyone to keep translations up to date.

Improved separation of comments and pingbacks in Thematic 1.0.1

In previous versions of Thematic, the code to separate pingbacks and trackbacks has been based on this article by Ian Stewart. In that article he laments that comments and trackbacks are displayed in the same list by default and shows how to separate them in the comments template. The article was written in 2009, but the principle is common. Use a counter variable to count the number of comments and trackbacks and then make two separate loops to display them. The problem lies in that the paginate_comments_link() function only gets called on the comments list. There are no pagination links for the trackbacks.

Say you have 8 comments and 15 trackbacks, and you have set WordPress to display a maximum of 5 comments per page. That would give you 2 comment-pages and 3 trackback-pages, which is 13 responses = 5 pages altogether. But since we are separating the trackbacks from the pingbacks and the pagination links only were for the comments, the pagination would only show 2 pages and any trackback-pages beyond that would not be reachable. And on top of that, WordPress keeps track of the number of comment-pages internally so that when someone adds a comment they would be redirected to comment-page number 5 – which would be completely empty!

All of this has been addressed in the release of Thematic 1.0.1. For those of you who want to know how it’s done…

Read More »

Improved Script and Style Loading in Thematic 1.0.1

After a long wait, Thematic 1.0.1 has been live in the WordPress repositories now for a couple of days now!

Thematic 1.0 underwent some major changes to be compliant with WordPress Theme Review Guidelines and best practices as recommended by the WordPress Codex. The issue most likely to have effected your upgrade experience was the switch to the proper enqueing of stylesheets and scripts using wp_enqueue_stylesheet and wp_enqueue_script respectively. This led to some changes to existing functions and the removal of a few old filters that didn’t make sense anymore given the new approach. You can see the massive changelog in the readme.txt file that comes with Thematic, but really, its huge, so it would be easy to miss the ones that are effecting you.

If you’ve been following along with WordPress development, it is likely that you were already using wp_enqueue_script and wp_enqueue_style and this upgrade didn’t cause you any trouble whatsoever. But, if the upgrade didn’t go smoothly for you, then it is quite likely one of the following changes is to blame and hopefully this article will help you sort it out.  We’re going to need to diagnose what went wrong based on what you used to be doing and what has changed.

* Changed: Filter thematic_dropdown_options.

Were you serving your own modified version of the thematic-dropdowns.js script to tweak the widths of the dropdowns, add arrows, or change the delay on the hover? If so, then you might have been filtering thematic_dropdown_options. This filter used to work like so:

function childtheme_dropdown_options() {
$newscript_uri = "\n" . '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . ' /scripts/thematic-dropdowns.js"></script>' . "\n";
 return $newscript_uri;
}
add_filter('thematic_dropdown_options','childtheme_dropdown_options');

in that you needed to return the whole script tag. That is no longer the case and now you need only to return the URL of the script like so:

function childtheme_dropdown_options() {
 $newscript_uri = get_stylesheet_directory_uri() . '/scripts/thematic-dropdowns.js';
 return $newscript_uri;
}
add_filter('thematic_dropdown_options','childtheme_dropdown_options');

* Removed: Variable thematic_use_superfish. * Added: add_theme_support('thematic_superfish')

We’ve switched to using the WordPress function add_theme_support to determine whether to load the superfish scripts. Previously there was a filter called thematic_use_superfish, that you could target to remove the dropdown scripts if you didn’t need them.

function childtheme_no_superfish(){
 return FALSE; // we don't want any of your vegetables!
}
add_filter('thematic_use_superfish','childtheme_no_superfish');

or if you were being super elegant, perhaps you killed the dropdowns with this:

add_filter('thematic_use_superfish','__return_FALSE');

But, we’ve ditched this filter in favor of using WordPress’ theme support feature. It is an easy switch. If you don’t want to load any of the superfish, dropdown scripts then you should now do it this way:

function childtheme_no_superfish(){
 remove_theme_support('thematic_superfish');
}
add_action('thematic_child_init','childtheme_no_superfish');

Note that thematic_child_init is a new action hook, that is specifically placed to remove any theme supports added by Thematic.

* Removed: Filter thematic_head_scripts.

To be fair this one isn’t in the readme as far as I can see, but the problem is similar to the issue with thematic-dropdowns.js. Maybe you were using this filter to you maybe wanted to remove all the superfish and supersubs scripts because you don’t use dropdowns. Or perhaps you were adding your own scripts here.

function childtheme_scripts($scripts){
 return FALSE; //we don't want any of your vegetable scripts!
}
add_filter('thematic_head_scripts','childtheme_scripts');

or if you were adding a scripts of your own, maybe you did something like this:

function childtheme_scripts($scripts){
 $scripts .= "\n" . '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . ' /scripts/thematic-dropdowns.js"></script>' . "\n";
 return $scripts;
}
add_filter('thematic_head_scripts','childtheme_scripts');

As before, we are now using using wp_enqueue_script, so thematic_head_scripts() is now only a function that is added to the wp_enqueue_scripts hook. You can remove it entirely the same way you remove any action:

function childtheme_remove_scripts(){
 remove_action('wp_enqueue_scripts','thematic_head_scripts');
}
add_action('init','childtheme_remove_scripts');

or possibly you were using the override:

function childtheme_override_head_scripts(){
 // absolutely no bacon here
}

However, that is a bit of a nuclear bomb approach and will also wipe out an important script for handling comment replies, which you may or may not need. But thematic is super granular and you can use a scalpel to kill the drop downs scripts quite easily instead of using a viking war hammer with the remove_theme_supportscrap of code from earlier.

If instead, you need to load more scripts, then you should make like Thematic and use wp_enqueue_script.

function childtheme_scripts(){
 wp_enqueue_script('bacon-script', get_stylesheet_directory_uri . '/scripts/bacon.js', array('jquery'), '1.0', true);
 wp_enqueue_script('guacmole-script', get_stylesheet_directory_uri . '/scripts/guac.js', array('jquery'));
}
add_action('wp_enqueue_scripts','childtheme_scripts');

If you are wondering about why the two lines are different, you can read more about how to use wp_enqueue_script in the WordPress Codex:

* Changed: Function thematic_create_stylesheet to wp_enqueue_style.
* Removed: filter thematic_create_stylesheet.

I saw this come up in the forum already. Someone was using the thematic_create_stylesheet filter to add extra stylesheets to the header. Something along the lines of :

function childtheme_create_stylesheet($style) {
   $style .= "\n" . '<link rel='stylesheet' type='text/css' href="' . get_stylesheet_directory_uri() . ' /styles/blue-style.css" />' . "\n";
  return $style;
}
add_filter('thematic_create_stylesheet', 'childtheme_create_stylesheet');

Well that filter is gone like a bowl of my famous guacamole, so if you need to add more stylesheets, then we’ll have to add them the updated way… which by the by, will work better with any caching plugins you might be using and prevents the same style from being loaded twice (like if you were loading the supersized script’s css and then you had a plugin that was also trying to load the same stylesheet).

Thematic is now loading the main stylesheet like so:

function thematic_create_stylesheet() {
 wp_enqueue_style( 'thematic_style', get_stylesheet_uri() );
}
add_action('wp_enqueue_scripts','thematic_create_stylesheet');

I can’t think of too many reasons why you’d ever need to change that. Your theme will always need a style.css in order to be a valid theme. But if you need to add more stylesheets, it is going to work just like enqueueing scripts except we use a slightly different function, wp_enqueue_style.

function childtheme_create_stylesheet() {
 wp_enqueue_style( 'blue_style', get_stylesheet_directory_uri() . '/styles/blue.css' );
}
add_action('wp_enqueue_scripts','childtheme_create_stylesheet');

Oh Noes! Something is still broken!

Well, head to the support forums and start a new thread. Here is a tip for getting better support: do NOT just say “my menu won’t work”. This tells me and the other volunteers absolutely nothing and makes it impossible to help you. Be precise when describing exactly what you are trying to accomplish, what you are seeing/experiencing now, compare that to what you were experiencing before hand, and tell us anything that you might have already tried. Screenshots can be helpful as can links to your live site.

Thematic Support Forums