如何进行 WordPress 自定义以牢记 WordPress 的未来更新?
How to do WordPress customization(s) keeping WordPress future-updates in mind?
我正在开发一个网站,需要使用以下任何可能的方法来自定义 WordPress:
根据业务需求搜索和使用本机 WordPress 插件,并根据(业务)需求自定义它们! This methods is easy to move with, although gets difficult to keep the customizations in sync with plugin's future updates.
应该继续为 intended/specific 功能和 manage/maintain 编写自己的自定义插件。它还有助于保持自定义代码的隔离。 Using this method requires lots of development efforts, regular efforts for future-compatibility (more or less deprives us from community benefits, that come with WordPress and its plugin-community)
我想知道,成熟的 WordPress 从业者如何实现与 WordPress 核心、插件 & 主题[=29 的未来兼容性=] 等自定义应用程序开发以及保持 WordPress 自定义开发与未来更新兼容的最佳实践是什么?
首先 - 从不修改核心 WordPress 文件。可能在某些情况下你必须问,但如果你必须问这个问题"can/should I modify core files for this"?答案是否定的。
其次 - 您也不应该修改插件或主题文件,因为修改会在更新中丢失。
现在,关于最佳实践。通常,您会发现一个插件足够好 可以满足您客户的需求并称其为好插件。许多 Good 插件将有相对简单的方法来使用自定义挂钩或模板覆盖来修改或扩展它们(使用插件、挂钩、过滤器、模板覆盖或自定义再次查看 Extending Gravity Forms with plugins, hooks, etc. as well as extending WooCommerce API).
除了扩展插件(不是直接编辑文件),你最好的选择是编写自定义代码来引入所需的功能,尽管这开始引入回退到您的 updates/security/maintenance 等问题
所以,永远不要修改核心文件或插件文件。要么扩展插件功能,要么编写自己的代码来实现所述功能。
我正在开发一个网站,需要使用以下任何可能的方法来自定义 WordPress:
根据业务需求搜索和使用本机 WordPress 插件,并根据(业务)需求自定义它们!
This methods is easy to move with, although gets difficult to keep the customizations in sync with plugin's future updates.
应该继续为 intended/specific 功能和 manage/maintain 编写自己的自定义插件。它还有助于保持自定义代码的隔离。
Using this method requires lots of development efforts, regular efforts for future-compatibility (more or less deprives us from community benefits, that come with WordPress and its plugin-community)
我想知道,成熟的 WordPress 从业者如何实现与 WordPress 核心、插件 & 主题[=29 的未来兼容性=] 等自定义应用程序开发以及保持 WordPress 自定义开发与未来更新兼容的最佳实践是什么?
首先 - 从不修改核心 WordPress 文件。可能在某些情况下你必须问,但如果你必须问这个问题"can/should I modify core files for this"?答案是否定的。
其次 - 您也不应该修改插件或主题文件,因为修改会在更新中丢失。
现在,关于最佳实践。通常,您会发现一个插件足够好 可以满足您客户的需求并称其为好插件。许多 Good 插件将有相对简单的方法来使用自定义挂钩或模板覆盖来修改或扩展它们(使用插件、挂钩、过滤器、模板覆盖或自定义再次查看 Extending Gravity Forms with plugins, hooks, etc. as well as extending WooCommerce API).
除了扩展插件(不是直接编辑文件),你最好的选择是编写自定义代码来引入所需的功能,尽管这开始引入回退到您的 updates/security/maintenance 等问题
所以,永远不要修改核心文件或插件文件。要么扩展插件功能,要么编写自己的代码来实现所述功能。