Opened 6 years ago
Closed 6 years ago
#48483 closed defect (bug) (fixed)
Remove <pre> tags from _deprecated_constructor()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.4 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | good-first-bug has-patch |
| Focuses: | coding-standards | Cc: |
Description
The _deprecated_constructor() function introduced in [32989] wraps the replacement name in <pre> tags, which breaks the message into multiple lines and looks weird. It's also inconsistent with other _deprecated_*() functions, which don't wrap the replacement name in any tags:
_deprecated_function()_deprecated_file()_deprecated_argument()_deprecated_hook()
If anything, <code> should be used here instead of <pre> to keep the message on a single line.
Example of a current message:
Deprecated: The called constructor method for WP_Widget in WP_Widget is deprecated since version 4.3.0! Use
__construct()
instead. in wp-includes/functions.php on line 4711
The expected result:
Deprecated: The called constructor method for WP_Widget in WP_Widget is deprecated since version 4.3.0! Use
__construct()instead. in wp-includes/functions.php on line 4711
In 46633: