Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
December 13, 2017 at 12:07 am #888111
Hi there!
Is there a workaround for getting the social share buttons to include the URL-query in the link-to-be-shared?
Currently the link shared through the social share buttons only include the clean URL, and not any “?”-queries.
Link for the website in question in Private Content.
Please do let me know if you’ll be needing login-/ftp-access, or further info :)
Thank you so much in advance!
-
This topic was modified 7 years, 10 months ago by
transdesign_dk. Reason: Debug added
December 14, 2017 at 4:03 am #888724Hey Martin,
Thank you for using Enfold.
You can use the “avia_social_share_link_replace_values” to adjust the value of the default shortlink or permalink. The current value is based on the get_permalink function. Example:
add_filter('avia_social_share_link_replace_values', 'avia_social_share_link_replace_values_mod'); function avia_social_share_link_replace_values_mod($replace) { $replace['shortlink'] = get_permalink(); // you can change this $replace['permalink'] = get_permalink(); // you can change this return $replace; }Best regards,
IsmaelDecember 14, 2017 at 11:47 am #888834Amazing, thank you so much!
Can I assume this is quite safe (thinking XSS-exploits) to use, then?
add_filter('avia_social_share_link_replace_values', 'avia_social_share_link_replace_values_mod'); function avia_social_share_link_replace_values_mod($replace) { $replace['shortlink'] = esc_url( $_SERVER['HTTP_HOST'] ) . esc_url( $_SERVER['REQUEST_URI'] ); // you can change this $replace['permalink'] = esc_url( $_SERVER['HTTP_HOST'] ) . esc_url( $_SERVER['REQUEST_URI'] ); // you can change this return $replace; }December 16, 2017 at 3:48 am #889458 -
This topic was modified 7 years, 10 months ago by
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
