Support » Plugin: Floating Social Media Links » [Plugin: Floating Social Media Links] PHP

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Halsey



    You pose an interesting question, this would require accessing the option from the database and executing it as PHP both on the server side, and I’m not sure that that’s possible. If anyone has ideas I’d be happy to try to implement them in a future release. I could also try to add options for dynamic links, but they would need to be relatively general…

    You could, of course, edit the plugin files and add the PHP manually where the links are output (the very bottom of the main PHP file); you would need to put something into the link field on the options page too (such as a trailing /), and would need to re-implement after every update, but it’s a workaround. You would need to be relatively familiar with PHP of course…

    Plugin Author Nick Halsey


    As of the just-released version 1.3.1, php-generated links are now possible, and quite easy. Use the custom output option, and then place:

    <?php floating_social_media_links([phplink1 or null],[phplink2 or null],[phplink3 or null]); ?>

    into each page template you want the frame on OR into footer.php (for display on every page). Links 1, 2, and 3 replace the first three custom links. Fill out the options page with the icon(s), link title(s), and checking the “show link” checkbox(es).

    The links will be sent to the function as the strings they return. Using “null” allows some extra flexibility for link order. The function does check for null values (and only replaces the link url field when the value isn’t null), but doesn’t do any additional checks, such as for a non-strings, WP_Error objects, etc. because of the wide range of possibilities. So I recommend running the necessary checks prior to passing the variable(s) to the function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Floating Social Media Links] PHP’ is closed to new replies.