-
Notifications
You must be signed in to change notification settings - Fork 67
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 extra fields #762
base: master
Are you sure you want to change the base?
Add extra fields #762
Conversation
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.
Having these available will be nice! Left a few comments to clarify.
And it would be good to have these available for the Blog User as well!
includes/class-activitypub.php
Outdated
*/ | ||
public static function filter_get_posts_query( $query ) { | ||
if ( $query->get( 'post_type' ) === 'ap_extrafield' ) { | ||
$query->set( 'author', get_current_user_id() ); |
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.
I'm trying to understand why we need this? The author
field is already specified in the only two WP_Query
instances trying to get this data.
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.
This shows only the extra field of a user and hides the extra fields from the others on /wp-admin/edit.php?post_type=ap_extrafield
.
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.
Ok! Then it would probably be good to either 1) check that author
isn't already set before setting it, or 2) only add this filter on that page? Again, not that important, we can revisit if it's a problem.
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.
Makes sense! I moved the filters around a bit.
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.
🚢
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.
Screenshots in the PR description would be nice!
As we discussed, it'd be nice to have some form of migration and do display the defaults here:
To me it was surprising to arrive in the Gutenberg editor when I clicked "Add new", it felt like a bug. What about just adding another row for quickly adding a new entry and the Edit link gives you full-text editing?
<p>
<input class="regular-text" type="text" size="5" value="" placeholder="Field">
<input class="regular-text" type="text" value="" placeholder="Value">
</p>
Make extra fields editable