Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#40114 closed defect (bug) (invalid)

load_plugin_textdomain() no back compatibility

Reported by: tkama's profile Tkama Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: I18N Keywords:
Focuses: Cc:

Description

load_plugin_textdomain() uses get_user_locale() function if is_admin()===true, but get_user_locale() introduced in WP 4.7. And what with back compatibility?..

So, if user have Wordpress less then 4.7 and any plugin has function load_plugin_textdomain() in admin area - user get PHP fatal error - use undefined function...

Is it ok?

Change History (5)

#1 @dingo_bastard
8 years ago

I have a plugin using load_plugin_textdomain(), and tested it on 4.2 version of WordPress, and the function didn't threw any errors. The get_user_locale() is used in a filter, so my bet is it's safe to use there...

#2 @Tkama
8 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#3 @Tkama
8 years ago

Oh, it's my mistake... If we have WP less then 4.7, then code of load_plugin_textdomain() will be another - without get_user_locale()...

#4 @ocean90
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution changed from wontfix to invalid

#5 @SergeyBiryukov
8 years ago

  • Component changed from Administration to I18N
Note: See TracTickets for help on using tickets.