Skip to content

get_parent_theme_file_path() is not a custom function #462

@rebeccahum

Description

@rebeccahum

Bug Description

get_parent_theme_file_path() is not a custom function and therefore shouldn't be flagged as one: https://developer.wordpress.org/reference/functions/get_parent_theme_file_path/

  48 | WARNING | File inclusion using custom function ( `get_parent_theme_file_path()` ). Must return local file source, as external URLs are prohibited on WordPress VIP. Probably needs manual inspection.

Minimal Code Snippet

require_once get_parent_theme_file_path( "/includes/blocks/file.php" );

Error Code

WordPressVIPMinimum.Files.IncludingFile.UsingCustomFunction

Environment

Use php -v and composer show to get versions.

Question Answer
PHP version x.y.z
PHP_CodeSniffer version x.y.z
VIPCS version x.y.z

Tested Against master branch?

  • I have verified the issue still exists in the master branch of VIPCS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions