Using the widget field ‘link’
I have some widgets using the function ‘link’
https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/#heading-link
If I enter a url, there’s nothing special here. But, if i select a post i get a string like
post: 123. Is there a built in function i can use here? In my widget class i have my own function get_link() which checks “does it start with ‘post’, then explode() and return get_permalink([the id])”;
I bet I’ve just missed something here, but I can’t find any info about what to do with this string. Maybe there’s a function/filter i can use?
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Linuzitac,
Yes, there’s a built in function for this called sow_esc_url to handle the links.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.