Support » Plugins » Hacks » How to setup global object?

  • I need to serve some contents to each post. Lots of functions and several classes involved so that I can’t pack them into one single function to be called. I need to setup an object.
    In buddypress, I know I can setup a root component, then, can manipulate variables and functions under a component. for example:
    $bp->docs->doc->a;
    $bp->docs->b;
    In WP, which way I can setup a global object like that?

    I’m new in php, please help!

  • The topic ‘How to setup global object?’ is closed to new replies.