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

133 lines 2.6 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.12.4
9 * Author URI: https://happyforms.io
10 * Upgrade URI: https://happyforms.io/upgrade
11 */
12
13 /**
14 * The current version of the plugin.
15 */
16 define( 'HAPPYFORMS_VERSION', '1.12.4' );
17
18 if ( ! function_exists( 'happyforms_plugin_file' ) ):
19 /**
20 * Get the absolute path to the plugin file.
21 *
22 * @return string Absolute path to the plugin file.
23 */
24 function happyforms_plugin_file() {
25 return __FILE__;
26 }
27
28 endif;
29
30 if ( ! function_exists( 'happyforms_plugin_name' ) ):
31 /**
32 * Get the plugin basename.
33 *
34 * @return string The plugin basename.
35 */
36 function happyforms_plugin_name() {
37 return plugin_basename( __FILE__ );
38 }
39
40 endif;
41
42 if ( ! function_exists( 'happyforms_get_plugin_url' ) ):
43 /**
44 * Get the plugin url.
45 *
46 * @return string The url of the plugin.
47 */
48 function happyforms_get_plugin_url() {
49 return plugin_dir_url( __FILE__ );
50 }
51
52 endif;
53
54 if ( ! function_exists( 'happyforms_get_plugin_path' ) ):
55 /**
56 * Get the absolute path of the plugin folder.
57 *
58 * @return string The absolute path of the plugin folder.
59 */
60 function happyforms_get_plugin_path() {
61 return plugin_dir_path( __FILE__ );
62 }
63
64 endif;
65
66 if ( ! function_exists( 'happyforms_get_include_folder' ) ):
67 /**
68 * Get the path of the PHP include folder.
69 *
70 * @return string The path of the PHP include folder.
71 */
72 function happyforms_get_include_folder() {
73 return dirname( __FILE__ ) . '/inc';
74 }
75
76 endif;
77
78 if ( ! function_exists( 'happyforms_get_core_folder' ) ):
79
80 function happyforms_get_core_folder() {
81 return dirname( __FILE__ ) . '/core';
82 }
83
84 endif;
85
86 /**
87 * Activate
88 */
89 require_once( happyforms_get_core_folder() . '/helpers/helper-activation.php' );
90
91 /**
92 * Core
93 */
94 require_once( happyforms_get_core_folder() . '/classes/class-happyforms-core.php' );
95
96 require_once( happyforms_get_include_folder() . '/classes/class-happyforms.php' );
97
98 /**
99 * Helpers
100 */
101 require_once( happyforms_get_include_folder() . '/helpers/helper-activation.php' );
102
103 /**
104 * Main handler
105 */
106 if ( ! function_exists( 'HappyForms' ) ):
107 /**
108 * Get the global HappyForms class.
109 *
110 * @return HappyForms
111 */
112 function HappyForms() {
113 global $happyforms;
114
115 if ( is_null( $happyforms ) ) {
116 $happyforms = new HappyForms();
117 }
118
119 return $happyforms;
120 }
121
122 endif;
123
124 /**
125 * Start general admin and frontend hooks.
126 */
127 add_action( 'plugins_loaded', array( HappyForms(), 'initialize_plugin' ) );
128
129 /**
130 * Start Customize screen specific hooks.
131 */
132 add_filter( 'customize_loaded_components', array( HappyForms(), 'initialize_customize_screen' ) );
133