How do I access a class in wordpress?
"class WP_User" is in wp-includes folder,
my php is in wp-admin folder,
if I just do new WP_User($id), it says class not found. if I use "include" I would basically copy the whole thing over?
how do I do this?
class not found
Page 1 of 11 Replies - 995 Views - Last Post: 07 August 2012 - 02:01 PM
Replies To: class not found
#2
Re: class not found
Posted 07 August 2012 - 02:01 PM
I don't know about Wordpress specifically, but in general, to use a class in PHP the class definition must be included first.
If you know where you class file is, and Wordpress doesn't have an autoloader set to load it automatically, then you could simply "include" the file.
If you know where you class file is, and Wordpress doesn't have an autoloader set to load it automatically, then you could simply "include" the file.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|