Undefined index: custom_image_header in after_setup_theme of Child Theme
-
Setup:
Parent Theme: Custom parent theme based on TwentyEleven
Child Theme: Custom child theme
WordPress: 3.4.2
Installation: MAMP (local / OSX Mountain Lion)Problem description:
My parent theme uses theafter_theme_setup
hook like TwentyEleven does to enable theme features. The problem I’m running in is the following.Parent theme uses
add_theme_support( 'custom-header', $custom_header_support );
analog to TwentyEleven.In my child theme I wish to disable the custom header with
remove_theme_support('custom-header');
. To do that I have a function attached to theafter_theme_setup
hook in my child themes functions.php with the following code:add_action( 'after_setup_theme', 'required_starter_after_parent_theme_setup', 11 );
Now I get a PHP Notice
Notice: Undefined index: custom_image_header in .../wp-includes/theme.php on line 1452
. I figured out a workaround, but it looks like a damn hack to me. Please have a look at the code on pastebin.Thanks in advance for any help!
- The topic ‘Undefined index: custom_image_header in after_setup_theme of Child Theme’ is closed to new replies.