AI Verified

Name

Hide User Data

About

Hides the user data from hackers using wp-json/wp/v2/users to find user info

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

Just add.

Codevault

lowthian

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://www.lowthiandesign.com

History

Last modified:

26/06/2024

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Hide User Data

 
                    
1function disable_rest_endpoints ( $endpoints ) {
2 if ( isset( $endpoints['/wp/v2/users'] ) ) {
3 unset( $endpoints['/wp/v2/users'] );
4 }
5 if ( isset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] ) ) {
6 unset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] );
7 }
8 return $endpoints;
9}
10add_filter( 'rest_endpoints', 'disable_rest_endpoints');

0

Related Snippets

Please see some snippets below related to this snippet..

General

AI Verified

1

Ensure webfont is loaded

Added: 7 months ago

Last Updated: 6 months ago

General

AI Verified

4

Allow SVG

Added: 1 year ago

Last Updated: 10 hours ago

Allow SVG upload without a plugin

General

Unverified

0

Clock

Added: 1 month ago

Last Updated: 1 month ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

1

View update info on posts

Added: 2 weeks ago

Last Updated: 2 weeks ago

WordPress Admin

AI Verified

1

Link to clear Bunny CDN

Added: 4 months ago

Last Updated: 4 months ago

I wanted a way for my clients to have a one click "Clear Bunny CDN" without having to go into other settings. Worked with AI and BunnyCDN support on this.

General

AI Verified

0

Gravity to Stripe Description

Added: 8 months ago

Last Updated: 8 months ago