[wp-trac] [WordPress Trac] #48483: Remove <pre> tags from _deprecated_constructor()

WordPress Trac noreply at wordpress.org
Sat Nov 2 19:51:10 UTC 2019


#48483: Remove <pre> tags from _deprecated_constructor()
------------------------------+--------------------
 Reporter:  SergeyBiryukov    |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  5.4
Component:  General           |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  coding-standards  |
------------------------------+--------------------
 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**

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48483>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list