Skip to:
Content
Pages
Categories
Search
Top
Bottom

$bp class type for autocomplete?

  • @codemonkeybanana

    Participant

    Can I assign a phpdoc attribute tot he $bp global so that my IDE can autosuggest the members?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @henrywright

    Moderator

    You can add whatever data you like to the BP global but regarding autosuggest and your IDE, I’m not sure

    @codemonkeybanana

    Participant

    I phrased it bad. What class type is $bp? I can then use phpdoc @var to enable autoprediction.

    @henrywright

    Moderator

    I haven’t checked but am 99% sure $bp is type BuddyPress. Take a look at the project source to verify:

    https://github.com/buddypress/BuddyPress

    @codemonkeybanana

    Participant

    Thanks

    @codemonkeybanana

    Participant

    This works:

    /***
     * @var $bp BuddyPress
     */
    
    global $bp;
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘$bp class type for autocomplete?’ is closed to new replies.
Skip to toolbar