Skip to content

add_theme_support checks are fragile due to whitespace #411

@siliconforks

Description

@siliconforks

If I run a theme check on the Twenty Twenty-One theme, I get messages like these:

RECOMMENDED: No reference to add_theme_support( "html5", $args ) was found in the theme. It is strongly recommended that the theme implement this functionality.
RECOMMENDED: No reference to add_theme_support( "custom-logo", $args ) was found in the theme. It is recommended that the theme implement this functionality.

However, the theme does in fact have code for supporting these features.

I think the problem is that Twenty Twenty-One's code is formatted in a rather elaborate way:

add_theme_support(
	'html5',
	array(
		'comment-form',
		'comment-list',
		'gallery',
		'caption',
		'style',
		'script',
		'navigation-widgets',
	)
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions