esc_url not working within add_settings_field callback

I’m assuming $settings is an assigned variable elsewhere in your code?

If so, then ya gotta globalise it son (variable scope in PHP):

function outputFavIcon() {
    global $settings; ?>

And spell it right too 😉

<?php if ( isset ( $settings['generel_settings' /* <- typo? */]['fav_icon'] ) ) {

Leave a Comment