Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\Option_Forces

s2member\includes\classes\option-forces.inc.php at line #28

Class c_ws_plugin__s2member_option_forces

c_ws_plugin__s2member_option_forces

public class c_ws_plugin__s2member_option_forces

Forces WordPress® options.

Since:

3.5


( 8 Methods )
Method Summary
public static array

check_bp_mms_register_access(array $site_options)

Register access in BuddyPress, for Multisite compatibility.

public static str

check_mms_register_access(str $users_can_register)

Allows access to the main Multisite Registration Form.

public static str

check_register_access(int|str $users_can_register)

Allows access to the Registration Form.

public static str

force_default_role(str $default_role)

Forces a default Role for new registrations, NOT tied to an incoming payment.

public static str

force_demotion_role(str $demotion_role)

Forces a specific Role to demote to, whenever a Member is demoted in one way or another.

public static str

force_mms_default_role(str $default_role)

Forces a default Role for new Multisite registrations (on the Main Site) NOT tied to an incoming payment.

public static str

mms_allow_new_users(int|str $allow)

Allows new Users to be created on a Multisite Network.

public static int|str

mms_dashboard_blog(int|str $dashboard_blog)

Forces a Multisite Dashboard Blog to be the Main Site.

( 8 Methods )
Method Detail

s2member\includes\classes\option-forces.inc.php at line #250

check_bp_mms_register_access()

public static array check_bp_mms_register_access(array $site_options)

Register access in BuddyPress, for Multisite compatibility.

BuddyPress bypasses the default Filter pre_site_option_registration, and instead uses: bp_core_get_root_options().

Since:

3.5

Attaches-to:

add_filter("bp_core_get_root_options");

add_filter("bp_core_get_site_options"); (before BuddyPress v1.5).

Parameters:

array $site_options - Expects array of BuddyPress site options.

Returns:

array - Site options array, after having been Filtered by this routine.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #165

check_mms_register_access()

public static str check_mms_register_access(str $users_can_register)

Allows access to the main Multisite Registration Form.

Since:

3.5

Attaches-to:

add_filter("pre_site_option_registration");

Parameters:

str $users_can_register - Expects ( none, all, blog, user ), passed through by the Filter.

Returns:

str - One of none|all|user; depending on several factors.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #130

check_register_access()

public static str check_register_access(int|str $users_can_register)

Allows access to the Registration Form.

Since:

3.5

Attaches-to:

add_filter("pre_option_users_can_register");

Parameters:

int|str $users_can_register - Numeric (1) or (0), indicating true or false; passed through by the Filter.

Returns:

str - Numeric value of (1) or (0), indicating true or false; depending on several factors.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #41

force_default_role()

public static str force_default_role(str $default_role)

Forces a default Role for new registrations, NOT tied to an incoming payment.

Since:

3.5

Attaches-to:

add_filter("pre_option_default_role");

Parameters:

str $default_role - Expects a default Role to be passed by the Filter.

Returns:

str - Default Role, as configured by s2Member.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #75

force_demotion_role()

public static str force_demotion_role(str $demotion_role)

Forces a specific Role to demote to, whenever a Member is demoted in one way or another.

Use by the PayPal® IPN routines, and also by the Auto-EOT system.

Since:

3.5

Parameters:

str $demotion_role - Expects a demotion Role to be passed by the caller.

Returns:

str - Demotion Role, as configured by s2Member.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #58

force_mms_default_role()

public static str force_mms_default_role(str $default_role)

Forces a default Role for new Multisite registrations (on the Main Site) NOT tied to an incoming payment.

Since:

3.5

Attaches-to:

add_filter("pre_site_option_default_user_role");

Parameters:

str $default_role - Expects a default Role to be passed by the Filter.

Returns:

str - Default Role, as configured by s2Member.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #92

mms_allow_new_users()

public static str mms_allow_new_users(int|str $allow)

Allows new Users to be created on a Multisite Network.

Since:

3.5

Attaches-to:

add_filter("pre_site_option_add_new_users");

Parameters:

int|str $allow - Numeric string (1) or (0), expected by the Filter.

Returns:

str - Numeric (1) or (0) indicating true or false. Forces to (1) true.

[ back to top ]

s2member\includes\classes\option-forces.inc.php at line #109

mms_dashboard_blog()

public static int|str mms_dashboard_blog(int|str $dashboard_blog)

Forces a Multisite Dashboard Blog to be the Main Site.

Since:

3.5

Attaches-to:

add_filter("pre_site_option_dashboard_blog");

Parameters:

int|str $dashboard_blog - Numeric Dashboard Blog ID passed through by the Filter.

Returns:

int|str - Numeric Dashboard Blog ID, as configured by s2Member. Forces to the Main Site.

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail