Opened 13 years ago
Closed 13 years ago
#19913 closed defect (bug) (fixed)
multiple plugins getting "undefined function is_rtl()" under WP 3.3
Reported by: | convissor | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | major | Version: | 3.3 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
It seems the order of file includes has changed under WP 3.3, leading to a situation where is_rtl() is not defined in time for use by plugin administrator functionality.
http://wordpress.org/support/topic/33-fatal-error-with-login-lock?replies=4
http://www.google.com/search?q=wordpress+3.3+plugin+is_rtl&gbv=1
Attachments (1)
Change History (7)
#2
@
13 years ago
FWIW, I've also seen a lot of similar topics for PopUp Domination plugin. The reason was exactly the same: wp_admin_css( 'theme-editor' )
.
This looks like a pure plugin issue to me. They need to be updated appropriately for WordPress 3.3.
#3
in reply to:
↑ 1
@
13 years ago
Replying to duck_:
So, wp_admin_css() was never safe to call this early (plugins_loaded),
Thank you for your excellent triage. What is the right way to include style sheets in this location, please?
#4
@
13 years ago
Interesting side effect. We should consider adding a function_exists() check there. Or perhaps, as a more future-proof improvement, we should catch all handles that we used to have in WordPress, and short-circuit them across the board.
For this particular plugin (login-lock) this is caused by
wp_admin_css( 'login' );
. Because the login.css styles no longer exist they aren't registered with WP_Styles. So, when wp_admin_css() tries to query() for 'login' nothing is found and the function doesn't return early and it falls through to the last three lines which print out "<link rel="stylesheet"..." and critically callsis_rtl()
.So, wp_admin_css() was never safe to call this early (plugins_loaded), but the problem only emerged in 3.3 due to the merging of admin CSS files.