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

how to disable author selection? #13356

mustafauysal opened this Issue Jan 17, 2019 · 2 comments


None yet
2 participants
Copy link

mustafauysal commented Jan 17, 2019


What is the right way to disable author selection?

screen shot 2019-01-17 at 14 10 14

The select box for the author is available when the REST API grabs all users and, this is a problematic situation for collaborative websites on a large scale.

(This is a chronic problem indeed, but we were able to replace author meta boxes with something like autocomplete boxes on the classic editor before.)

Populating users for the reproduce:

wp user generate --role=author --count=20000

Something like authors-autocomplete-meta-box can be workaround for choosing the author


This comment has been minimized.

Copy link

Soean commented Jan 17, 2019

There is an open pull request to solve the problem with a large number of users: #7385


This comment has been minimized.

Copy link

mustafauysal commented Jan 17, 2019

@Soean thanks for referencing #7385

I'm not sure it's the proper way but removing the users endpoint helps anyway.

add_filter( 'rest_endpoints', function ( $endpoints ) {
	if ( isset( $endpoints['/wp/v2/users'] ) ) {
		unset( $endpoints['/wp/v2/users'] );

	return $endpoints;
} );

(for the people who want to disable author selection)

closing the issue, eyes on #7385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment