Child Theme Check

描述

Child Themes are used to avoid overwriting your customizations. But if you preserve a file in a child theme, then you maybe preserve a security risk. After an update from the parent theme you always should check the changes and maybe add them to your child theme. This plugin helps you keeping track of these changes in the parent theme.

For full usage of the plugin your parent theme has to define the version of the template file in the header of the PHP file with an additional @version info.

For example: @version 1.0.0

If this is the case you will see a warning if the version of the parent theme file is higher than your child theme file. And you can see the differences between the parent theme file and the child theme file per wp_text_diff()-function like in revisions.

Some posts about this plugin:

These themes from Elmastudio are already using the @version info in the header:

  • Uku
  • Uku Light
  • Weta
  • Pukeko
  • Zeitreise
  • Werkstatt
  • Neubau
  • Hawea

Please spread the word and if you are a theme developer, please add this to your themes too! Thanks 🙂

屏幕截图

  • Status View
  • Diff View

安装

  1. Upload the zip file from this plugin on your plugins page or search for Child Theme Check and install it directly from the repository
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Activate a child theme and run the child theme check from your tools menu

常见问题

I just get the error: Parent theme is missing version keyword.

For full usage of the plugin your parent theme has to define the version of the template file in the header of the PHP file with an additional @version info.

For example: @version 1.0.0

If this is the case you will see a warning if the version of the parent theme file is higher than your child theme file. And you can see the differences between the parent theme file and the child theme file per wp_text_diff()-function like in revisions.

评价

2020 年 7 月 2 日
Diff works as advertised. It highlights changes to lines of code inside my child-theme files as compared to the parent theme files. Since I'm using a premium theme, I don't have control over how the theme is written, so the @version detection feature will doubtfully be useful in this case since the parent theme isn't using that on top of all their pages. They are however using the @since tag for almost every function. That seems complicated to track. Diff is already highlighting the differences between lines of code, so @since might not be too useful either.
2016 年 9 月 13 日
Very useful and works just fine. Many thanks for your work!
2016 年 9 月 3 日
I was bored to verify if my child themes were up to date and this plugin is a great tool to see in a glimps if you have to rework your child theme.
2016 年 9 月 3 日
Thank you Thorsten et.al for this very useful plugin. I think it's a fantastic idea to check for a version header and this plugin is a good reminder of developing with a useful standard.
阅读所有8条评价

贡献者及开发者

“Child Theme Check” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Child Theme Check」插件已被翻译至 3 种本地化语言。 感谢所有译者为本插件所做的贡献。

将“Child Theme Check”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.0.7

  • Tested with WordPress 6.5

1.0.6

  • Fix CSS

1.0.5

  • Fix broken layout in WordPress 5.7 (Thanks to Torsten Bulk for the report)
  • Fix PHP warning
  • Tested up to 5.7

1.0.4

  • not released

1.0.3

  • Fix flashing of first diff view
  • More i18n improvements (Thanks @pedromendonca)
  • Tested up to 5.4

1.0.2

  • fixed some WordPress coding standards issues
  • added Github Updater Metadata
  • updated readme.txt
  • i18n improvements (Thanks @pedromendonca)
  • Tested up to 5.3

1.0.1

  • Fixed typo in German translation (Thanks @pixolin)
  • Changed text for action link on plugins page (Thanks @presskopp)
  • Tested up to 4.6.1

1.0.0

  • Initial release