This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove init rest routes | |
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); | |
// Remove oembed rest routes | |
function remove_json_api () { | |
// Remove the REST API lines from the HTML Header | |
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); | |
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this is to add a fake component to BuddyPress. A registered component is needed to add notifications | |
function custom_filter_notifications_get_registered_components( $component_names = array() ) { | |
// Force $component_names to be an array | |
if ( ! is_array( $component_names ) ) { | |
$component_names = array(); | |
} | |
// Add 'custom' component to registered components array |