generated from luehrsenheinrich/wp-project-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
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'; | ||
} | ||
} |