Skip to content

Overzealous multi-line parameter rule #1485

@johnbillion

Description

@johnbillion

Ref: #1453

The following code does not violate the multi-line parameter rule, but gets flagged as such:

$message = esc_html( sprintf(
	/* Translators: 1: user display name; 2: username; */
	__( 'Switched to %1$s (%2$s).', 'user-switching' ),
	$user->display_name,
	$user->user_login
) );

There is only one parameter being passed to esc_html(). That parameter itself contains a function call with multiple lines, but the call to esc_html() is a valid, single parameter call.

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