WordPress 4.4新增功能

tech2022-10-22  98

This article is outdated, check out what’s new in WordPress 4.6 here.

本文已过时, 请在此处查看WordPress 4.6的新增功能 。

WordPress 4.4 has just landed, named ‘Clifford’ in honor of the jazz trumpeter Clifford Brown. We’ve covered previous releases and there’s always something that excites me, but nothing comes close to this release. This is due to native responsive image support, WordPress now becoming an oEmbed provider and the introduction of the first half of the WP API.

WordPress 4.4刚刚登陆,以爵士号手Clifford Brown的名字命名为“ Clifford”。 我们已经介绍了以前的发行版,总有一些让我兴奋的东西,但是没有什么比这个发行版更接近。 这是由于本机响应图像支持,WordPress现在成为了oEmbed提供商,并且引入了WP API的前半部分。

In this article, I’ll dig deeper into what’s new in this latest release, as well as what you need to know when upgrading.

在本文中,我将深入研究此最新版本中的新增功能以及升级时需要了解的内容。

升级到WordPress 4.4 (Upgrading to WordPress 4.4)

If you’re not already performing regular website maintenance, now’s a great time to start, check out our guide to WordPress maintenance here.

如果您尚未执行常规的网站维护,那么现在是开始的绝佳时机,请在此处查看我们的WordPress维护指南 。

测试或暂存 (Testing or Staging)

Whether you only have a handful of visitors, or thousands, if your website is important to you, you should be using a staging or test site.

如果您的网站对您很重要,则无论您只有少数几个访客还是数千名访客,都应该使用暂存或测试网站。

Despite best efforts, sometimes it’s difficult, if not impossible to replicate a production system. However, for most sites, a staging site will help you work whether there are any issues to look out for.

尽管付出了最大的努力,但有时复制甚至很难复制生产系统。 但是,对于大多数站点而言,临时站点将帮助您工作,无论是否有任何需要注意的问题。

确保您信任备份 (Ensure You Have Trusted Backups)

Upgrading aside, you should always have reliable backups of your site. Most issues experienced by users will be caused by third party plugins and themes, so make sure you know what plugins your site is using, and check to see if they’ve published anything about 4.4 support.

除了升级,您应该始终对站点进行可靠的备份。 用户遇到的大多数问题都是由第三方插件和主题引起的,因此请确保您知道您的网站使用的插件,并检查他们是否发布了有关4.4支持的内容。

选择升级的好时机 (Choose a Good Time to Upgrade)

For busy sites, there isn’t always a good time – but try and pick a time when you have the resources to best manage any downtime or upgrade issues. Also choose a time when there is less traffic on the site, perhaps in the evening for example.

对于繁忙的站点,并非总是有一个美好的时光–但是请尝试选择一个您有时间最好地管理任何停机时间或升级问题的时间。 还可以选择网站上的流量较少的时间,例如晚上。

I’ve always found WordPress upgrades work as expected. All of problems I’ve come across while upgrading, have been due to compatibility issues with plugins and themes. This is yet another good reason to choose actively developed, well supported, high quality plugins and themes.

我一直发现WordPress升级可以按预期进行。 升级时遇到的所有问题都是由于插件和主题的兼容性问题引起的。 这是选择积极开发,得到良好支持的高质量插件和主题的另一个很好的理由。

如果您确实遇到问题 (If You Do Experience Problems)

Try basic troubleshooting steps such as disabling your plugins and selecting a default theme to try and isolate where the problem is. Check out this handy article on common WordPress Issues and how to fix them.

尝试执行基本的故障排除步骤,例如禁用插件和选择默认主题以尝试找出问题所在。 查阅有关WordPress常见问题以及如何解决这些问题的方便文章。

If you need help, you can also head over to the official WordPress support forum, however please make sure you’ve read the welcome post first.

如果您需要帮助,也可以访问官方的WordPress支持论坛,但是请确保您先阅读了欢迎贴 。

We’ve also got a guide to updating WordPress, Plugins and Themes if you’d like some further detail on applying updates.

如果您想了解有关应用更新的更多详细信息,我们还提供了有关更新WordPress,插件和主题的指南 。

应用更新 (Applying the Update)

If you have logged into your WordPress site in the last day, you should have seen this alert:

如果您在最后一天登录了WordPress网站,则应该已经看到此警报:

When you click on ‘Please update now’ you are then taken to a page with further details about applying this update to the site as you can see below:

当您单击“请立即更新”时,您将转到一个页面,其中包含有关将此更新应用于网站的更多详细信息,如下所示:

When you click on ‘Update Now’, WordPress 4.4 will be applied to your site and you know that you have success when you see this screen:

当您单击“立即更新”时,WordPress 4.4将被应用到您的站点,并且您将在看到此屏幕时知道成功:

Alright! If you’ve already got to this point, you’re now ready to jump straight into the new features in WordPress 4.4.

好的! 如果您已经掌握了这一点,现在就可以直接进入WordPress 4.4的新功能。

WordPress 4.4的新功能 (New Features in WordPress 4.4)

WP API (WP API)

The WordPress REST API, known as the WP API isn’t new. In fact, it’s been available as a plugin and it has already been used in some really interesting projects for quite a while. It is however, the first time it’s been included in WordPress core.

WordPress REST API(称为WP API)并不是新的。 实际上,它已经可以作为插件使用,并且已经在一些非常有趣的项目中使用了一段时间。 但是,这是第一次将其包含在WordPress核心中。

The WP API is being introduced in two parts, 4.4 will contain the first part. From a user’s perspective, think of the WP API as plumbing that will allow developers to easily create powerful new applications using WordPress as a framework. It’s a massive milestone for WordPress and the team that have been working on it.

WP API分两部分介绍,第4.4部分将包含第一部分。 从用户的角度来看,可以将WP API视为管道,这将使开发人员可以使用WordPress作为框架轻松创建功能强大的新应用程序。 对于WordPress及其团队一直是一个巨大的里程碑。

To learn more about the WP API, check out Ben Shadle’s introduction and guide to using the WordPress REST API.

要了解有关WP API的更多信息,请查看Ben Shadle的介绍和使用WordPress REST API的指南 。

嵌入式提供商 (oEmbed Provider)

You probably already know that WordPress has supported oEmbed since version 2.9, and the list of sources has continued to grow with every new release. Whether it’s a tweet from Twitter or a YouTube video, you simply copy the URL from any of the possible oEmbed providers available and just paste it into your WordPress editor to embed the content.

您可能已经知道WordPress自2.9版以来已支持oEmbed,并且每个新版本的来源列表都在不断增长。 无论是来自Twitter的推文还是YouTube视频,您都可以从任何可能的oEmbed提供程序中复制URL,然后将其粘贴到WordPress编辑器中以嵌入内容。

With WordPress 4.4, your website is now also an oEmbed provider.

使用WordPress 4.4,您的网站现在也是oEmbed 提供商 。

That means you can allow others to embed content from your site directly into their site. Or vice versa, you can grab any URL from another WordPress 4.4 site and paste it into your post and it will automatically display it. Below is an example of what it looks like when adding the URL for the latest post on WordPress.org:

这意味着您可以允许其他人将您网站中的内容直接嵌入他们的网站中。 反之亦然,您可以从另一个WordPress 4.4站点获取任何URL并将其粘贴到您的帖子中,它将自动显示它。 以下是在WordPress.org上添加最新文章的URL时的外观示例:

响应式图像 (Responsive Images)

The importance of mobile devices continues to skyrocket, and with so many different screen sizes and devices being used to consume web content, it’s now more important than ever to make sure websites are responsive.

移动设备的重要性一直在飞速增长,并且由于使用了许多不同的屏幕尺寸和设备来消费Web内容,因此确保网站响应速度比以往任何时候都更为重要。

Developed by SitePoint’s own talented Tim Evko, this is a feature that users will benefit from immediately.

由SitePoint自己的才华横溢的Tim Evko开发 ,此功能将使用户立即受益。

With WordPress 4.4, responsive images are now natively displayed on your website for any image (including your existing ones). This is a great new feature that will certainly enhance the user experience.

使用WordPress 4.4,响应图像现在可以本地显示在您的网站上,用于显示任何图像(包括现有图像)。 这是一项很棒的新功能,肯定会增强用户体验。

This functionality is delivered by adding srcset and sizes support to the image markup WordPress generates.

通过向WordPress生成的图像标记添加srcset和大小支持来提供此功能。

WordPress will now automatically create a few sizes of the image in the media library and by including the available sizes of an image in the srcset attribute, browsers can display the most appropriate image size based on the capabilities of the device. From a performance perspective, this also improves page speed.

WordPress现在将自动在媒体库中创建一些大小的图像,并且通过在srcset属性中包含图像的可用大小,浏览器可以根据设备的功能显示最合适的图像大小。 从性能的角度来看,这也提高了页面速度。

二十六 (Twenty Sixteen)

The images below showcase the new responsive Twenty Sixteen WordPress theme. The minimalist design is based on a horizontal header with the option to have a right sidebar and several custom colour options. The theme has been designed mobile first, so users can enjoy an optimized experience on any device.

下图显示了新的响应式二十十六WordPress主题。 简约的设计基于水平标题,并具有右侧边栏和几个自定义颜色的选项。 主题设计为首先移动,因此用户可以在任何设备上享受最佳体验。

其他新增加 (Other New Additions)

An enormous amount of work has also taken place under the hood, a few of the other key changes include:

引擎盖下也进行了大量工作,其他一些关键更改包括:

Significant improvements to Commenting

评论功能的重大改进 Term Meta API

术语元API Improvements to Multisite

多站点改进 Improvements to the Customizer

定制器的改进

And much more (see here for the complete list)

还有更多( 完整列表请参见此处 )

进一步阅读 (Further Reading)

If that’s not enough WordPress goodness for you, here are some great resources for further reading so you can truly reap the benefits of this latest release:

如果这还不足以满足您的WordPress优点,那么这里有一些可供进一步阅读的有用资源,因此您可以真正利用此最新版本的好处:

WordPress 4.4 Field Guide

WordPress 4.4实地指南

WP API – Using the WordPress REST API

WP API –使用WordPress REST API

WP API on SitePoint

SitePoint上的WP API

Official WordPress Codex Documentation

官方WordPress Codex文档

I’d love to hear your thoughts and feedback on WordPress 4.4!

我希望听到您对WordPress 4.4的想法和反馈!

翻译自: https://www.sitepoint.com/whats-new-in-wordpress-4-4/

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)