To make the plugin extra easy and functional as per the requirements, here comes the detailed documentation regarding the plugin. All about educating the things related to the plugin.
How to Add Social Login Developer Filters Using LoginPress Pro
LoginPress provides a self-hosted alternative to the SaaS social login add-on, handling OAuth and user mapping within WordPress.
Version 6.2.0 introduces a standardized social login developer filters layer across all social providers, allowing developers to modify each user field before it is saved to WordPress.
Table of Contents:
This new feature in LoginPress helps developers and agency owners to maintain strict control over how external data from providers such as Google, Apple, and GitHub is ingested into their database
This feature bridges the gap between third-party API data and your specific site requirements.
How Social Authentication Data Pipeline Work?
LoginPress 6.2.0 introduces a programmable interception point for social authentication data.
This feature allows developers to gain granular control over the data flow between a social provider and the WordPress database.
When a user authenticates via a social provider (such as Google, Apple, or GitHub), the following pipeline occurs:
- OAuth Payload Receipt: LoginPress receives an OAuth payload from the provider that contains raw user details, such as username, email, profile name, and avatar.
- Developer Interception: Before this data is permanently committed, new filters allow developers to intercept each individual field.
- Database Entry: After any custom functions are applied, the final data is written to the wp_users and wp_usermeta tables.
How to Use the Social Login Developer Filter Framework
To use these social login filters, you will work within your theme's functions.php file or a custom functionality plugin. The filter follows a consistent syntax: loginpress_sl_{provider}_{field}.
Practical Example: Customizing Discord Community Data
If you want to ensure all Discord users have their First Name field capitalized and a custom string added to their username. This is useful when you run a Discord-based community and want WordPress usernames to always include a Discord-specific prefix and formatting.
This is how you would use:
// 1. Filter the Username
add_filter( 'loginpress_sl_discord_username', 'custom_discord_username_logic', 10, 1 );
function custom_discord_username_logic( $username ) {
return 'discord_user_' . $username;
}
// 2. Filter the First Name
add_filter( 'loginpress_sl_discord_firstname', 'custom_discord_firstname_logic', 10, 1 );
function custom_discord_firstname_logic( $firstname ) {
return ucfirst( strtolower( $firstname ) );
}
| Data Point | Filter Name Example (for GitHub) |
| Username | loginpress_sl_github_username |
| First Name | loginpress_sl_github_firstname |
| Last Name | loginpress_sl_github_lastname |
| Avatar URL | loginpress_sl_github_avatar |
Existing implementations using legacy filters will continue to function.
This update adds consistency across the entire Social Login addon without breaking previous custom code.
Strategic Advantages of Social Login Filters
- Database Integrity: Social APIs often return inconsistent or unstructured data. The filters facilitate data cleansing before insertion into the wp_users table.
- Compliance and Privacy: In jurisdictions with privacy regulations, these filters support anonymizing last names by storing only the first initial, even when the social provider provides the full name.
- User Experience Consistency: For sites with a distinct focus, such as gaming communities, the filters can automatically append clan tags or specific identifiers to usernames retrieved from platforms like Twitch or Discord.
After configuring the Social Login Developer Filters in LoginPress 6.2.0, your site can intercept and customize OAuth data before it is stored in the WordPress database.
If you experience any issues while implementing the Social Login filters, please refer to the LoginPress Social Login documentation or contact the LoginPress support team for assistance.
Learn more about connecting social platforms using LoginPress:
Frequently Asked Questions (FAQs)
These FAQs answer the most common questions about our WordPress custom login page plugin.
Where can I get support for LoginPress?
If you need help with LoginPress, you can contact us here. We’ll be happy to answer any questions about the plugin.
Do you have an affiliate program?
Yes, we have an affiliate program that you can sign up for here. As an affiliate, you’ll earn a commission on every sale you refer to us.
Do you offer refunds?
Yes, we offer a 14-day money-back guarantee on all of our plans. If you’re unsatisfied with LoginPress, simply contact us within 14 days of your purchase, and we’ll process a refund.
Can I upgrade my license after my initial purchase?
Yes, you can upgrade your LoginPress license at any time. Simply log into your account and go to the My Downloads page. From here, you can upgrade your license and download the latest version of the plugin.
Will LoginPress slow down my website?
No, LoginPress will not slow down your website. The plugin is lightweight and only loads the necessary files when someone tries to access your login page.
If you Still have Questions?
Get In Touch