1. Home
  2. Docs
  3. Divi Query Builder
  4. Action & Filter Hook...
  5. Alter User Data

Alter User Data

Overview

The ctdqb_get_user_data filter hook allows you to modify or extend the user data array that is collected for each user within the Query Builder loop. This filter provides access to all the gathered user information and enables you to add custom data or modify existing values before the user is rendered.

Hook Parameters

  1. $props – Array of module properties.
  2. $user_data -Array containing all collected user data and metadata.

Understanding the User Data Array

The $user_data array contains comprehensive information about each user:

Core User Data

  • id – User ID
  • title – User display name
  • username – User nicename (URL-friendly username)
  • email – User email address
  • website – User website URL

Profile Information

  • author_link – URL to user’s author archive page
  • avatar_html – User avatar HTML (supports WP User Avatar plugin)
  • description – User biographical information

Custom Fields

  • custom_fields – Array of custom field data
  • custom_fields_html – Rendered custom fields HTML
  • cf_link – Custom field link value

Divi Layout Data

  • dl_content – Divi layout content (when enabled)

0 Comments

Submit a Comment

How can we help?