Skip to content

Instantly share code, notes, and snippets.

Paul Gilzow gilzow

Block or report user

Report or block gilzow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View analytics-tracking.twig
{#
*
*
* @package WordPress
* @subpackage
* @category theme
* @category view
* @author Paul Gilzow, Mizzou Creative, University of Missouri
* @copyright 2016 Curators of the University of Missouri
#}
@gilzow
gilzow / put-inside-functions.php
Created Jan 5, 2017
Removes user endpoints from WordPress REST API
View put-inside-functions.php
<?php
/**
* Remove user list endpoint from rest api
*/
add_filter('rest_endpoints', function($aryEndpoints){
if(isset($aryEndpoints['/wp/v2/users'])){
unset($aryEndpoints['/wp/v2/users']);
}
if(isset($aryEndpoints['/wp/v2/users/(?P<id>[\d]+)'])){
unset($aryEndpoints['/wp/v2/users/(?P<id>[\d]+)']);
You can’t perform that action at this time.