Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first_name & last_name to user object fields #5775

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JoryHogeveen
Copy link
Member

@JoryHogeveen JoryHogeveen commented Jul 14, 2020

Fixes: #1890
Related: #4041

Changelog text for these changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.
  • My code includes PHP Unit Tests (if applicable)

@JoryHogeveen JoryHogeveen added the Type: Enhancement Enhancements to features that already exist, but are not major additions label Jul 14, 2020
@JoryHogeveen JoryHogeveen added this to the Pods 2.7.22 milestone Jul 14, 2020
@JoryHogeveen JoryHogeveen self-assigned this Jul 14, 2020
Copy link

@tr1b0t tr1b0t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 4 error(s)
⚠️ 2 warning(s)

classes/PodsAPI.php Outdated Show resolved Hide resolved
classes/PodsAPI.php Outdated Show resolved Hide resolved
classes/PodsAPI.php Outdated Show resolved Hide resolved
classes/PodsAPI.php Outdated Show resolved Hide resolved
@JoryHogeveen JoryHogeveen added Status: PR > Pending Code Review PR is pending code review by core developers Status: PR > QA pending QA needs to be done labels Jul 14, 2020
@sc0ttkclark sc0ttkclark changed the base branch from 2.x to release/2.7.22 July 15, 2020 14:51
@sc0ttkclark
Copy link
Member

Probably needs some testing coverage to confirm this works as expected since they aren't object table (wp_users) fields but they're meta (wp_usermeta) fields.

@JoryHogeveen
Copy link
Member Author

@sc0ttkclark I assumed this wouldn't be an issue since menu_order is also included as an object field while it's saved as post metadata.

@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.7.22, Pods 2.7.23 Aug 13, 2020
@sc0ttkclark
Copy link
Member

menu_order is a wp_posts table field though

@sc0ttkclark sc0ttkclark changed the base branch from release/2.7.22 to main August 13, 2020 18:02
@JoryHogeveen
Copy link
Member Author

Oh wow, I was 100% sure that it was a meta field.
In that case, what are possible issues that could rise by adding these fields as object fields? In WP core the fields are labels as User object fields..

@JoryHogeveen
Copy link
Member Author

@sc0ttkclark Bump:

In that case, what are possible issues that could rise by adding these fields as object fields? In WP core the fields are labels as User object fields..

@sc0ttkclark
Copy link
Member

@JoryHogeveen the problem with object fields is that they are treated specially during saving of the object data, querying, traversal, and other functionality throughout Pods.

@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.7.25, Backlog Dec 17, 2020
@sc0ttkclark
Copy link
Member

I'd like to see us be able to supply special meta-based object fields which get set up as normal Field objects instead of Object_Field in 2.8. This may be easier to do post 2.8

@sc0ttkclark sc0ttkclark marked this pull request as draft July 25, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Keyword: Needs Unit Tests Status: PR > Pending Code Review PR is pending code review by core developers Status: PR > QA pending QA needs to be done Type: Enhancement Enhancements to features that already exist, but are not major additions
Projects
None yet
3 participants