二十主题标题使用子主题不会更改图像


Twentyten theme header Image not changing by using the child theme

我正在使用版本2.0的二十主题。我想在我的博客网站上使用这个主题,我正在使用子主题开发我的博客站点。该主题具有页眉图像功能,当显示页面或单个帖子时,该功能是灵活的。

我的意思是,在页面中,页眉图像是页面特色图像。当我在一篇帖子中时,它会有帖子的特色图片。然后在index.php中,它有默认的图像。现在我的问题是,我在child主题函数.php文件中的以下代码中做错了什么。

function twentyten_setup_another() {
    $custom_header_supportp = array(
        'width' => apply_filters( 'twentyten_header_image_width', 980 ),
        'height' => apply_filters( 'twentyten_header_image_height', 224 ),
    );
}
add_action( 'after_setup_theme', 'twentyten_setup_another' );

其没有在头部图像部分中示出上述功能。我的意思是,当我把这些代码放在子主题函数.php.

中时,已经删除了标题图像的灵活性

无论何时使用动作挂钩,都需要returnecho之类的东西:

function twentyten_setup_another() {
    $custom_header_supportp = array(
        'width' => apply_filters( 'twentyten_header_image_width', 980 ),
        'height' => apply_filters( 'twentyten_header_image_height', 224 ),
    );
    return $custom_header_supportp;
}
add_action( 'after_setup_theme', 'twentyten_setup_another' );