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/​w​a​t​c​h​?​v​=​-​q​L​n​q​4​ZvI4I 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

AI Changes Everything and Nothing

The marketing frenzy surrounding the recent flood of AI-powered apps and services has caused some observers to question…

15 Best New Fonts, March 2023

Fonts are one of the most critical tools in any designer’s toolbox. With clever use, you can transform a design from hu…

20 Best New Websites, March 2023

We have another exciting collection of the best new sites on the web for you. In this month’s episode, there are severa…

Exciting New Tools for Designers, March 2023

We have invoicing apps and scheduling tools. Some resources will save you the trouble of hiring a designer or developer…

Free Download: Budget Planner UI Kit

Designing an onboarding process can be tricky; there are so many different options, and if you get it wrong, you could …

3 Essential Design Trends, February 2023

There’s a common theme in this month’s collection of website design trends – typography. All three of these trends show…

Free Download: Education Icons

Icons are essential for successful web design. They provide an eye-catching, unobtrusive way to communicate important i…

15 Best New Fonts, February 2023

The fonts you embed in your website transform the design and can mean the difference between an extraordinary brand exp…

Unlocking the Power of Design to Help Users Make Smart Decisions

Users are faced with decision-making on websites every day. The decision-making process can be far more complex than it…

20 Best New Websites, February 2023

The quality of websites in 2023 has moved up a gear, with designers cherry-picking trends as tools, embracing new ideas…

AI’s Impact on the Web Is Growing

Despite the massive strides tech has taken in the last few years, we rarely see a week as tumultuous as this. When your…

Exciting New Tools for Designers, February 2023

No matter what you’re working on, you can guarantee that there’s a cool app, resource, or service that will help you do…