forked from 13pixlar/sticky-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsticky-list.php
59 lines (48 loc) · 1.61 KB
/
sticky-list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/*
Plugin Name: Gravity Forms Sticky List
Plugin URI: https://github.com/13pixlar/sticky-list
Description: List and edit submitted entries from the front end
Version: 1.5.2
Author: 13pixar
Author URI: http://13pixlar.se
*/
/* Todo
* Support for file multiple uploads
*/
//------------------------------------------
// Create a helper function for easy SDK access.
function stickylist_fs() {
global $stickylist_fs;
if ( ! isset( $stickylist_fs ) ) {
// Include Freemius SDK.
require_once dirname(__FILE__) . '/includes/start.php';
$stickylist_fs = fs_dynamic_init( array(
'id' => '1528',
'slug' => 'gravity-forms-sticky-list',
'type' => 'plugin',
'public_key' => 'pk_ab96a4a2bac76862a81de1dde21a9',
'is_premium' => false,
'has_addons' => false,
'has_paid_plans' => false,
'menu' => array(
'first-path' => 'plugins.php',
),
) );
}
return $stickylist_fs;
}
// Init Freemius.
stickylist_fs();
// Signal that SDK was initiated.
do_action( 'stickylist_fs_loaded' );
add_action( 'gform_loaded', array( 'StickyList_Bootstrap', 'load' ), 5 );
class StickyList_Bootstrap {
public static function load() {
if ( ! method_exists( 'GFForms', 'include_addon_framework' ) ) {
return;
}
require_once( 'class-sticky-list.php' );
GFAddOn::register( 'StickyList' );
}
}