#58425 closed enhancement (wontfix)
Use wp_die in place of only die in `WP_Widget::widget()`
Reported by: | shakhari | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.2.2 |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
I am reading class-wp-widget.php and suddenly I have found a regular php die function where as WordPress have it's own wp_die functions and WordPress code sniffers always recommended to use wp_die.
Function name: public function widget
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hello and welcome to WordPress Trac!
This
die()
call inWP_Widget::widget()
is meant as a warning for developers that they need to extend the method in their subclass. Nowadays such a class method would be declared asabstract
, but for historical reasons that is not the case here.Since it's a message meant for developers and not end users, there isn't really a need to use
wp_die()
here just because a linter says so.