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.
paging

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

10+ Best Resources & Tools for Web Designers (2024 update)

Is searching for the best web design tools to suit your needs akin to having a recurring bad dream? Does each…

3 Essential Design Trends, April 2024

Ready to jump into some amazing new design ideas for Spring? Our roundup has everything from UX to color trends…

How to Plan Your First Successful Website

Planning a new website can be exciting and — if you’re anything like me — a little daunting. Whether you’re an…

15 Best New Fonts, March 2024

Welcome to March’s edition of our roundup of the best new fonts for designers. This month’s compilation includes…

LimeWire Developer APIs Herald a New Era of AI Integration

Generative AI is a fascinating technology. Far from the design killer some people feared, it is an empowering and…

20 Best New Websites, March 2024

Welcome to our pick of sites for March. This month’s collection tends towards the simple and clean, which goes to show…

Exciting New Tools for Designers, March 2024

The fast-paced world of design never stops turning, and staying ahead of the curve is essential for creatives. As…

Web Tech Trends to Watch in 2024 and Beyond

It hardly seems possible given the radical transformations we’ve seen over the last few decades, but the web design…

6 Best AI Productivity Apps in 2024

There’s no escaping it: if you want to be successful, you need to be productive. The more you work, the more you…

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…