Skip to content

Commit

Permalink
create GF component
Browse files Browse the repository at this point in the history
  • Loading branch information
ckanitz authored May 22, 2024
1 parent a078efe commit 2b3a6c0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions plugin/inc/Gravity_Forms/Gravity_Forms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* LHBASICSP\Gravity_Forms\Component class
*
* @package lhbasicsp
*/

namespace WpMunich\lhbasicsp\Gravity_Forms;
use WpMunich\lhbasicsp\Component;

use function add_action;
use function add_theme_support;

/**
* Add theme supports.
*/
class Gravity_Forms extends Component {
/**
* {@inheritdoc}
*/
public function add_actions() {}

/**
* {@inheritdoc}
*/
public function add_filters() {
add_filter( 'gform_address_display_format', array( $this, 'gform_address_display_format' ) );
}

/**
* Change the address format for Gravity Forms.
*
* @param string $format The address format.
*
* @return string
*/
public function gform_address_display_format( $format ) {
return 'zip_before_city';
}
}

0 comments on commit 2b3a6c0

Please sign in to comment.