Last active
January 24, 2023 08:16
-
-
Save Fray117/dfc03c515f235bd096cf8e52872789c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Floating Action | |
* Plugin URI: https://gist.github.com/Fray117/dfc03c515f235bd096cf8e52872789c5 | |
* | |
* Description: Display a customizable floating widget | |
* Version: 0.6 | |
* Author: SABAKO | |
* Author URI: https://sabako.id | |
* | |
*/ | |
function floating_action_html() { | |
$link = 'https://linktr.ee/jasperskin'; | |
$css = ' | |
position: fixed; | |
bottom: 32px; | |
right: 32px; | |
background-color: #fff; | |
border-radius: 32px; | |
width: 64px; | |
height: 64px; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
font-size: 32px; | |
'; | |
$html = '<div class="display-floating-btn" style="' . $css . '"> | |
<a href="' . $link . '" style="margin: auto;"> | |
<i class="fas fa-comment"></i> | |
</a> | |
</div>'; | |
echo $html; | |
} | |
add_action( 'wp_footer', 'floating_action_html' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment