Both the header and background image features setup some globals in order to work, unsetting those globals seems to have some effect, and at the least removes them from the administration side.
add_action('after_setup_theme', 'remove_theme_features', 11 );
function remove_theme_features() {
$GLOBALS['custom_background'] = 'kill_theme_features';
$GLOBALS['custom_image_header'] = 'kill_theme_features';
}
class kill_theme_features {
function init() { return false; }
}
There’s expectations for a class name to be provided as a callback for both of these features, and both expect the given class to have an init method. The solution was to create a dummy class that does nothing and update the globals, which effectively kills off the theme background and header pages in the admin area.
Hope that helps..
Related Posts:
- How to override parent functions in child themes?
- Adding a second email address to a completed order in WooCommerce [closed]
- How to override a function when isn’t at functions.php
- syntax for remove_filter in parent theme with class
- Is it possible to override this function/class in a child theme?
- How to override filter in child theme?
- overwrite code snippet from parent to child theme
- Solution dealing with Child Theme / Parent theme functions
- How to override this theme function in child theme
- get_template_directory_uri pointing to parent theme not child theme
- Include files in child theme functions file
- Redeclare a function in a child theme
- One Child Functions.php for Multiple Child Themes
- How to override function in functions.php of parent theme?
- override parent theme configuration in child functions.php
- How to override functions.php in child theme?
- How to prevent deleting of comments when deleting a post
- Overriding core functions in child theme
- Override parent theme function that is not hooked or in the functions.php file
- Function in Child Theme not overriding Parent Theme function [duplicate]
- add sidebar area to header of child theme
- Overriding methods in a child theme
- How to override enqueued styles using a child theme
- Should I ask a theme developer to use locate_template rather than require_once
- Customized wp_new_user_notification
- change default option in wp_dropdown_categories
- Using the child theme functions.php to change the customizer.php on parent theme
- Child theme functions.php not executing
- How to store / access files in child theme folder
- Make “sidebar template” the default template for new pages
- override parent theme configuration in child functions.php
- wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go
- Twenty Eleven Child theme error when attempting to use a rewritten function
- How do I get a child theme to load scripts from the parent theme?
- Best practice when altering a parent theme function inside a child theme?
- How to make child theme inherit parent custom theme options [closed]
- Avoid loading css from parent theme
- Creating a child theme – functions.php code issue
- Overwriting Parent Theme’s Image Sizes
- Problem only while using require_once() within functions.php
- Twentyten Child Theme: header images display messed up in admin panel
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- Why is functions.php file in child not initializing and over-writing parent?
- Please Explain the Importing Process of Multiple Stylesheets for Child Themes
- Reuse variable in hook callback
- Automatically include all php files in a child theme directory
- Override the function twentytwelve_scripts_styles in a child theme
- Add custom function to a theme with child theme’s functions.php
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- How to load parent theme template parts in child theme
- Running script based on Category
- How would I go about replacing this function in my child theme located in inc/template-tags.php
- How to target post and pages and not all post types in admin?
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- Not all CSS elements transferring via parent to child?
- Dequeue script to prevent javascript event conflict on wordpress child theme
- Got white blank page after copying the functions.php to child theme
- How do I change a parent theme’s function through the child theme?
- Randomizing wp_tag_cloud() in child theme
- Add back in child theme what the parent theme removed with remove_action
- Where do I go to edit this area? [closed]
- How to include any template using Shortcode fuction?
- Parent theme styles overriding child theme CSS [closed]
- Child theme function.php causes fatal error
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- How to remove admin footer text from inside child theme?
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- How to overwrite template.php file
- remove_action not working, even after changing priority [duplicate]
- How to use parent theme functions in child theme functions.php file?
- Removing parent theme CSS without editing parent theme
- Change custom featured image size in twentythirteen child theme
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Looking for Functions File that doesn’t Exist
- Include widget file in functions.php of child theme
- how can I add filter in specfic field in my website?
- Login cookies blocked after customizing hashing method
- Add Javascript code to functions.php childtheme
- I have an fatal error on my funcyions.php
- How to add javascript code into Divi child theme?
- Replace theme function
- Change default color scheme in twentyfifteen child theme?
- How would I correctly implement a new if statement in a child functions file?
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Child Theme not loading multiple stylesheets
- Including admin-options.php file in Child Themes
- uninstall a theme programmaticlly
- Providing fallback function and allow override by plugin
- Adding a meta box fields to child theme options page
- Update add_image_size
- Load a Child Theme’s style.css just before the closing tag
- save_post hook – headers already sent?
- Is it possible to change parameters of Parent theme function in the Child theme?
- Blank child theme – functions.php problem
- Functions.php in child theme that loads CSS file breaks website
- unregister_sidebar in child theme not working
- Unregistering custom tinymce plugin?
- Child Theme not working – CSS gone
- How to fix enqueue_styles error for a twenty-seventeen childtheme
- post_row_actions filter from parent theme not executing in child theme