Skip to content

Instantly share code, notes, and snippets.

@imath
Created December 23, 2023 14:24
Show Gist options
  • Save imath/c5c34feb5d3c9b3070f7a11bc339f103 to your computer and use it in GitHub Desktop.
Save imath/c5c34feb5d3c9b3070f7a11bc339f103 to your computer and use it in GitHub Desktop.

Revisions

  1. imath created this gist Dec 23, 2023.
    10 changes: 10 additions & 0 deletions bp-custom.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    <?php

    function disable_bp_signups() {
    add_filter( 'bp_get_signup_allowed', '__return_false' );
    remove_filter( 'register_url', 'bp_get_signup_page' );
    remove_action( 'bp_init', 'bp_core_wpsignup_redirect' );
    remove_filter( 'wp_signup_location', 'bp_blogs_creation_location' );
    remove_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1 );
    }
    add_action( 'bp_include', 'disable_bp_signups' );