Created
March 5, 2020 13:14
-
-
Save spivurno/cda5f627ecafed3d305c8dafb258f2b1 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Default Form List to Active Forms | |
* http://gravitywiz.com/ | |
*/ | |
add_action( 'plugins_loaded', function() { | |
if( is_callable( array( 'GFForms', 'get_page' ) ) && GFForms::get_page() == 'form_list' ) { | |
if ( ! isset( $_GET['filter'] ) ) { | |
wp_redirect( add_query_arg( array( 'filter' => 'active' ) ) ); | |
exit; | |
} | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-form-list-active-by-default.php