Skip to:
Content
Pages
Categories
Search
Top
Bottom

Update breaks down my bp-custom.php


  • xavi3r12
    Participant

    @xavi3r12

    Hello, I have been using buddyPress Version 2.7.4. After updating to version 2.8.2, I get this error Fatal error: Call to undefined function bp_is_front_page() in ……/wp-content/plugins/bp-custom.php on line 17 here is my code in the bp-custom.php `<?php
    // hacks and mods will go here
    /* Redirects to profile upon login */
    add_action(‘login_form’, ‘redirect_after_login’);
    function redirect_after_login()
    {
    global $redirect_to;
    if (!isset($_GET[‘redirect_to’]))
    {
    $redirect_to = get_option(‘activity’);
    // sample-page = your page name after site_url
    } }

    function bp_help_redirect_to_profile(){
    global $bp;

    if( is_user_logged_in() && bp_is_front_page() )
    bp_core_redirect( get_option(‘home’) . ‘/members/’ . bp_core_get_username( bp_loggedin_user_id() ) . ‘/activity’ );

    }

    add_action( ‘get_header’, ‘bp_help_redirect_to_profile’,1);

    add_action(‘wp_logout’,’go_home’);
    function go_home(){
    wp_redirect( home_url() );
    exit();
    }

    add_action( ‘bp_complete_signup’, ‘buddydev_redirect_after_signup’ );

    function buddydev_redirect_after_signup() {

    $page = wp_redirect( get_option(‘siteurl’) . ‘/profile’ );

    bp_core_redirect( site_url( $page ) );
    }

    ?>` Help me what has happened and how can I correct this Error?

  • You must be logged in to reply to this topic.
Skip to toolbar