Skip to content

Instantly share code, notes, and snippets.

View zackeryfretty's full-sized avatar

Zackery Fretty zackeryfretty

View GitHub Profile
// Integrate WPF Return into Gravity Forms Login Shortcode
function zf_check_for_wpf_return_cookie_on_login( $login_redirect, $sign_on ) {
// Check for WPF Return Cookie and ensure it's a valid post ID
if ( isset( $_COOKIE["wpf_return_to"] ) && is_numeric( $_COOKIE["wpf_return_to"] ) ) {
// Get Permalink for the specified post ID
$return_url = get_permalink( (int) $_COOKIE["wpf_return_to"] );
// Set Redirect to the sanitized URL
function add_brx_btn_css_to_gf( $button, $form ) {
$fragment = WP_HTML_Processor::create_fragment( $button );
$fragment->next_token();
$fragment->add_class( 'brxe-button' );
$fragment->add_class( 'bricks-button' );
$fragment->add_class( 'bricks-background-primary' );
return $fragment->get_updated_html();
<?php
add_filter(
"generate_svg_icon_element",
function ($output, $icon) {
switch ($icon) {
case "menu-bars":
$output =
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg>';
break;
{% comment %}
------------------------------------------------------------
VARS
------------------------------------------------------------
{% endcomment %}
{% assign section_class = 'zf-custom-section' %}
{% assign this_section = 'zf-section-' | append: section.id %}
{% comment %}