global php var in widget
-
Hi !!
I’m trying to build a widget to show me some photos from my flickr photostream. I already have the application and I was just setting it up as a plugin / widget.
After an afternoon of work most of the things work fine but the widget won’t run correct.It seams like wp is having problems with global php vars in the form function in die widget class. I have to access two global vars (arrays) which store the usernams and avalible methods so I paste “global $bfp_users” into the first line after “function form($instance) {” and the widget option page in the admin panel won’t show correctly (it only loads half and doesn’t work). When I remove this line and refresh the admin page it show fine.
I don’t understand the problem, can somebody help me?!
Thanks,
brainzina
The topic ‘global php var in widget’ is closed to new replies.