PluginProbe
Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms / 1.13.11
Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms v1.13.11
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 1.13.11, at happyforms.php

150 lines 3.0 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: We're changin' WordPress forms.
7 * Author: Happyforms
8 * Version: 1.13.11
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.13.11' );
26
27 if ( ! function_exists( 'happyforms_plugin_file' ) ):
28 /**
29 * Get the absolute path to the plugin file.
30 *
31 * @return string Absolute path to the plugin file.
32 */
33 function happyforms_plugin_file() {
34 return __FILE__;
35 }
36
37 endif;
38
39 if ( ! function_exists( 'happyforms_plugin_name' ) ):
40 /**
41 * Get the plugin basename.
42 *
43 * @return string The plugin basename.
44 */
45 function happyforms_plugin_name() {
46 return plugin_basename( __FILE__ );
47 }
48
49 endif;
50
51 if ( ! function_exists( 'happyforms_get_plugin_url' ) ):
52 /**
53 * Get the plugin url.
54 *
55 * @return string The url of the plugin.
56 */
57 function happyforms_get_plugin_url() {
58 return plugin_dir_url( __FILE__ );
59 }
60
61 endif;
62
63 if ( ! function_exists( 'happyforms_get_plugin_path' ) ):
64 /**
65 * Get the absolute path of the plugin folder.
66 *
67 * @return string The absolute path of the plugin folder.
68 */
69 function happyforms_get_plugin_path() {
70 return plugin_dir_path( __FILE__ );
71 }
72
73 endif;
74
75 if ( ! function_exists( 'happyforms_get_include_folder' ) ):
76 /**
77 * Get the path of the PHP include folder.
78 *
79 * @return string The path of the PHP include folder.
80 */
81 function happyforms_get_include_folder() {
82 return dirname( __FILE__ ) . '/inc';
83 }
84
85 endif;
86
87 if ( ! function_exists( 'happyforms_get_core_folder' ) ):
88
89 function happyforms_get_core_folder() {
90 return dirname( __FILE__ ) . '/core';
91 }
92
93 endif;
94
95 if ( ! function_exists( 'happyforms_get_integrations_folder' ) ):
96
97 function happyforms_get_integrations_folder() {
98 return dirname( __FILE__ ) . '/integrations';
99 }
100
101 endif;
102
103 /**
104 * Activate
105 */
106 require_once( happyforms_get_core_folder() . '/helpers/helper-activation.php' );
107
108 /**
109 * Core
110 */
111 require_once( happyforms_get_core_folder() . '/classes/class-happyforms-core.php' );
112
113 require_once( happyforms_get_include_folder() . '/classes/class-happyforms.php' );
114
115 /**
116 * Helpers
117 */
118 require_once( happyforms_get_include_folder() . '/helpers/helper-activation.php' );
119
120 /**
121 * Main handler
122 */
123 if ( ! function_exists( 'HappyForms' ) ):
124 /**
125 * Get the global HappyForms class.
126 *
127 * @return HappyForms
128 */
129 function HappyForms() {
130 global $happyforms;
131
132 if ( is_null( $happyforms ) ) {
133 $happyforms = new HappyForms();
134 }
135
136 return $happyforms;
137 }
138
139 endif;
140
141 /**
142 * Start general admin and frontend hooks.
143 */
144 add_action( 'plugins_loaded', array( HappyForms(), 'initialize_plugin' ) );
145
146 /**
147 * Start Customize screen specific hooks.
148 */
149 add_filter( 'customize_loaded_components', array( HappyForms(), 'initialize_customize_screen' ) );
150