AP_Roles::remove_roles()

Description #

Remove an AnsPress role

Source #

File: includes/class/roles-cap.php

101
102
103
104
105
106
107
108
109
110
111
public static function remove_roles() {
    global $wp_roles;
 
    if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
        $wp_roles = new WP_Roles(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
    }
 
    $wp_roles->remove_role( 'ap_participant' );
    $wp_roles->remove_role( 'ap_moderator' );
    $wp_roles->remove_role( 'ap_banned' );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment