New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25514

    Hi,
    Thank you for asking the question and my apologies for the delayed reply.

    We do not suggest moving sub tabs from one tab to another. BuddyPress as well as most of the plugins we have tested do not support this kind of movements. Most of the sub tab functionality are tied to their current component(tab is component).

    Technically, you can move the sub tabs but the links will break as the original sub tab callbacks will not be able to handle the new url/action(the reason is almost all handler uses bp_is_current_component() with hardcoded component id and that makes it inflexible).

    Hope that clarifies.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514
    Brajesh Singh on in reply to: buddydev simple user contest plugin. #20044

    Hi @evillizard
    Thank you for the suggestion.

    At the moment, we are unable to say if we will be able to do it or not. If time permits, we will be glad to do it in next few months.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514
    Brajesh Singh on in reply to: [Resolved] BP Contact Form Issue enable/disable #20042

    No problem.

    Thank you for confirming that it works.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514

    Hi Greg,
    For now, Please remove both the snippet. It seems confusing.

    I am putting a role based snippet where you can map role to duration/count directly.

    In the above code, we are not using role, we are using capabilities to decide what to allow for user. That’s why you are seeing user_can.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25514
    Brajesh Singh on in reply to: [Resolved] BP Contact Form Issue enable/disable #20033

    Hi Daniel,
    I have pushed the update now.

    In version 1.0.7, you can set the default visibility for the form. It only works if user is allowed to toggle the contact form visibility on their profile.

    https://buddydev.com/plugins/buddypress-user-contact-form/

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514

    Hi Richard,
    Thank you.
    No problem with the delay. I am looking forward to your feedback.

    Best regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25514

    Hi Carsten,
    In both the filters, we pass user id. So, It will be simple to check user role.

    Are you using WooCommerce’s customer role? I can provide a snippet for you .

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25514

    Hi Richard,
    Please put the following code in your bp-custom.php

    
    
    /**
     * Redirect to login page on accessing single media for non logged.
     */
    function mpp_custom_single_media_access_restriction() {
    
    	if ( ! function_exists( 'mpp_is_single_media' ) || ! mpp_is_single_media() || is_user_logged_in() ) {
    		return;
    	}
    	// Redirect to login page.
    	bp_core_redirect( wp_login_url() );
    }
    
    add_action( 'bp_template_redirect', 'mpp_custom_single_media_access_restriction' );
    
    /**
     * Do not load lightbox for non logged users.
     *
     * @param array $settings settings.
     *
     * @return array
     */
    function mpp_custom_filter_lightbox_options( $settings ) {
    
    	if ( ! did_action( 'init' ) || is_user_logged_in() ) {
    		return $settings;
    	}
    
    	// if we are here, user is not logged and it is after init action.
    
    	$settings['load_lightbox'] = 0;
    
    	return $settings;
    }
    add_filter( 'mpp_settings', 'mpp_custom_filter_lightbox_options' );
    

    Currently, we don’t have filter for individual option, so we had to filter the settings array. In future, I will add a way to filter individual option too.

    Please do let me know if the code works for you or not?

    Regards
    Brajesh