#58207 closed enhancement (fixed)
Code Modernization/Performance optimization: Replace `dirname(__FILE__)` with `__DIR__`
Reported by: | hztyfoon | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | performance, coding-standards | Cc: |
Description
in wp-admin/options-privacy.php
file line number 17
:
https://github.com/WordPress/wordpress-develop/blob/250250d35ede7402cf474a0f439d7f6c992dd7d7/src/wp-admin/options-privacy.php#L17
dirname( __FILE__ )
can be replaced with __DIR__
magic constant.
Check ticket: #48082
check this commit: https://github.com/wordpress/wordpress-develop/commit/e72fff9ceffb41d22c48febfc5f97c0cd46f5884
Change History (4)
This ticket was mentioned in PR #4387 on WordPress/wordpress-develop by @rudlinkon.
18 months ago
#1
- Keywords has-patch added
#3
@
18 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 55691:
@SergeyBiryukov commented on PR #4387:
18 months ago
#4
Thanks for the PR! Merged in r55691.
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/58207