Closed cfoellmann closed 11 years ago
Added this in. I agree OOP is awesome, but we didn't really have the time to rewrite it (until now). So it's all OOP now. Ugly as hell, but we'll clean it up. Thanks!
what you mean by "Ugly as hell, but we'll clean it up." ? The code is following WordPress coding standards.
Well, I mean my code since I did my own conversion to a class. Not as robust as yours but I'd made some changes already and it was just too much to try and merge. Also, I mean ugly from an OOP perspective, not coding style. That build_head() function is a complete mess and isn't testable (working on that to write some tests).
function wpfbogp_admin_warnings
is being displayed to all logged in users - even on the subscriber level.solution is adding:
if ( current_user_can('manage_options') )
as condition but it does not work due to some wordpress limitation because the user level can not be determined at that point.Although in my OOP code https://github.com/Foe-Services-Labs/WPFBOGP/blob/oop-conversion/wp-facebook-ogp.php#L128 it's working fine. -> OOP rulez! :imp: