Skip to content

Commit 9c6bb13

Browse files
authored
gw-form-list-active-by-default.php: Deprecated in favor of GF Dev Tools.
1 parent 84ef1e5 commit 9c6bb13

File tree

1 file changed

+3
-44
lines changed

1 file changed

+3
-44
lines changed
Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,6 @@
11
<?php
22
/**
3-
* Gravity Wiz // Gravity Forms // Default Form List to Active Forms
4-
*
5-
* Sets Form List view to Active Forms by Default.
6-
*
7-
* @version 0.1
8-
* @author David Smith <david@gravitywiz.com>
9-
* @license GPL-2.0+
10-
* @link https://gravitywiz.com
11-
*
12-
* Plugin Name: Gravity Forms Default Form List to Active
13-
* Plugin URI: http://gravitywiz.com
14-
* Description: Sets Form List view to Active Forms by Default.
15-
* Author: Gravity Wiz
16-
* Version: 0.1
17-
* Author URI: http://gravitywiz.com
18-
*
3+
* This snippet is now available as a free plugin with Spellbook. ✨
4+
* Instructions for installing this plugin can be found here:
5+
* https://gravitywiz.com/gravity-forms-dev-tools/#form-list-default-filter
196
*/
20-
add_action( 'init', function() {
21-
if ( ! class_exists( 'GFForms' ) ) {
22-
return;
23-
}
24-
if ( GFForms::get_page() === 'form_list' ) {
25-
26-
$params = array();
27-
28-
if ( ! isset( $_GET['sort'] ) ) {
29-
$params = array(
30-
'sort' => 'id',
31-
'dir' => 'desc',
32-
'orderby' => 'id',
33-
'order' => 'desc',
34-
);
35-
}
36-
37-
if ( ! isset( $_GET['filter'] ) ) {
38-
$params['filter'] = 'active';
39-
}
40-
41-
if ( ! empty( $params ) ) {
42-
wp_redirect( add_query_arg( $params ) );
43-
exit;
44-
}
45-
}
46-
47-
} );

0 commit comments

Comments
 (0)