Open benlk opened 7 years ago
Since this function is only used in /partials/nav-sticky.php
, I think we can remove the function altogether and integrate the code directly into the template for simplicity.
Steps needed on this ticket:
largo_home_icon()
function - if we have a saved value for the field, we should use it./partials/nav-sticky.php
with the logic contained in the function.largo_home_icon()
function from /inc/images.php
.
The regular expression here accepts the following:
but does not accept the following:
In cases where the saved URL is not accepted, the function silently outputs
<i class="icon-home ' . esc_attr( $class ) . '"></i>
where$class
was passed tolargo_home_icon()
Permanent fix
Change the regex. It's currently
/^http(s)?\:\/\//
It should accept:
/
(covers both absolute paths and protocol-agnostic paths)Temporary fix for sites affected:
Add the domain name and protocol back in.