-
Notifications
You must be signed in to change notification settings - Fork 205
Add id and user type to store formatted author data #1110
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
Conversation
src/utils.js
Outdated
@@ -72,8 +72,9 @@ export const addItemByValue = ( | |||
* | |||
* @return {Object} The object containing data relevant to the Coauthors component. | |||
*/ | |||
export const formatAuthorData = ( { displayName, userNicename, email } ) => { | |||
export const formatAuthorData = ( { id, displayName, userNicename, email } ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to also update the docblock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in eaf5107
@GaryJones we need this tiny change for something that we are releasing soon on Newspack. Any concerns if I spin up a new version with it? |
Thanks, @GaryJones! |
Description
Add the author ID and user type to the store's formatted data. This is useful for 3rd parties that need to read from the edited post authors' data.
Usage example: Automattic/newspack-plugin#3906
Deploy Notes
Just a js build.
Steps to Test
There should be no impact on the plugin behavior. Make sure the "Authors" panel continues to work as expected.