<?php
/**
* Dont Update the Theme
* If there is a theme in the repo with the same name, this prevents WP from prompting an update.
*/
function pmthemes_dont_update_theme( $r, $url ) {
	if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/1.1/' ) )
		return $r; // Not a theme update request. Bail immediately.
	$themes = json_decode( $r['body']['themes'] );
	$child = get_option( 'stylesheet' );
	unset( $themes->themes->$child );
	$r['body']['themes'] = json_encode( $themes );
	return $r;
}
add_filter( 'http_request_args', 'pmthemes_dont_update_theme', 5, 2 );

/*** Disable Header Generators */
remove_action( 'wp_head', 'wp_generator' ) ;
remove_action( 'wp_head', 'wlwmanifest_link' ) ;
remove_action( 'wp_head', 'rsd_link' ) ;

// Remove inline CSS for emoji
//remove_action( 'wp_print_styles', 'print_emoji_styles' );