Closed boonebgorges closed 9 years ago
Thanks for the report! Will take a look.
Decided to go with your option 2 and replaced references to get_current_screen()->id
with the already-passed post type. After more investigating, get_current_screen()
isn't really necessary for the edit post admin interface to function so I removed it.
In wp-frontend-admin-screen.php, you provide a version of
get_current_screen()
that fakes wp-admin's screen functionality. But it's only used if WP'sget_current_screen()
does not exist. A fair number of plugins bootstrap wp-admin on the front end - WP-API is one of them, which is what's leading to the bug on my install. When this happens, none of the screen-faking magic happens.A couple possibilities. One: when abstracting/faking the current screen, put it into the
$current_screen
global. Then theget_current_screen()
function can be used in its original form. Two: Don't referenceget_current_screen()->id
when, eg, populating thepagenow
js variables. (In my case, it's the latter bit that's causing direct problems, so perhaps it could be papered over in this way.)