Skip to:
Content
Pages
Categories
Search
Top
Bottom

What’s up with bp_is_home?


  • kalico
    Participant

    @kalico

    I’m getting this message in debug.log:

    bp_is_home is deprecated since version 1.5! Use bp_is_my_profile instead

    But the problem is, my code uses both of those, because they are supposed to be different things. The code has been working fine, but this error just popped up while debugging something unrelated.

    Here’s my code:

    <?php
    
     if ( ! bp_is_my_profile() && ! bp_is_settings_component() && ! bp_is_home() ) :
    
    echo ' stuff to echo here ';
    
    ?>

    No help here: https://codex.buddypress.org/developer/template-tag-reference/

    Can someone point me in the right direction here? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    they are supposed to be different things

    How are they different?

    To remove the warning, remove bp_is_home from your conditional.
    bp_is_home() just calls bp_is_my_profile()

    bp_is_home


    kalico
    Participant

    @kalico

    Thanks @shanebp. At the time when I wrote that snippet, I researched carefully the different template tags, and selected those to each perform a different purpose. Now I’m not sure how to change the code, so I need to do more research.

    So if I may rephrase my question….where can I find information on the available template tags that is accurate, up-to-date, and provides enough detail to help me decide which one(s) to use?

    The template tags reference page says:

    This page is currently undergoing review and updating. References marked with ? have been reviewed for current accuracy.

    This statement has graced the top of this page for over 3 years. Changes have been made to this page since then, but there are only two items on the page that have the “?” to indicate that they are currently accurate. The rest is left to be doubted. Many items have no explanation at all.

    I also wonder why you had to send me to hookr.io to find out that bp_is_home is deprecated. Forgive my ignorance, but is that a vetted or official source for BP code? Other template tags are noted as deprecated on the template tags reference in the codex, which I thought was supposed to be the comprehensive reference.

    So I can easily fix the warning message; however, my deeper intent is to figure out how to get accurate information so I can properly code my projects.

    Any advice would be greatly appreciated. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar