gform_address_state_<rgget>
The Gravity Forms gform address state rgget hook.
Description
Parameters (2)
- 0. $var
- __( 'State / Province', 'gravityforms' )
- 1. $rgget
- The rgget.
Usage
- To run the hook, copy the example below.
- $var = apply_filters( 'gform_address_state_{$rgget}', $var, $rgget );
- if ( !empty( $var ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the gform_address_state_<rgget> callback
- function filter_gform_address_state_rgget( $var, $rgget ) {
- // make filter magic happen here...
- return $var;
- };
- // add the filter
- add_filter( "gform_address_state_{$rgget}", 'filter_gform_address_state_rgget', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "gform_address_state_{$rgget}", 'filter_gform_address_state_rgget', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /js.php
- new Input(field.id + 0.4, <?php echo json_encode( gf_apply_filters( array( 'gform_address_state', rgget( 'id' ) ), __( 'State / Province', 'gravityforms' ), rgget( 'id' ) ) ); ?>), new Input(field.id + 0.5, <?php echo json_encode( gf_apply_filters( array( 'gform_address_zip', rgget( 'id' ) ), esc_html__( 'ZIP / Postal Code', 'gravityforms' ), rgget( 'id' ) ) ); ?>), new Input(field.id + 0.6, <?php echo json_encode( gf_apply_filters( array( 'gform_address_country', rgget( 'id' ) ), esc_html__( 'Country', 'gravityforms' ), rgget( 'id' ) ) ); ?>)];