WordPress plugin that allows you to authenticate users in the frontend in a reserved area
Apply the shortcode [comblock_login]
to a page to manage the login in the front-end.
The restricted area in the front-end is accessible from the page that implements this shortcode [comblock_dashboard]
.
Copy the views
plugin folder inside the current theme subfolder wp-content/themes/your-active-theme/comblock/views
add_filter("comblock_auth_post_{$slug}", function (string $slug): string {
return 'my-slug';
});
add_filter("comblock_auth_post_{$slug}_args", function (array $args): array {
// map args here
return $args;
});
Note: replace $slug
in the hook name with the slug generated by the plugin.
add_filter('comblock_redirect_login', function (string $permalink): string {
return 'my-login-link';
});
add_filter('comblock_redirect_logout', function (string $permalink): string {
return 'my-logout-link';
});
add_filter('comblock_redirect_dashboard', function (string $permalink): string {
return 'my-dashboard-link';
});
Dashboard info
add_filter('comblock_view_dashboard_template', function (string $template): string {
// filter html snippet dashboard template here
return $template;
});
Login form
add_filter('comblock_view_login_template', function (string $template): string {
// filter html snippet login template here
return $template;
});
add_filter('comblock_view_dashboard_render', function (string $template): string {
// filter final html output template here
return $template;
});
add_filter('comblock_view_login_render', function (string $template): string {
// filter final html output template here
return $template;
});
Adds custom HTML rendering before and after the main HTML output of the plugin in login/dashboard pages
add_action('comblock_view_dashboard_before', function () {
// print html here
// this snippet will be displayed before the main dashboard render
});
add_action('comblock_view_dashboard_after', function () {
// print html here
// this snippet will be displayed after the main dashboard render
});
add_action('comblock_view_login_before', function () {
// print html here
// this snippet will be displayed before the main login render
});
add_action('comblock_view_login_after', function () {
// print html here
// this snippet will be displayed after the main login render
});