PluginProbe
Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms / trunk
Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms vtrunk
1.26.15 trunk 1.0 1.10.0 1.11.0 1.11.1 1.12.0 1.12.1 1.12.10 1.12.11 1.12.12 1.12.2 1.12.3 1.12.4 1.12.5 1.12.6 1.12.7 1.12.8 1.12.9 1.13.0 1.13.1 1.13.10 1.13.11 1.13.12 1.13.2 All 194 releases
happyforms / happyforms.php

happyforms.php in Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms trunk, at happyforms.php

152 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Happyforms (free)
5 * Plugin URI: https://happyforms.io
6 * Description: Form builder to get in touch with visitors, grow your email list and collect payments.
7 * Author: Happyforms
8 * Version: 1.26.15
9 * Author URI: https://happyforms.io
10 * Upgrade URI: https://happyforms.io/upgrade
11 */
12
13 if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
14 if ( is_plugin_active( 'happyforms-upgrade/happyforms-upgrade.php' ) ) {
15 deactivate_plugins( 'happyforms-upgrade/happyforms-upgrade.php' );
16 }
17
18 wp_redirect( $_SERVER['REQUEST_URI'] );
19 exit;
20 }
21
22 /**
23 * The current version of the plugin.
24 */
25 define( 'HAPPYFORMS_VERSION', '1.26.15' );
26
27 if ( ! function_exists( 'happyforms_get_version' ) ):
28
29 function happyforms_get_version() {
30 return HAPPYFORMS_VERSION;
31 }
32
33 endif;
34
35 if ( ! function_exists( 'happyforms_plugin_file' ) ):
36 /**
37 * Get the absolute path to the plugin file.
38 *
39 * @return string Absolute path to the plugin file.
40 */
41 function happyforms_plugin_file() {
42 return __FILE__;
43 }
44
45 endif;
46
47 if ( ! function_exists( 'happyforms_plugin_name' ) ):
48 /**
49 * Get the plugin basename.
50 *
51 * @return string The plugin basename.
52 */
53 function happyforms_plugin_name() {
54 return plugin_basename( __FILE__ );
55 }
56
57 endif;
58
59 if ( ! function_exists( 'happyforms_get_plugin_url' ) ):
60 /**
61 * Get the plugin url.
62 *
63 * @return string The url of the plugin.
64 */
65 function happyforms_get_plugin_url() {
66 return plugin_dir_url( __FILE__ );
67 }
68
69 endif;
70
71 if ( ! function_exists( 'happyforms_get_plugin_path' ) ):
72 /**
73 * Get the absolute path of the plugin folder.
74 *
75 * @return string The absolute path of the plugin folder.
76 */
77 function happyforms_get_plugin_path() {
78 return plugin_dir_path( __FILE__ );
79 }
80
81 endif;
82
83 if ( ! function_exists( 'happyforms_get_include_folder' ) ):
84 /**
85 * Get the path of the PHP include folder.
86 *
87 * @return string The path of the PHP include folder.
88 */
89 function happyforms_get_include_folder() {
90 return dirname( __FILE__ ) . '/inc';
91 }
92
93 endif;
94
95 if ( ! function_exists( 'happyforms_get_core_folder' ) ):
96
97 function happyforms_get_core_folder() {
98 return dirname( __FILE__ ) . '/core';
99 }
100
101 endif;
102
103 if ( ! function_exists( 'happyforms_get_integrations_folder' ) ):
104
105 function happyforms_get_integrations_folder() {
106 return dirname( __FILE__ ) . '/integrations';
107 }
108
109 endif;
110
111 /**
112 * Activate
113 */
114 require_once( happyforms_get_core_folder() . '/helpers/helper-activation.php' );
115
116 /**
117 * Core
118 */
119 require_once( happyforms_get_core_folder() . '/classes/class-happyforms-core.php' );
120 require_once( happyforms_get_include_folder() . '/classes/class-happyforms.php' );
121
122 /**
123 * Main handler
124 */
125 if ( ! function_exists( 'HappyForms' ) ):
126 /**
127 * Get the global HappyForms class.
128 *
129 * @return HappyForms
130 */
131 function HappyForms() {
132 global $happyforms;
133
134 if ( is_null( $happyforms ) ) {
135 $happyforms = new HappyForms();
136 }
137
138 return $happyforms;
139 }
140
141 endif;
142
143 /**
144 * Start general admin and frontend hooks.
145 */
146 add_action( 'init', array( HappyForms(), 'initialize_plugin' ), 0 );
147
148 /**
149 * Start Customize screen specific hooks.
150 */
151 add_filter( 'customize_loaded_components', array( HappyForms(), 'initialize_customize_screen' ) );
152