Created
March 26, 2021 22:37
-
-
Save adampatterson/e5965d51f6c863d08834ebc285c7210f to your computer and use it in GitHub Desktop.
Add SVG to Gravity from button - Elementor
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
add_filter( 'gform_submit_button', 'form_submit_button', 10, 2 ); | |
function form_submit_button( $button, $form ) { | |
$svg = '<svg xmlns="http://www.w3.org/2000/svg" width="71.242" height="17.625" viewBox="0 0 71.242 17.625" class="javaVictorButton"><g id="button" transform="translate(-1095.422 -2403.444)"><path id="Path_535" data-name="Path 535" d="M-17503.5,2646.988h9.877l3.248-6.42,4.66,10.453,5.086-10.453,5.117,10.453,5.441-10.453h0l5.008,10.453,4.754-10.453,3.191,6.42h20.012" transform="translate(18598.922 -233.632)" fill="none" stroke="#fff" stroke-width="3"></path><path id="Path_536" data-name="Path 536" d="M-17295.016,2609l9.115,7.709-9.115,6.06" transform="translate(18450.072 -202.949)" fill="none" stroke="#fff" stroke-width="3"></path></g></svg>'; | |
return "<button class='elementor-button-link elementor-button elementor-size-md' id='gform_submit_button_{$form['id']}'> | |
<span class='elementor-button-content-wrapper'> | |
<span class='elementor-button-icon elementor-align-icon-right'> | |
{$svg} | |
</span> | |
<span class='elementor-button-text'>{$form['button']['text']}</span> | |
</span> | |
</button>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment