MWDelaney / font-awesome-shortcodes

A plugin for WordPress that adds shortcodes for easier use of the Font Awesome icons in your content.
http://MWDelaney.github.io/font-awesome-shortcodes/
10 stars 3 forks source link

Fatal error: Call to undefined function get_current_screen() on frontend #5

Open CybMeta opened 9 years ago

CybMeta commented 9 years ago

When loading the editor in frontend (using wp_editor() function, get_current_screen() seems not available and triggers a fatal error. The problem is in font-awesome-shortcodes/includes/actions-filters.php lines 12 and 36.

I've disable the editor button in front end at the moment but I'd like to discuss with you the best approach to fix this problem.

MWDelaney commented 9 years ago

Hmm. Those lines are to avoid conflicting with Gravity Forms. We could probably wrap the screen check in is_admin()? I'll look into this next week. 

— Sent from Mailbox

On Sat, Nov 15, 2014 at 8:21 AM, CybMeta notifications@github.com wrote:

When loading the editor in frontend (using wp_editor() function, get_current_screen() seems not available and triggers a fatal error. The problem is in font-awesome-shortcodes/includes/actions-filters.php lines 12 and 36.

I've disable the editor button in front end at the moment but I'd like to discuss with you the best approach to fix this problem.

Reply to this email directly or view it on GitHub: https://github.com/MWDelaney/font-awesome-shortcodes/issues/5

KingPin commented 9 years ago

Hi @MWDelaney did anything ever come of this? i am getting this issue in a site at the moment. thank you.