Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Header Image
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: Remove Header Image
Description: Disables the header image for properly written themes like TwentyEleven.
Version: 1.0
Required: 3.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
! defined( 'ABSPATH' ) and exit;
add_filter( 'theme_mod_header_image', 'remove_header_image_path', 11 );
function remove_header_image_path()
{
return 'remove-header';
}
add_action( 'admin_menu', 'remove_header_image_support', 20 );
function remove_header_image_support()
{
remove_submenu_page( 'themes.php', 'custom-header' );
// The page is still accessible, so we disable at least uploads.
_remove_theme_support( 'custom-header' );
_remove_theme_support( 'custom-header-uploads' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.