分享好友 最新动态首页 最新动态分类 切换频道
如何为您的插件创建一个很棒的WordPress.org页面
2024-12-28 20:41

You’ve just developed an awesome plugin for WordPress and you want to share it with as many people as possible. To do that, the WordPress.org platform seems to be the best choice as it’s the official WordPress plugins repository.

您刚刚为WordPress开发了一个很棒的插件,并且希望与尽可能多的人分享。 为此, WordPress.org平台似乎是最好的选择,因为它是官方的WordPress插件存储库。

But submitting your plugin to WordPress.org is not enough to gain users: you must introduce your plugin in the best possible way to let WordPress users know what your plugin can do.

但是将插件提交到WordPress.org还不足以吸引用户:您必须以最好的方式介绍插件,以使WordPress用户知道您的插件可以做什么。

A complete WordPress.org page will make your plugin more attractive. You will gain more users and these users will know how to use your plugin.

完整的WordPress.org页面将使您的插件更具吸引力。 您将获得更多用户,这些用户将知道如何使用您的插件。

Once a WordPress plugin is installed, a short description can be displayed on the page of the administration panel thanks to a correctly formatted comment, placed in the main file of the plugin. While this is a good way to help your users to remember what your plugin does, it doesn’t help you gain more users.

一旦安装了WordPress插件,由于在插件主文件中放置了正确格式的注释,因此可以在管理面板的“ 页面上显示简短说明。 虽然这是帮助用户记住插件功能的好方法,但并不能帮助您获得更多用户。

Before deciding to download your plugin, users generally check your plugin’s WordPress.org page in order to find out what it can do. Users will look at the description of your plugin, so you should describe precisely the features of your plugin (we will see how in a next part). But users will also want to know if your plugin is easy to use: several screenshots and a FAQ are useful for that. When you release an update, your users will want to know why they must download this update (does it fix known bugs or eradicate security risks?), so be sure to include this type of information as well.

在决定下载插件之前,用户通常会检查插件的WordPress.org页面以了解其功能。 用户将查看您的插件说明,因此您应该准确描述插件的功能(我们将在下一部分中介绍)。 但是用户也将想知道您的插件是否易于使用:几个屏幕截图和一个常见问题解答对此很有用。 当您发布更新时,您的用户将想知道为什么他们必须下载此更新(它是否解决了已知的错误或消除了安全风险?),因此请确保也包括此类信息。

Keep in mind that your plugin is not the only one: users have choice between several plugins, so you need to demonstrate why yours is better than others. A good plugin page can bring you more users, so it’s a good idea to make sure yours is as accurately and detailed as possible.

请记住,您的插件不是唯一的:用户可以在多个插件之间进行选择,因此您需要证明为什么您的插件比其他插件更好。 一个好的插件页面可以为您带来更多的用户,因此最好确保您的插件尽可能准确和详细。

WordPress can’t guess the usefulness of your plugin. So, to display information about it, WordPress uses two sources: the comments in your plugin’s main file, and the file located at the root of your plugin’s folder.

WordPress无法猜测您插件的有用性。 因此,为了显示有关它的信息,WordPress使用了两种资源:插件主文件中的注释和位于插件文件夹根目录下的文件。

Both are important, so we will see how to correctly complete them in the two following subparts.

两者都很重要,因此我们将在以下两个子部分中了解如何正确完成它们。

正确的评论 (The Right Comment)

Your plugin might include several files, but at the very least you’ll have one main file. This is the file loaded by WordPress, often with the same name as your plugin (for example, for the plugin ). To be recognizable by WordPress, this main file must contain a ‘comment’, formatted in a specific way.

您的插件可能包含多个文件,但是至少您将只有一个主文件。 这是WordPress加载的文件,通常与您的插件同名(例如,插件 )。 要被WordPress识别,此主文件必须包含以特定方式格式化的“注释”。

The ‘comment’ is where you fill in the basic information about your plugin. Not all the fields are not required; some are essential, while others are very useful.

在“注释”中,您可以填写有关插件的基本信息。 并非所有字段都是必填字段; 有些是必不可少的,而另一些则非常有用。

Basically, here is the minimal comment to indicate at the beginning of your plugin’s main file.

基本上,这是在您的插件主文件开头指示的最小注释。

The field is, as its name suggests, used to indicate the name of the plugin. It must be unique in order for WordPress to recognize it.

顾名思义,“ 字段用于指示插件的名称。 它必须是唯一的,以使WordPress能够识别它。

In the field, indicate a URI describing your plugin, if there is one. For example, if you have a page on your personal website which describes precisely your plugin, indicate its URL here.

在“ 字段中,指示描述您的插件的URI(如果有)。 例如,如果您的个人网站上有一个页面可以准确描述您的插件,请在此处指示其URL。

The field is important, as its value is displayed in the page of your users’ administration panel. It should be short.

“ 字段很重要,因为它的值显示在用户管理面板的“ 页面中。 它应该很短。

Chances are, you will provide several versions of your plugin, with new features or bugs fixes. The current version number must be indicated in the field.

您可能会提供插件的多个版本,并提供新功能或错误修复。 当前版本号必须在“ 字段中指出。

You can guess that the field must be filled with your name, while the field refers to your personal web page, where you present yourself and your projects, for example.

您可以猜测“ 字段必须填写您的姓名,而“ 字段引用您的个人网页,例如,您在其中展示自己和您的项目。

Finally, we find the field in which you indicate a short name for the license under which you release your plugin. For example, you can indicate or .

最后,我们在“ 字段中找到用于发布插件的许可证的简称。 例如,您可以指示或 。

Except for the field, all these fields are read by WordPress to display information about your plugin, essentially in the page. That’s why you should always indicate them.

为了进一步个性化您的插件,WordPress在此特殊注释中添加了其他三个字段。 例如,我们可以找到一,它是一个布尔值,指示是否可以在安装中的所有站点(启用多站点)上激活该插件。 默认情况下, 设置为 。

If the usefulness of the field is limited, it is not the case of the last two ones: and in which you can indicate respectively your plugin’s text domain and the directory containing the files to translate your work.

如果“ 字段的用途有限,则不是最后两个字段: 和 ,您可以在其中分别指示插件的文本域和包含文件的目录以翻译您的工作。

Thanks to these fields, you will be able to translate the other fields: in the page, you will be able to display a description in several languages.

由于这些字段,您将能够翻译其他字段:在“ 页面中,您将能够以多种语言显示说明。

Note that the path indicated in the field is relative to your plugin’s folder. For example, with the previous comment, WordPress will use the files contained in the subdirectory of my plugin’s folder. By default, WordPress will search for your files in the root of this folder.

请注意,“ 字段中指示的是相对于插件文件夹的。 例如,使用前面的注释,WordPress将使用插件文件夹的子目录中包含的文件。 默认情况下,WordPress将在此文件夹的根目录中搜索您的文件。

自述文件 (The Readme File)

Now that our plugin is ready to be correctly displayed on your user’s administration panel, we need to attract these users with a good plugin page on WordPress.org. To do this, we only need one file: which must be at the root of our plugin’s folder.

现在我们的插件已准备好正确显示在用户的管理面板上,我们需要在WordPress.org上提供一个不错的插件页面来吸引这些用户。 为此,我们只需要一个文件,该文件必须位于插件文件夹的根目录下。

You can find an example of what WordPress accepts here, where you can see that a plugin’s file is essentially a list of sections filled in with the right information.

您可以在此处找到WordPress接受的示例,在该示例中您可以看到插件的文件实质上是用正确的信息填充的部分的列表。

Most of these sections will be displayed on your plugin page as tabs. For example, with the readme file linked above, we will find several tabs like “Description“, “Installation“, “FAQ” or “Screenshots“.

这些部分中的大多数都将在选项卡页面上显示为选项卡。 例如,使用上面链接的自述文件,我们将找到几个选项卡,例如“ Description,“ Installation,“ FAQ ”或“ Screenshots ”。

First we find a special section.

首先,我们找到一个特殊的部分。

As you might have guessed, this replaces with the full name of your plugin. It will be displayed in the header of your plugin’s page, above the short description indicated at the end of this section.

使用插件的作者和贡献者列表填写“ 字段。 此列表必须包含WordPress.org标识符。

The is here to indicate the link of a web page where users can donate to support your work. Then, the field is a list of keywords associated with your plugin. They won’t be displayed on your plugin page but they will be used by WordPress users to find your plugin.

“ 在此处表示网页的链接,用户可以在其中捐赠以支持您的工作。 然后, 字段是与您的插件关联的关键字列表。 它们不会显示在您的插件页面上,但是WordPress用户将使用它们来查找您的插件。

The and fields are important. In the former, indicate the minimal version your users must use to have your plugin working: for example, if your plugin is entirely based on a function appearing in WordPress 3.7, indicate . In the latter, indicate the highest version number of WordPress on which you have tested your plugin: if you know that your plugin works on the latest version of the CMS, you should indicate it.

和经过字段很重要。 在前者中,指出用户必须使用的最低版本才能使您的插件正常工作:例如,如果您的插件完全基于WordPress 3.7中出现的功能,请指示 。 在后者中,指示已对其进行测试的WordPress的最高版本号:如果您知道您的插件可在最新版本的CMS上运行,则应指出它。

The field is here to indicate the current version number of your plugin. It is important, as WordPress reads this field to know if an update is available or not.

字段在此处指示插件的当前版本号。 这很重要,因为WordPress会读取此字段以了解是否有可用的更新。

The and tags are used to indicate the license under which you release your plugin: indicate a short name in the former and indicate a link where we can find more information about the license in the latter.

和标记用于指示您在其下释放插件的许可证:在前者中表示一个短名称,并在我们可以在后者中找到有关许可证的更多信息的链接。

描述 (Description)

Right after this essential information, we find the section. In this section, you should precisely describe your plugin. For example, you can indicate what it can do, in which languages it is available, where users can contact you, and any other information your users might find useful: WordPress does not limit the size of the description, so you are free to write what you want.

在此基本信息之后,我们可以找到“ 部分。 在本节中,您应该精确描述您的插件。 例如,您可以指示其功能,可用的语言,用户可以与您联系的地方以及您的用户可能认为有用的其他任何信息:WordPress并不限制描述的大小,因此您可以自由编写你想要什么。

As in the rest of the sections in the readme file, you can use Markdown in the description to format your text.

本部分包含用户经常问您的问题列表。 例如,您还可以使用本节描述如何使用插件,如何配置选项或如何个性化窗口小部件。

Below is an example of an section (using two irrelevant questions), but you can add as many questions as you want. Useful questions are preferred.

随着项目的发展,将产生新的想法,并随之产生新版本的插件。 在自述文件的标题中,您需要指示当前的稳定版本,以便您(未来的)用户知道您的插件如何发展,或者只是他们可能会在最新版本中找到什么。 这样,他们将知道他们一直在等待的功能是否终于发布。

That’s the aim of the section. In this part, you list all the versions you have released for your plugin, listing for each of them the features they include. Most of the time, we prefer listing our versions in a reverse chronological order but you are free to do what you want.

下一节也是“新功能相关的”部分,称为“ 。 它主要是在这里给已经安装了插件的用户使用:当有新版本的插件可用时,您可以显示一条特定消息,以指示新功能以及用户为什么升级。

For example, with the section below, your users will be notified that version 2.0 is available, and they will see the message “Upgrade for awesome new features!“.

例如,在下面的部分中,您的用户将收到版本2.0可用的通知,并且他们将看到消息“ 升级真棒新功能 ”。

另一个主意(Another Idea?)

The sections above should always be present in your readme file as they are essential for users to understand what your plugin can do and how. But if you have other ideas of sections, you can add your own as any other ‘classic’ section.

上面的部分应该始终存在于您的自述文件中,因为它们对于用户了解您的插件可以做什么以及如何进行至关重要。 但是,如果您对节有其他想法,则可以将自己的节添加为其他“经典”节。

屏幕截图 (Screenshots)

If you read the example of the readme file provided by WordPress and linked above, you might have noticed that we forgot a section: . Its name is clear enough: in this section, you should include some screenshots describing the interface of our plugin.

如果您阅读了WordPress提供并在上面链接的自述文件的示例,则可能已经注意到我们忘记了一个部分: 。 它的名字很清楚:在本节中,您应该包括一些截图,描述我们插件的界面。

As a simple readme file can’t contain images, it is necessary to know where to upload them. First, you should know that WordPress accepts several formats; you can use PNG (), JPEG ( or ) and GIF () files for your screenshots.

由于一个简单的自述文件不能包含图像,因此有必要知道将图像上传到哪里。 首先,您应该知道WordPress接受几种格式; 您可以将PNG( ),JPEG( 或 )和GIF( )文件用于屏幕截图。

Name them in the format where is a number and is the extension of the file. For example, if we have three PNG screenshots, we name them , and .

将它们命名为 ,其中是数字,而是文件的扩展名。 例如,如果我们有三个PNG屏幕截图,则将它们命名为 , 和 。

You now have two choices to place your files: in the directory or in the one containing the current readme file (for example in the directory if your current version is 2.0). Note that WordPress will first search for your screenshots in the directory: for example, if you have the files and , the one in the directory will be displayed and not the one in the directory.

现在,您有两种选择来放置文件:在目录中或在包含当前自述文件的文件中(例如,如果当前版本为2.0,则在目录中)。 请注意,WordPress首先会在目录中搜索您的屏幕截图:例如,如果您拥有文件和 ,则该文件位于目录中将会显示,而不是目录中的 。

Once you have placed your screenshots in the right directory, return to your readme file and complete the section with an ordered list. The first item will describe the first screenshot (named for example), the second item will describe the second screenshot, and so on.

在WordPress.org插件页面中,我们可以在大横幅的前景中看到插件的名称。 该横幅是可选的,但您可以添加它以增强页面的外观。

Your banner must be 772 pixels wide and 250 pixels tall and named or . Note that the GIF format is not allowed here. Place this banner in the directory, and that is it: WordPress will display it in your plugin page.

您的横幅必须宽772像素,高250像素,并命名为或 。 请注意,此处不允许使用GIF格式。 将此横幅放置在目录中,就是这样:WordPress将在您的插件页面中显示它。

With a width of 772 pixels, your image can be blurry on high-DPI displays. To fix this problem, you can add another optional image which must be 1544 wide and 500 pixels tall and named (or ). Place it in the directory and WordPress will use it on high-DPI displays in the place of the small banner.

宽为772像素的图像在高DPI显示器上可能会模糊。 要解决此问题,您可以添加另一个可选图像,该图像的宽度必须为1544,高度为500像素,并命名为 (或 )。 将其放在目录中,WordPress将在高DPI显示器上的小横幅位置使用它。

Just like many other developers, you love your plugin and want to have as many users as possible. But providing a good plugin is not enough: users won’t know that your plugin is awesome if you don’t correctly describe it.

就像许多其他开发人员一样,您喜欢您的插件,并希望拥有尽可能多的用户。 但是提供一个好的插件是不够的:如果您没有正确描述插件,用户将不会知道您的插件很棒。

A good plugin page can bring you more users and, to do that, the readme file will be your best friend. To help you make the best readme file, WordPress provides you a tool: the readme validator, which will tell you if an information is missing.

一个好的插件页面可以为您带来更多的用户,为此,自述文件将是您最好的朋友。 为了帮助您制作最佳的自述文件,WordPress为您提供了一个工具: 自述验证程序 ,它将告诉您是否缺少信息。

If you want to retrieve the readme file that we’ve written about in this article, you can find a very small example plugin here.

如果要检索我们在本文中编写的自述文件,可以在此处找到一个非常小的示例插件。

最新文章
川崎摩托加盟
  川崎重工管理(上海)有限公司,知名摩托车品牌,日本川崎重工业株式会社旗下,拥有摩托车等运输机械和系统领域技术的高科技企业。川崎重工集团于1878年开始造船事业以来,在铁路车辆、飞机、以“KAWASAKI”品牌而闻名内外的摩托车等运
qq群搜索关键词排名优化
QQ群排名方法[/caption] 那么这个护肤品牌做的怎么样呢,我们可以从下图,粗略的看到这个品牌的人气还是非常不错的,每天有大量的人搜索这个品牌,原来这样一个品牌,竟然用这样简单的qq群推广方法,
华为手机截图功能详解与实用技巧分享
华为手机的截图功能其实非常简单,但有时候你可能会因为不熟悉而感到困惑。今天,我们就来聊一聊在华为手机上怎么截图,顺便分享一些小技巧,让你能够轻松捕捉到手机屏幕上的精彩瞬间。首先,很多人可能已经知道,华为手机有几种不同的截图
安全员年终总结PPT怎么写?借助AI生成高效范文与提示词!
### 角色安全员### 掌握能力- 数据分析能力- 演讲和表达能力- PPT设计技巧- 使用的能力### 任务- 撰写年终总结PPT- 整理过去一年安全工作的数据和案例- 规划未来工作的方向和目标### 工作流1. 收集过去一年内的安全数据2. 整理案例,突显工
四川fm101.7电台广告价格,四川电台广告合作形式
视听域传媒(四川电台)为您提供四川交通文艺广播电台2022年广告价格,可以选择时段,为您匹配高性价比的广告资源,整合性的媒体投放策略及优化的量身定制传播方案。同时还提供媒介研究、品牌策划与广告创意、媒介计划与购买、节目及影视剧
手机性价比高的手机推荐2023
荣耀手机都挺不错的,推荐一款荣耀X40 GT,手机配置6.81英寸窄边全视屏,144Hz高刷新率,画面流畅顺滑,大屏体验更沉浸。手机搭载了旗舰级的骁龙888芯片,全新超级大核Cortex X1,CPU最高主频达 2.84GHz,峰值性能令人惊叹,让游戏体验更加
如何有效找回被删除的微信聊天记录和联系人信息
微信删了怎么找回 (How to Recover Deleted WeChat),m.lhqsqb.cn,  在现代社会中,微信已成为人们日常生活中不可或缺的一部分。无论是聊天、购物、支付还是分享生活点滴,微信都提供了便捷的服务。然而,有时我们可能会不小心删除
搜狗广告推广怎么收费?搜狗开户投放
搜狗推广广告投放是搜索引擎广告广告投放,按点一下收费标准,每词竟价0.1元,第一次银行开立账户网上交费4000元即可开始搜狗广告投放,搜狗推广耗费具体情况,请看下文的讲解,让你掌握搜狗推广开户多少钱?搜狗推广费用以及付钱方法?1、
詹姆斯连飚续命球却失关键三分什么情况?NBA体育运动手环在淘宝的哪个类目发布
美国篮球是美国最受欢迎的体育运动么?~第三名:篮球篮球在美国大学篮球和职业篮球都很受欢迎。 因为大学队伍中的大多数球星都是在年度NBA选秀中被NBA球队选中的球员, 这使篮球成为美国三大最受欢迎的运动之一。迈克尔乔丹将NBA带入另一个
数字化印刷的智能化趋势:AI与机器学习在印刷业中的应用
印刷业是一项重要的产业,它涉及到文字、图像、音频、视频等多种媒介的制作和传播。随着数字化和智能化的发展,印刷业也逐渐向数字化方向发展。数字化印刷通过将传统印刷过程转化为数字形式,实现了对印刷过程的自动化、
相关文章
推荐文章
发表评论
0评