public/wordpress/wp-content/plugins/wp-courseware/includes/core/roles.php
/**
	 * Check Roles.
	 *
	 * Check to see if roles have been created, if not create them.
	 *
	 * @since 4.3.0
	 */
Check Roles.
Check to see if roles have been created, if not create them.


Check Roles . Check to see if roles have been created if not create them .
public function check_roles() {
		global $wp_roles;
		if ( ! is_object( $wp_roles ) ) {
			return;
		}
		if ( empty( $wp_roles->roles ) || ! array_key_exists( 'wpcw_instructor', $wp_roles->roles ) ) {
			$this->add_roles();
			$this->add_caps();
		}
	}
public function check_roles ( ) { global $ wp_roles ; if ( ! is_object ( $ wp_roles ) ) { return ; } if ( empty ( $ wp_roles -> roles ) || ! array_key_exists ( 'wpcw_instructor' , $ wp_roles -> roles ) ) { $ this -> add_roles ( ) ; $ this -> add_caps ( ) ; } }
Check Roles.
Check Roles .