You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I noticed is that it assumes that the svg icons are in (a subfolder of) the theme folder. I was trying to add them packaged as a plugin but the str_replace() on the load_field() callback was preventing my icons from displaying.
I added two extra filters as a workaround to be able to set both search and replace parameters, now my svg can be located in that plugin-folder too.
The text was updated successfully, but these errors were encountered:
Replace the current wrong line/behaviour by: $field['file']['url'] = str_replace( get_home_path(), home_url( '/' ), $field['file']['path'] );. This change should solve your problem.
Offer three filters like acf/fields/svg_icon/file_path for the file URL (e.g.: acf/fields/svg_icon/file_url) to allow the use of an SVG file from a rewrited URL for example.
I hope you will appreciate this solution. I will try to fix this issue during the week.
Hi 7studio, great work!
One thing I noticed is that it assumes that the svg icons are in (a subfolder of) the theme folder. I was trying to add them packaged as a plugin but the str_replace() on the load_field() callback was preventing my icons from displaying.
I added two extra filters as a workaround to be able to set both search and replace parameters, now my svg can be located in that plugin-folder too.
The text was updated successfully, but these errors were encountered: