Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 26 replies (of 26 total)
  • @masoud1111

    Participant

    hi. tnx for your answer.
    tnx for mention the use of ‘code’. i will do it in future.
    in these past 2days i’m trying to do what you said in different ways. but i keep seeing error.
    so i come back here.
    sorry i dont know a lot about coding.. 🙁
    i’ve tried many codes. some of these codes:

    first:

    function masoud_core_no_access( $r ){
    $mode=1;
    $r=$mode;
       return $r; 
    }
    add_filter( 'bp_core_no_access', 'masoud_core_no_access' );

    second:

    function masoud_core_no_access( $r ){
    $mode=1;
    $r=$mode;
    $r = apply_filters( 'bp_core_no_access', $r );
       return $r; 
    }
    add_filter( 'bp_core_no_access', 'masoud_core_no_access' );

    third:

    function masoud_core_no_access( $r ){
    $mode=1;
    $r=$mode;
    $redirect=get_home_url ( int $blog_id = null, string $path = '/login', string|null $scheme = null );
    apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message );
       return $r; 
    }
    add_filter( 'bp_core_no_access', 'masoud_core_no_access' );

    fourth:

    function masoud_core_no_access( $mode ){
    $mode=1;
    apply_filters( 'bp_no_access_mode', int $1, $root . '/login', $redirect, $message );
       return $mode; 
    }
    add_filter( 'bp_core_no_access', 'masoud_core_no_access' );

    fifth:

    function masoud_core_no_access( $mode , $redirect ){
    $mode=1;
    $redirect=get_home_url ( int $blog_id = null, string $path = '/login', string|null $scheme = null );
    apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message );
    }
    add_filter( 'bp_core_no_access', 'masoud_core_no_access' );

    i dont know what to do else!
    i’ve tried whatever i knew about coding and all seemed to be wrong…

    i want to call mode 1. so it points to root.
    and set redirect_url to a page like “login” so ==>> ‘site.com/login’

    i tried to do it with
    $redirect=get_home_url ( int $blog_id = null, string $path = '/login', string|null $scheme = null );
    but it didnt work.

    how should i suppose to do it? to make it right?

    tnx for your notice and help.

Viewing 26 replies (of 26 total)
Skip to toolbar