WordPress 2.9中最著名的功能

Long awaited WordPress 2.9 has been finalized by the developers and it is put out for download as a release candidate. Some of you might be wondering what is a release candidate. A release candidate is when the developers feel that all features that were to be added during the beta version are added, and this version could potentially be made official except it can use some extra testing for bugs. This is why as a contributing member to the community, everyone should download the release candidate and test run it to see if everything works fine. If your site is using plugins, then you should see if they are compatible with the new version and help the authors and other users by letting them know whether it works or not. You can do this by looking at the plugins page in the directory. (Example)

开发人员已经完成了期待已久的WordPress 2.9的最终定稿,可以作为候选发布版进行下载。 你们中有些人可能想知道什么是候选发行版。 当开发人员认为要添加Beta版本期间要添加的所有功能时,可以发布该版本,并且可以对该版本进行正式测试,除非它可以对错误进行一些额外的测试。 这就是为什么作为社区的贡献者,每个人都应该下载候选版本并对其进行测试以查看一切是否正常。 如果您的网站使用的是插件,则应查看它们是否与新版本兼容,并通过让他们知道它是否起作用来帮助作者和其他用户。 您可以通过查看目录中的插件页面来执行此操作。 ( 示例 )

WordPress is really a community based script and without everyone’s help, suggestions, and contributions, it would not have been possible to make everything work.

WordPress实际上是一个基于社区的脚本,没有每个人的帮助,建议和贡献,就不可能使所有内容正常运行。

You may download the Release Candidate from this Link. Well if you don’t want to download it, then might as well check out all these cool features that are coming with this new release. Maybe this will change your mind or maybe blow your mind with what an amazing release this will be.

您可以从此链接下载候选版本 。 好吧,如果您不想下载它,那么不妨检查一下此新版本随附的所有这些很酷的功能。 也许这会改变您的想法,或者可能会让您震惊,这将是一个令人惊奇的发行版本。

WordPress中的批处理插件更新 (Batch Plugin Update in WordPress)

When WordPress introduced one click upgrade for plugins, it was like Christmas in July. But this time maybe on the actual Christmas or perhaps slightly earlier with the release of WordPress 2.9, we will now be able to upgrade multiple plugins with one click from our WordPress Admin Panel. Check out the Screenshot below:

当WordPress为插件引入一键升级时,就像7月的圣诞节。 但是这一次可能是在实际的圣诞节,或者也许是在WordPress 2.9发行的更早些时候,我们现在能够从WordPress管理面板中一键升级多个插件。 查看以下屏幕截图:

Batch Plugin Updates

优化/修复数据库功能 (Optimize/Repair Database Functionality)

WordPress has added a new feature to the core which allows you to repair and optimize your database. In order to activate this function, you will need to add this line in your wp-config.php

WordPress在核心中添加了一项新功能,可让您修复和优化数据库。 为了激活此功能,您将需要在wp-config.php中添加此行。

define(‘WP_ALLOW_REPAIR’, true);

define('WP_ALLOW_REPAIR',true);

Once you have added it, you will now be able to run the script which is located at this URL:

添加后,您现在就可以运行位于以下URL的脚本:

http://www.yoursite.com/wp-admin/maint/repair.php

http://www.yoursite.com/wp-admin/maint/repair.php

When you arrive to that page, you will see a screen like this:

到达该页面时,您将看到如下屏幕:

Optimize and Repair WordPress Database

WordPress回收站/垃圾桶 (WordPress Recycle Bin / Trash)

Regardless of whether you are a PC user, or a Mac user, we have all had moments when we accidently deleted something really important. But good thing about the operating systems is that they have something where our trash is stored at. In PC its called a recycled bin, and in Mac it is called the Trash, regardless of what it is called, the fact that we can restore it is what matters. WordPress has now added a similar functionality for the posts, pages, and the comments. Instead of permanently deleting these, you can now trash it and then later on empty the trash once you are completely done with what you were doing. By default WordPress will empty the trash every 30 days, but you can change the time limit by simply entering the following code in your wp-config.php:

无论您是PC用户还是Mac用户,我们都有片刻不小心删除了一些非常重要的内容。 但是,关于操作系统的一件好事是,它们存放了我们的垃圾。 在PC中,它称为回收箱,在Mac中,它称为垃圾箱,无论它叫什么,我们都可以恢复它的事实很重要。 WordPress现在为帖子,页面和评论添加了类似的功能。 现在,您可以永久删除它们,而不是永久删除它们,然后在完全完成所做的工作后,再将其清空。 默认情况下,WordPress将每30天清空一次垃圾,但是您可以通过在wp-config.php中输入以下代码来更改时间限制:

define( ‘EMPTY_TRASH_DAYS’, 10 );

define('EMPTY_TRASH_DAYS',10);

Check out the Screenshot below, or simply just download the version and see it yourself:

请查看以下屏幕截图,或者只是下载该版本并自己查看:

WordPress Recycle Bin - Trash

图片编辑器 (Image Editor)

The image editor is something that a lot of users were waiting for and it is included in this release. This editor will let you make simple changes such as cropping, rotating, scaling, etc. Check out the screenshot below to see how this feature would look.

图像编辑器是许多用户一直在等待的东西,它包含在此版本中。 使用此编辑器,您可以进行简单的更改,例如裁剪,旋转,缩放等。请查看下面的屏幕截图,以查看此功能的外观。

WordPress Image Editor

能够添加帖子缩略图 (Ability to add Post Thumbnails)

You have probably seen many sites displaying posts on the homepage with a post thumbnail. Or many sites having the post thumbnail next to each post in their index. Before version 2.9, it was done through custom fields. In this release, you can simply add the thumbnail when writing the post and displaying it in the template is even easier.

您可能已经看到许多网站在首页上显示带有帖子缩略图的帖子。 或许多网站的索引中每个帖子旁边都有帖子缩略图。 在2.9版之前,它是通过自定义字段完成的。 在此版本中,您可以在撰写帖子时简单地添加缩略图,并且在模板中显示缩略图甚至更加容易。

WordPress Post Image

In order for you to have this functionality available in the admin panel, you must have a theme that supports this function. It is really simple to add support for this feature and we will have a full tutorial on this coming up soon. You will need to visit your theme’s functions.php and add the following code:

为了使您可以在管理面板中使用此功能,您必须具有支持此功能的主题。 添加对该功能的支持确实非常简单,我们很快将提供有关此功能的完整教程。 您将需要访问主题的functions.php并添加以下代码:

add_theme_support( ‘post-thumbnails’ );

add_theme_support('缩略图');

Once you choose the thumbnail, you can display it on the template using the following code:

选择缩略图后,可以使用以下代码将其显示在模板上:

<?php the_post_thumbnail( 'thumbnail' ); ?>

<?php the_post_thumbnail('thumbnail'); ?>

We will be posting a full guide for this function very soon because it is a very useful feature.

我们将很快发布此功能的完整指南,因为它是非常有用的功能。

扩展用户联系信息 (Extend User Contact Info)

WordPress user profile page is quite old and many new networks have gain popularity such as twitter and facebook. Prior to version 2.9, it was really hard to add a custom field in the contact area, but thanks to Joost De Valk for his contribution, now this feature is available.

WordPress用户个人资料页面已经很老了,许多新的网络都越来越流行,例如Twitter和Facebook。 在2.9版之前,确实很难在联系区域中添加自定义字段,但是由于Joost De Valk的贡献,现在可以使用此功能。

Simply open your functions.php and add the following function:

只需打开您的functions.php并添加以下函数:

<?php
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//add Facebook
$contactmethods['facebook'] = 'Facebook';

<?php
函数my_new_contactmethods($ contactmethods){
//添加Twitter
$ contactmethods ['twitter'] ='Twitter';
//添加Facebook
$ contactmethods ['facebook'] ='Facebook';

return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?>

返回$ contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?>

This will add extra fields in your user profile pages. Check the screenshot below for example.

这将在用户个人资料页面中添加其他字段。 例如,请查看以下屏幕截图。

Extend User Contact Info

You can display these on author profile page by using the normal $curauth variable or the_author_meta variable. We will also be writing about these in the near future to explain full details how this function works.

您可以使用常规的$ curauth变量或the_author_meta变量在作者个人资料页面上显示这些内容。 我们还将在不久的将来对此进行介绍,以详细说明此功能的工作原理。

新节选过滤器 (New Excerpt Filter)

Up till WordPress 2.8.6, when the user add the_excerpt code in the loop, it would display content with a 55 word limit and once the word limit was reached, it would add […]. With this new ability, You can now specify a function and control both excerpt word count, and the more text. All you have to do is open your theme’s function.php file and add the following code:

直到WordPress 2.8.6,当用户在循环中添加the_excerpt代码时,它将显示内容限制为55个字的内容,一旦达到字数限制,便会添加[…]。 有了这项新功能,您现在可以指定一个功能并控制摘录字数和更多文本。 您所要做的就是打开主题的function.php文件并添加以下代码:

// Changing excerpt length
function new_excerpt_length($length) {
return 60;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);

//更改摘录长度
函数new_excerpt_length($ length){
返回60;
}
add_filter('excerpt_length','new_excerpt_length');

// Changing excerpt more
function new_excerpt_more($more) {
return ‘…’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

//更多内容摘录
函数new_excerpt_more($ more){
返回“…”;
}
add_filter('excerpt_more','new_excerpt_more');

All thanks goes to Ramiy for suggesting this feature.

感谢Ramiy提出此功能。

嵌入使嵌入更容易 (oEmbed making Embedding Easier)

Thanks to ViperBond007 that this feature was added to the core of WordPress 2.9. It is a specification that allows media providers like Flickr, YouTube and others to provide data for consumer applications like WordPress about media.

感谢ViperBond007 ,此功能已添加到WordPress 2.9的核心中。 该规范允许媒体提供商(例如Flickr,YouTube等)为消费者应用程序(如WordPress)提供有关媒体的数据。

There are many many more features that are being included in this version. To see a full list check out this page.

此版本中包含许多其他功能。 要查看完整列表,请查看此页面

Don’t hesitate and do your part for the community. Download the Release Candidate from this Link and start testing out all the features, so this version can be released even faster.

不要犹豫,尽自己所能为社区服务。 从此链接下载候选发布版本并开始测试所有功能,因此可以更快地发布此版本。

翻译自: https://www.wpbeginner.com/news/most-notable-features-in-wordpress-2-9/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值