WP OAuth Server is built using WordPress’s Coding Standards. The plugin offers ways to extend and customize specific aspects by utilizing WordPress’s Filter and Action API. WP OAuth Server uses Custom Hooks to create a developer-friendly system.
WP OAuth Server uses filters to control and allow customization of specific aspects of the plugin. Below are filters that you can use to customize WP OAuth Server. Use WordPress’s ‘add_filter‘ function to modify all filters.
- wo_userclaims_email – Modify fields for the ’email’ claim while using OpenID
- wo_userclaims_profile – Modify fields for the ‘profile’ claim while using OpenID
- wo_userclaims_address – Modify fields for the ‘address’ claim while using OpenID
- wo_userclaims_phone – Modify fields for the ‘address’ claim while using OpenID
- wo_userclaims – Modify all fields for all claims being sent back while using OpenID
Extending Using a Plugin (Recommended)
Extending any WordPress plugin or theme by plugin recommend. It is the best way to provide custom code while maintaining the original code integrity of themes and plugins. We have provided a starter plugin that will allow you to get started fast.
Download the latest starter plugin
Once you have the plugin downloaded and installed on your WordPress site, you can edit
/wp-content/plugins/starter-wordpress-plugin/starter-wordpress-plugin.php with your favorite editor.
starter-wordpress-plugin.php is where you can add any custom code to extend WP OAuth Server. Simply install the starter plugin and ensure it is activated.
DO NOT USE THE WORDPRESS PLUGIN EDITOR
Extending using Current Theme
Extending using a theme’s function.php file is often the fastest way to add custom code to any WordPress website. It, however, can be dangerous because the theme can be updated out of control of you. You can lose all changes made if you don’t use a child theme properly.
Using your favorite editor, find your theme’s function.php file. At the end of the file, you can append any new code for extending WP OAuth Server. you can find more information about a theme’s functions.php file and where to find it at https://developer.wordpress.org/themes/basics/theme-functions/.