Auth Tabs & Account Icon + Registrants
WordPress plugin: Provides AJAX login/register tabs, multilingual shortcodes, account icon dropdown, and admin registrants management with CSV export.
by Giannis Sifakis · github.com/giansifakis/auth-tabs-account-icon
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/giansifakis/auth-tabs-account-icon/archive/refs/heads/main.zipA WordPress plugin that adds multilingual AJAX login/registration tabs, forgot password functionality, a logged-in account icon dropdown, subscriber access restrictions, and a custom Registrants admin area for viewing, editing, searching, and exporting registered users.
Features
- AJAX-powered registration form.
- AJAX-powered login form.
- AJAX-powered forgot password form.
- Multilingual shortcode versions for:
- English
- Italian
- Spanish
- Dutch
- Greek
- German
- Auto-login after successful registration.
- Login with username or email address.
- New users are created as WordPress
subscriberusers. - User meta fields for:
- Country
- Capacity / Role
- Age range
- Gender
- Optional WooCommerce country list support.
- Fallback ISO country list when WooCommerce is not active.
- Select2-enhanced dropdowns.
- Country selector with flag icons.
- Account icon shortcode with a logged-in user dropdown.
- Logout button inside the account icon dropdown.
- Logout redirect support through shortcode attributes.
- Subscriber users are redirected away from
/wp-admin/. - Subscriber users are redirected to the homepage after native WordPress login.
- WordPress admin bar is hidden for subscriber users on the frontend.
- Custom WordPress admin menu: Registrants.
- Registrants list table with search.
- Edit registrant details from the WordPress admin area.
- Export registrants to CSV.
- UTF-8 BOM support for better CSV compatibility with Excel.
Requirements
- WordPress installation.
- PHP compatible with your WordPress version.
- JavaScript enabled in the browser.
- jQuery, loaded through WordPress.
- Optional: WooCommerce, if you want the plugin to use WooCommerce’s localized country list.
The plugin loads the following frontend dependencies from CDNs:
- Google Fonts: Manrope
- Select2
- Flag Icons
Installation
-
Create a plugin folder, for example:
wp-content/plugins/auth-tabs-account-icon/ -
Add the PHP plugin file inside that folder, for example:
wp-content/plugins/auth-tabs-account-icon/auth-tabs-account-icon.php -
Add an account icon image named:
user.pngThe image should be placed in the same plugin folder as the PHP file:
wp-content/plugins/auth-tabs-account-icon/user.png -
Go to:
WordPress Admin → Plugins -
Activate:
Auth Tabs & Account Icon + Registrants
File structure example
auth-tabs-account-icon/
├── auth-tabs-account-icon.php
└── user.png
Shortcodes
Authentication tabs
Use these shortcodes to display the registration/login tabs.
| Language | Shortcode | Redirect after login/registration |
|---|---|---|
| English | [auth_tabs] |
/e-learning |
| Italian | [auth_tabs_it] |
/it/piattaforma/ |
| Spanish | [auth_tabs_es] |
/es/aprendizaje-en-linea/ |
| Dutch | [auth_tabs_nl] |
/nl/nl-e-learning/ |
| Greek | [auth_tabs_gr] |
/el/ilektroniki-mathisi/ |
| German | [auth_tabs_de] |
/de/de-e-learning/ |
Example:
[auth_tabs]
Greek example:
[auth_tabs_gr]
German example:
[auth_tabs_de]
Account icon shortcodes
Use these shortcodes to display the logged-in user account icon with a logout dropdown.
| Language | Shortcode |
|---|---|
| English | [account_icon] |
| Italian | [account_icon_it] |
| Spanish | [account_icon_es] |
| Dutch | [account_icon_nl] |
| Greek | [account_icon_gr] |
| German | [account_icon_de] |
Example:
[account_icon]
The account icon only appears for logged-in users. Logged-out users will see nothing.
Account icon logout redirect
The account icon shortcodes support a redirect attribute. This controls where the user is sent after logging out.
Example:
[account_icon redirect="/goodbye/"]
Italian example:
[account_icon_it redirect="/it/"]
Greek example:
[account_icon_gr redirect="/el/"]
Registration fields
The registration form collects the following fields:
- First name
- Last name
- Email address
- Username
- Country
- Capacity / Role
- Age range
- Gender
- Password
- Confirm password
New users are created with the WordPress role:
subscriber
The extra registration fields are saved as WordPress user meta:
| Field | User meta key |
|---|---|
| Country | country |
| Capacity | capacity |
| Age range | age_range |
| Gender | gender |
Registration validation
The plugin validates the registration form server-side.
It checks that:
- All fields are filled in.
- The email address is valid.
- The email address is not already registered.
- The username is not already taken.
- The password and confirmation password match.
- The password has at least 6 characters.
Login
The login form accepts either:
- Username
- Email address
The plugin uses WordPress authentication through wp_signon().
After successful login, users are redirected to the relevant page depending on the shortcode language.
Forgot password
The login panel includes a forgot password form.
The forgot password form:
- Asks the user for their email address.
- Sends a WordPress password reset link if the email belongs to an existing account.
- Uses translated messages depending on the shortcode language.
- Avoids revealing whether an email exists or not by returning the same success message for valid email formats.
Supported forgot password message languages:
- English
- Italian
- Spanish
- Dutch
- Greek
- German
Subscriber redirects and restrictions
The plugin adds frontend restrictions for users with the subscriber role.
Subscriber users:
- Are redirected to the homepage after native WordPress login.
- Cannot manually access
/wp-admin/. - Are redirected back to the homepage if they try to access the WordPress admin area.
- Do not see the WordPress admin bar on the frontend.
These restrictions are useful when the plugin is used for an e-learning platform, private area, or project platform where users should only access frontend pages.
Admin: Registrants
After activation, a new WordPress admin menu item appears:
Registrants
From this page, administrators or users with the correct permissions can:
- View registered users.
- Search users.
- View country, capacity, age range, and gender.
- Edit registrant details.
- Export registrants to CSV.
The registrants table displays:
- Name
- Surname
- Username
- Country
- Capacity
- Age Range
- Gender
Search
The Registrants admin table includes a search box.
Search is performed against:
- Username
- Display name
Edit registrant
The admin edit screen allows editing of:
- First name
- Last name
- Country
- Capacity
- Age range
- Gender
The username is shown as read-only in the edit screen.
CSV export
The Export CSV button downloads a file named like:
registrants-YYYY-MM-DD.csv
The CSV includes:
- Name
- Surname
- Username
- Country
- Capacity
- Age Range
- Gender
A UTF-8 BOM is included for better compatibility with Excel.
Permissions
The plugin uses WordPress capabilities for admin access:
| Action | Required capability |
|---|---|
| View Registrants list | list_users |
| Export CSV | list_users |
| Edit registrant | edit_users |
Styling and scripts
The plugin injects inline CSS and JavaScript for the authentication tabs, forgot password form, Select2 dropdowns, and account icon.
Frontend assets include:
- Manrope font
- Select2 dropdown styling
- Flag icons for the country selector
- Custom responsive styles for the authentication forms
- Custom styles for success/error messages
- Custom styles for the account icon dropdown
WooCommerce country list support
If WooCommerce is active, the plugin uses WooCommerce’s country list through:
WC_Countries
If WooCommerce is not active, the plugin falls back to its own ISO 3166-1 country list.
Saved meta values
The translated shortcodes display labels in different languages, but some saved values remain in English for consistency in the database and CSV exports.
Examples include:
Youth
Youth Worker
Other
Male
Female
Non-binary
Prefer not to say
This makes filtering, reporting, and exporting easier across all language versions.
Notes
- The plugin assumes that the
user.pngicon exists in the plugin folder. - The form redirects are hardcoded in the shortcode markup or JavaScript configuration.
- The English shortcode redirects to
/e-learning. - The translated authentication shortcodes each have their own hardcoded redirect URL.
- Passwords require a minimum length of 6 characters.
- The plugin currently includes English, Italian, Spanish, Dutch, Greek, and German shortcode versions.
- No Portuguese shortcode is included in this version.
- The plugin loads some frontend assets from external CDNs.
- Subscriber users are intentionally prevented from accessing the WordPress dashboard.
Security notes
The plugin includes several WordPress security practices:
- Prevents direct file access with an
ABSPATHcheck. - Uses AJAX nonces for registration, login, and forgot password requests.
- Sanitizes submitted form fields.
- Validates email addresses.
- Checks for duplicate emails.
- Checks for duplicate usernames.
- Validates password confirmation.
- Uses WordPress authentication functions for login and logout.
- Uses WordPress password reset functionality.
- Avoids exposing whether a password reset email belongs to an existing account.
- Uses admin nonces for registrant editing and CSV export.
- Checks user capabilities before admin actions.
- Escapes output in frontend and admin areas.
Version
1.3
Author
Giannis Sifakis
LinkedIn Profile