Skip to content

parameter and return type hints of MustUse::health_check_troubleshoot_theme_stylesheet() are incorrect #2

Closed
@pbiron

Description

The declaration of MustUse::health_check_troubleshoot_theme_stylesheet() should be changed to allow bool in addition to string for both the $default param and the return type.

This is because this method is hooked into pre_option_stylesheet, which passes false as the default value to the filter. Core's get_option() checks returns early if the return from the filter is not false (strict comparison) and, thus, doesn't even check for the DB value of the option.

Note: the change I'm suggesting is the way the MustUse::health_check_troubleshoot_theme_template() is declared.

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