From my research there are only two questions I’ve found around this topic on this site:
- How to change in customizer the “site identity” tab required capabilities
- how to change default icon of custom plugin?
outside of the site I did find:
but when I try:
function default_icon() {
global $wp_customize;
$wp_customize->get_setting('site_icon',array (
'default' => home_url() . 'img/test.png'
));
}
add_action('customize_register','default_icon');
I’ve also tried add_setting
with:
function default_icon() {
global $wp_customize;
$wp_customize->add_setting('site_icon', array(
'default' => home_url() . 'img/test.png'
));
}
add_action('customize_register','default_icon');
but that doesn’t work either. It will not show the default icon in the drag and drop area and renders “No Image selected”:
In my functions.php how can I code my theme to render the default icon presently being used in the drag and drop area?
After further testing I can set the default when I code
:
add_action('customize_register','default_icon',10,2);
and I can see it in a dump of $wp_customize
but as far as rendering it will not.