wordpress编辑插件_如何在WordPress中替换默认主题和插件编辑器

wordpress编辑插件

The default WordPress theme and plugin editors are simple plain text editors. They are not meant to be used as a development tool. Their purpose is to quickly take a look at code, or make some minor changes to your child theme or a site-specific plugin. However, if you want to have a more robust interface for these editors with syntax highlighting, line numbers, row highlighting, then you are at the right place. In this article, we will show you how to replace the default theme and plugin editor in WordPress.

默认的WordPress主题和插件编辑器是简单的纯文本编辑器。 它们无意用作开发工具。 他们的目的是快速查看代码,或对子主题特定站点的插件进行一些小的更改。 但是,如果您想为这些编辑器提供一个更强大的界面,包括语法突出显示,行号,行突出显示,那么您来对地方了。 在本文中,我们将向您展示如何替换WordPress中的默认主题和插件编辑器。

Adding an advance editor to replace default WordPress Theme and Plugin Editor

Before editing your themes or plugins, we highly recommend that you create a backup of your WordPress site. In case anything goes wrong and you are unable to fix it, then you can always restore WordPress from backup. Another downside of editing your theme and plugin files on a live site is that an error can lock you out of WordPress admin area. So it is important that you have FTP access to your site, so you can fix things manually in case something goes wrong.

在编辑主题或插件之前,我们强烈建议您创建 WordPress网站的备份 。 如果出现任何问题并且无法修复,则可以随时从backup恢复WordPress 。 在实时站点上编辑主题和插件文件的另一个缺点是,错误可能使您无法进入WordPress管理区域。 因此,拥有对站点的FTP访问权限很重要,这样在出现问题时可以手动修复问题。

First thing you need to do is install and activate the WP Editor plugin. Upon activation, the plugin adds a new WP Editor menu in your WordPress admin sidebar. Clicking on it will take you to plugin’s settings page.

您需要做的第一件事是安装并激活WP Editor插件。 激活后,该插件会在您的WordPress管理员侧边栏中添加一个新的WP Editor菜单。 单击它会将您带到插件的设置页面。

WP Editor main settings

As you can see there are tabs for theme editor, plugin editor, and post editor. You can replace the default WordPress editor on these locations with the one provided by the plugin. On the main settings tab, you can choose to hide and replace the default WordPress editor, or you can have both the WordPress editors as well as editors provided by the plugin.

如您所见,有主题编辑器,插件编辑器和帖子编辑器的选项卡。 您可以使用插件提供的默认位置替换这些位置上的默认WordPress编辑器。 在主设置选项卡上,您可以选择隐藏和替换默认的WordPress编辑器,或者既可以使用WordPress编辑器,也可以使用该插件提供的编辑器。

Each editor provided by the plugin has its own settings. Click on Theme Editor to change its settings. You will notice there are various different options available. You can choose a color theme for your theme editor and choose which file extensions should be available to edit. Among other options, you can choose to highlight active line, show line numbers, adjust font-size, etc. You can also enable file upload feature which will allow you to upload files directly from the theme editor.

插件提供的每个编辑器都有自己的设置。 单击主题编辑器以更改其设置。 您会注意到有各种不同的选项可用。 您可以为主题编辑器选择一种颜色主题,然后选择应该可以编辑的文件扩展名。 在其他选项中,您可以选择突出显示活动行,显示行号,调整字体大小等。还可以启用文件上传功能,该功能允许您直接从主题编辑器中上传文件。

Adjusting settings for replacement theme editor for WordPress

Once you are done adjusting options, click save changes. You can see the replaced theme editor in action under Appearance » Theme Editor, and plugin editor under Plugins » Plugin Editor.

调整完选项后,单击“保存更改”。 您可以在外观»主题编辑器下看到替换的主题编辑 ,而在插件»插件编辑器下可以看到插件编辑器

Advanced plugin editor in action

If you have enabled post editor, then please note that the plugin does not replace the WordPress Visual post editor. It only replaced the plain text post editor. All your plain text formatting buttons remain the same. This plugin just adds colors, highlighting, and line numbers to the editor.

如果您启用了帖子编辑器,那么请注意,该插件不会替代WordPress Visual帖子编辑器。 它仅替换了纯文本帖子编辑器。 您所有的纯文本格式按钮均保持不变。 该插件仅向编辑器添加颜色,突出显示和行号。

Text post editor with line numbers and highlighting

The great thing about using WordPress is that it provides you with choices. You can choose to use the default editor, you can replace it with the option we’ve shown in this article, or you can entirely disable theme and plugin editors from WordPress.

使用WordPress的最大好处是它为您提供了选择。 您可以选择使用默认编辑器,也可以将其替换为本文中显示的选项,也可以从WordPress完全禁用主题和插件编辑器

We hope that this article helped you choose an alternate option for your default WordPress theme and plugin editors. Let us know what your thoughts by leaving a comment below.

我们希望本文能帮助您为默认的WordPress主题和插件编辑器选择一个替代选项。 在下方留言,让我们知道您的想法。

翻译自: https://www.wpbeginner.com/plugins/replace-default-theme-plugin-editor-wordpress/

wordpress编辑插件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值