WebVIEP Plugin

AuthShortcode

Table of Contents

Methods

enforceWebviepRole()  : mixed
Enforce Webviep Role.
register()  : void
Register the shortcode and hooks.
render()  : string
Render login/registration form.
handleLogin()  : void
Handle Login.
handleRegister()  : void
Handle registration submission.
hasWebviepRole()  : bool
Has Webviep Role.
webviepRoles()  : array<string|int, mixed>
Webviep Roles.

Methods

enforceWebviepRole()

Enforce Webviep Role.

public enforceWebviepRole(mixed $user, mixed $password) : mixed
Parameters
$user : mixed
$password : mixed

register()

Register the shortcode and hooks.

public register() : void

render()

Render login/registration form.

public render(array<string|int, mixed> $atts) : string

Attributes:

  • redirect_to: URL to redirect after login/registration (default: dashboard).
  • show_register: true|false – whether to show the registration form.
Parameters
$atts : array<string|int, mixed>

Shortcode attributes.

Return values
string

handleLogin()

Handle Login.

private handleLogin(array<string|int, mixed> &$state) : void
Parameters
$state : array<string|int, mixed>

handleRegister()

Handle registration submission.

private handleRegister(array<string|int, mixed> &$state, array<string|int, mixed> $roles) : void
Parameters
$state : array<string|int, mixed>

Rendering state.

$roles : array<string|int, mixed>

Available roles.

hasWebviepRole()

Has Webviep Role.

private hasWebviepRole(WP_User $user) : bool
Parameters
$user : WP_User
Return values
bool

webviepRoles()

Webviep Roles.

private webviepRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results