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

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