[wp-trac] [WordPress Trac] #58420: Use WP_Die instead of die
WordPress Trac
noreply at wordpress.org
Wed Jul 12 05:10:11 UTC 2023
#58420: Use WP_Die instead of die
-----------------------------+-------------------------------
Reporter: rakibwordpress | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch close | Focuses: coding-standards
-----------------------------+-------------------------------
Comment (by Presskopp):
I wonder where/why we use
{{{#!php
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
}}}
(mostly used, having a comment)
{{{#!php
if ( ! defined( 'ABSPATH' ) ) {
die();
}
}}}
(**not** having a comment), like seen in **\wp-admin\link-parse-
opml.php**, **\wp-admin\site-health-info.php**
or even
{{{#!php
if ( ! defined( 'ABSPATH' ) ) {
exit();
}
}}}
like seen in **\wp-includes\rss-functions.php**
Do we want to unify them?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58420#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list