-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchip-for-gravity-forms.php
48 lines (35 loc) · 1.27 KB
/
chip-for-gravity-forms.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
<?php
/**
* Plugin Name: CHIP for Gravity Forms
* Plugin URI: https://wordpress.org/plugins/chip-for-woocommerce/
* Description: CHIP - Better Payment & Business Solutions
* Version: 1.1.0
* Author: Chip In Sdn Bhd
* Author URI: http://www.chip-in.asia
*
* Copyright: © 2025 CHIP
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
* Gravity Forms tested up to: 2.9
*/
defined( 'ABSPATH' ) || die();
define( 'GF_CHIP_MODULE_VERSION', 'v1.1.0' );
define( 'GF_CHIP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
add_action( 'gform_loaded', array( 'GF_CHIP_Bootstrap', 'load_addon' ), 5 );
class GF_CHIP_Bootstrap {
public static function load_addon() {
require_once GF_CHIP_PLUGIN_PATH . '/api.php';
require_once GF_CHIP_PLUGIN_PATH . '/class-gf-chip.php';
GFAddOn::register( 'GF_Chip' );
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( 'GF_CHIP_Bootstrap', 'gf_chip_setting_link' ) );
}
public static function gf_chip_setting_link( $links ) {
$new_links = array(
'settings' => sprintf(
'<a href="%1$s">%2$s</a>', admin_url( 'admin.php?page=gf_settings&subview=gravityformschip' ), esc_html__( 'Settings', 'gravityformschip' )
)
);
return array_merge( $new_links, $links );
}
}