#44865 closed enhancement (fixed)
class-wp-locale.php has a condition always false
Reported by: | naghmesara | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 4.9.8 |
Component: | I18N | Keywords: | |
Focuses: | rtl | Cc: |
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?
Change History (7)
#2
@
6 years ago
- Component changed from General to I18N
- Milestone changed from Awaiting Review to 5.0
#5
@
6 years ago
- Milestone changed from 5.2 to 5.3
Still needs further investigation. Punting to 5.3.
Note: See
TracTickets for help on using
tickets.
Hi @naghmesara, welcome to WordPress Trac! Thanks for the ticket.
Interesting.
get_bloginfo( 'version' )
does have-src
if you run WordPress trunk from the src directory.RTL files are only available in the
build
directory, 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 fromsrc
directory.