#44865 closed enhancement (fixed)
class-wp-locale.php has a condition always false
| Reported by: | naghmesara | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | I18N | Version: | 4.9.8 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | rtl |
Description
Hi
in class-wp-locale.php from line 224 to 227 We have defined a condition that never runs.
https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-locale.php#L224-L227
<?php if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
strpos result always is false because does not have get_bloginfo('version') never ever "-src".
What do you think?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @naghmesara, welcome to WordPress Trac! Thanks for the ticket.
Interesting.
get_bloginfo( 'version' )does have-srcif you run WordPress trunk from the src directory.RTL files are only available in the
builddirectory, see [26107] for more details.However, with the new build process introduced in #43055,
WP_Locale::rtl_src_admin_notice()and the related code is indeed redundant and could probably be removed, since it's no longer possible to run WordPress fromsrcdirectory.