What’s new and exciting in WordPress 4.1

Default avatar.
December 04, 2014
What’s new and exciting in WordPress 4.1.
The upcoming WordPress 4.1 release is going to pass the release candidate mark, so we now have an opportunity to look closer at the forthcoming features. Those features vary from the introduction of new UI elements, and modes in the dashboard, to the query API and performance enhancements — there’s something for everyone to get excited about. John Blackborn is leading the cycle and proposed improvements affect a widely range of core functionality. This release was planned as a relatively short one — less than three months — so it mainly continues the direction started in earlier updates. However, the most anticipated update, WP REST API (announced at WordCamp San Francisco 2014), will still not be merged as a core feature and continues its existence as plugin (at least for now). Let’s see what we can get excited about…

Theme related news

First of all, a new default theme is being introduced: Twenty Fifteen. It is designed beautifully and fits well with the whole direction of WordPress internationalization. It uses Google’s Noto Serif and Sans fonts which support many languages, so that there is no need to adjust fonts for your language (a well-known problem for users who publish in languages with non-latin alphabets). tf8 From a features point of view the theme has options such as custom header and custom background, ability to set color schemes, and built-in support for popular social buttons. You need only create a menu in the native WordPress interface to have these icons appear on your site. Theme developers will find interesting new tools in 4.1: The Custom Customizer Controls API allows you to register and render your own controls in Customizer sections for better theme option management. Now you can use JS templates to render custom controls on the client without any server-side calls. The whole logic of the API is covered in this make.wordpress.org post. Besides that, new template tags have been introduced to make working with navigation easier in templates. Many themes include support for plugins such as WP-Page-Navi to simplify the creation of paging, because native functions like paginate_links are sometimes tricky to use. You don’t need to do that anymore, there are new template tags in WP 4.1 to address the issue:
  • thepostnavigation - should be used in the single post template to create next and previous post links;
  • thepostsnavigation - should be used in archive templates to create links to next and previous archive pages;
  • the_pagination - numbered paging links for archives, the implementation of which can be seen in the Twenty Fifteen theme.

Dashboard features

There were various improvements to language pack support in recent releases. In 4.1 this trend goes further and users now can download appropriate language packs from wordpress.org directly when changing them on the Settings screen. The only possible issue in the process is the correct writing permissions. lang-pack-ui Another new feature already has the reputation for being the most controversial thing in the release. It’s the so-called Focus mode that aims to improve beginner experience with a distraction free mode. Not so many users know about this mode and those who do often don’t find it useful. In Focus the user is going to be put in a destruction free environment during the regular post-editing process. https://www.youtube.com/watch?v=-qLnq4ZvI4I Focus could be switched off in settings and there’s already a lot of discussion as to whether it should be turned on by default. WordPress beginners often find it difficult to align images in the WordPress post editor. Since 4.1 users will have a floating panel in Visual mode to make things more intuitive. img-edit Login sessions were implemented in 4.0 and they are going to have management UI in settings. Users can review what sessions they have on different devices and log out if necessary. session-ui

For developers

Developers may welcome the improvements for _Query classes that allow nested queries to be built based on taxonomy, metadata and date. For example, let’s suppose that you have posts with ‘city’ and ‘state’ metadata, and you want to fetch all items that match either city=Miami&state=Ohio or city=Augusta&state=Maine. The syntax should look like this:
$query = new WPQuery( array( 'metaquery' => array( 'relation' => 'OR', array( 'relation' => 'AND', array( 'key' => 'city', 'value' => 'Miami', ), array( 'key' => 'state', 'value' => 'Ohio', ), ), array( 'relation' => 'AND', array( 'key' => 'city', 'value' => 'Augusta', ), array( 'key' => 'state', 'value' => 'Maine', ), ), ), ) );
The same functionality exists for the taxonomy query and date query with additional bug fixes, a complete record of which can be seen here. The second ‘big’ and widely discussed change is the introduction of shared terms — which means that you can have two terms with the same name and slug belonging to different taxonomies. It aims to handle the case when changes in one set of shared terms don’t affect other terms. Term splitting is still in beta versions but may be removed from the final release in the case of negative feedback. So theme and plugin developers are heavily encouraged to test their products thoroughly. The Kubric theme set the practice of outputting the content of <title> tag with the addition of some custom code. Because there is no consistency in such an approach it leads to problems for users when they would like to use SEO plugins or have complex structure in their titles. Now things are going to change with the introduction of the ‘theme support’ approach to output the <title> tag. Starting with 4.1 the recommended way for themes to display titles is as follows:
function themeslugsetup() { addthemesupport( 'title-tag' ); } addaction( 'aftersetuptheme', 'themeslug_setup' );
By declaring support like this, themes acknowledge that they are not defining titles on their own and WordPress (or a plugin) can add it safely without duplication. More details on backward compatibility can be found here. In addition to all these great things the recent beta contains all security fixes that were introduced in the 4.0.1 upgrade.

Anna Ladoshkina

Anna Ladoshkina is a freelance web designer and developer who likes to build pretty things with WordPress and write about it. Connect with Anna on Twitter (@foralien) or on her website, www.foralien.com.

Read Next

3 Essential Design Trends, February 2024

From atypical typefaces to neutral colors to unusual user patterns, there are plenty of new website design trends to…

Surviving the Leap from College to Real-World Design

So, you’ve finished college and are ready to showcase your design skills to the world. This is a pivotal moment that…

20 Mind-Bending Illusions That Will Make You Question Reality

Mind-bending videos. Divisive Images. Eye-straining visuals. This list of optical illusions has it all. Join us as we…

15 Best New Fonts, February 2024

Welcome to February’s roundup of the best new fonts for designers. This month’s compilation includes some innovative…

The 10 Best WordPress Quiz Plugins in 2024

Whether it’s boosting your organic search visibility or collecting data for targeted email marketing campaigns, a great…

20 Best New Websites, February 2024

It’s almost Valentine’s Day, so this latest collection is a billet-doux celebrating the best of the web this month.

Everything You Need to Know About Image Formats In 2024

Always trying to walk the tightrope between image quality and file size? Looking to branch out from JPGs and PNGs this…

The 10 Best Logos of 2023 - Ranked

From vintage aesthetics to innovative new color schemes, we’ve seen a lot of creative logo designs this year. In this…

Exciting New Tools for Designers, February 2024

2024 is well underway and shaping up to be an interesting year. So, to help you keep your focus on working hard and…

The Art of Engineering AI Prompts

In the rapidly evolving world of artificial intelligence, the ability to communicate effectively with AI tools has…

15 Best New Fonts, January 2024

In this month’s roundup of the best new fonts, we find a large number of vintage, retro, and revival typefaces. Is it…

5 Web Design Disasters That Will Ruin Your 2024

Welcome to 2024, where web design is as fast-paced as ever. You know how crucial a killer website is nowadays — your…