File: /var/www/html/wptoho/wp-content/themes/themify-ultra-child/functions.php
<?php
/* To enable child-theme-scripts.js file, remove the PHP comment below: */
/* remove this line
function custom_child_theme_scripts() {
wp_enqueue_script( 'themify-child-theme-js', get_stylesheet_directory_uri() . '/child-theme-scripts.js', [ 'jquery' ], '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'custom_child_theme_scripts' );
remove this line too */
/* Custom functions can be added below. */
// Disable /users rest routes
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;
});