Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

turn off wordpress user list exposed

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/wp/v2/users'] ) ) {
        unset( $endpoints['/wp/v2/users'] );
    }
    if ( isset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] ) ) {
        unset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] );
    }
    return $endpoints;
});
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #turn #wordpress #user #list #exposed
ADD COMMENT
Topic
Name
9+1 =