The include
tag is deprecated. This tag exists to enforce the use of the render
tag instead of include
.
The include
tag works similarly to the render
tag, but it lets the code inside of the snippet to access and overwrite the variables within its parent theme file. The include
tag has been deprecated because the way that it handles variables reduces performance and makes theme code harder to both read and maintain.
This check is aimed at eliminating the use of include
tags.
👎 Examples of incorrect code for this check:
{% include 'snippet' %}
👍 Examples of correct code for this check:
{% render 'snippet' %}
The default configuration for this check is the following:
ConvertIncludeToRender:
enabled: true
It is discouraged to disable this rule.
This check has been introduced in Theme Check 0.1.0.