• Hi,

    I see on your website a list of filters and actions. One of them is wpmu_registration_enabled. But i cannot find documentation about it, neither as a core wordpress function or as a mailpoet filter.

    Can you tell me what this filter does for mailpoet?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Ojoma a11n

    (@geraltrivia)

    Hello there @kees78,

    Thank you for reaching out to us.

    This filter appears to modify the default WordPress Multisite registration behavior.

    Typically, with WordPress Multisite, there are related functions and filters that control whether new user registrations are allowed or how they are handled. A filter with a similar purpose in a Multisite context might be used to check and modify these settings programmatically.

    I hope this helps.

    Cheers!

    Thread Starter kees78

    (@kees78)

    Hi,

    Thanks for the explaination, although it is not really what my question is about.

    What is the specific purpose of this function, which variables can be accesses, and at what point is the filter active?

    Plugin Support Tseten a11n

    (@tibetanitech)

    The wpmu_registration_enabled filter in MailPoet serves to control whether user registration is enabled in a WordPress Multisite environment. When this filter is active, it allows you to modify whether new users can register on the site.

    The specific purpose of this filter is to provide flexibility in controlling user registration settings, particularly in Multisite installations where you might want to restrict or enable registration differently across various network sites.

    When this filter is active, you can access and modify the following variables:

    1. $registration_enabled (boolean): This variable represents whether user registration is currently enabled (true) or disabled (false).

    You can hook into this filter using the add_filter() function in WordPress. The filter is active at the point where WordPress checks whether user registration is enabled, typically during the user registration process or when accessing settings related to user registration.

    Here’s an example of how you can use this filter:

    add_filter('wpmu_registration_enabled', 'customize_registration_enabled');
    
    function customize_registration_enabled($registration_enabled) {
        // Modify the $registration_enabled variable based on custom conditions
        if (/* Your custom condition */) {
            $registration_enabled = true; // Enable registration
        } else {
            $registration_enabled = false; // Disable registration
        }
        return $registration_enabled;
    }

    In this example, the customize_registration_enabled function hooks into the wpmu_registration_enabled filter and modifies the $registration_enabled variable based on custom conditions. You can adjust the conditions according to your specific requirements.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter wpmu_registration_enabled’ is closed to new replies.