Hello/Hi/Greetings,
I'm using the "great" plugin Add Headers to use best practices for "favicons" (different sizes depending on client). But this means I no longer need or want the favicon.ico
I think I found were I could stop that from happening but it would mean locally editing a .php file, which I would rather not do. Is there a way of stopping the favicon.ico being written into the header?
I tried experimenting with local files editor but that no longer "saves" the added information, and errors out.
Many Thanks - Nigel.
Piwigo 11.4.0
Operating system: Linux
PHP: 7.4.16 (Show info) [2021-03-26 10:35:35]
MySQL: 8.0.23-0ubuntu0.20.04.1 [2021-03-26 10:35:35]
Graphics Library: External ImageMagick 6.9.10-23
Offline
Hi :-)
What theme you are choose ?
Offline
I'm currently using the Elegant Theme ...
Offline
Hi :-)
personal plugin
add_event_handler('loc_begin_page_header', 'del_Favicon', 65 );
function del_Favicon(){
global $template;
$template->set_prefilter('header', 'del_FaviconF');
}
function del_FaviconF($content, &$smarty){
$search = '#<link rel="shortcut icon".*?favicon.ico">#';
$replacement = '';
return preg_replace($search, $replacement, $content);
}
Offline
ddtddt,
Many thanks, that worked perfectly straight out of the box, well, cut and pasted out of a forum, but it doesn't sound so good!
What was strange was that I had no issues "saving" this time, just did as it was supposed to do.
Once Again, Many Thanks ....
Nigel.
Offline