PluginProbe ʕ •ᴥ•ʔ
PiWeb Product Enquiry or product catalog for WooCommerce / 2.2.33.49
PiWeb Product Enquiry or product catalog for WooCommerce v2.2.33.49
2.2.34.43 2.2.34.42 2.2.34.41 2.2.34.40 2.2.34.39 trunk 2.2.22 2.2.26 2.2.33.16 2.2.33.17 2.2.33.19 2.2.33.20 2.2.33.21 2.2.33.22 2.2.33.23 2.2.33.24 2.2.33.26 2.2.33.27 2.2.33.29 2.2.33.30 2.2.33.31 2.2.33.32 2.2.33.33 2.2.33.34 2.2.33.36 2.2.33.37 2.2.33.39 2.2.33.40 2.2.33.41 2.2.33.42 2.2.33.43 2.2.33.44 2.2.33.46 2.2.33.47 2.2.33.49 2.2.34.0 2.2.34.1 2.2.34.10 2.2.34.11 2.2.34.12 2.2.34.13 2.2.34.14 2.2.34.16 2.2.34.17 2.2.34.19 2.2.34.2 2.2.34.20 2.2.34.21 2.2.34.22 2.2.34.23 2.2.34.24 2.2.34.26 2.2.34.27 2.2.34.29 2.2.34.3 2.2.34.30 2.2.34.31 2.2.34.32 2.2.34.33 2.2.34.34 2.2.34.36 2.2.34.37 2.2.34.4 2.2.34.6 2.2.34.7 2.2.34.9
enquiry-quotation-for-woocommerce / includes / class-pisol-enquiry-quotation-woocommerce.php
enquiry-quotation-for-woocommerce / includes Last commit date
img 1 year ago ARIAL.TTF 1 year ago background.png 1 year ago banner-sample.php 1 year ago class-php-captcha.php 1 year ago class-pisol-enquiry-quotation-woocommerce-activator.php 1 year ago class-pisol-enquiry-quotation-woocommerce-deactivator.php 1 year ago class-pisol-enquiry-quotation-woocommerce-i18n.php 1 year ago class-pisol-enquiry-quotation-woocommerce-loader.php 1 year ago class-pisol-enquiry-quotation-woocommerce.php 1 year ago conflict-fixer.php 1 year ago includes.php 1 year ago index.php 1 year ago pisol.class.form.php 1 year ago pisol.class.promotion.php 1 year ago review-icon.svg 1 year ago review.php 1 year ago
class-pisol-enquiry-quotation-woocommerce.php
220 lines
1 <?php
2
3 /**
4 * The file that defines the core plugin class
5 *
6 * A class definition that includes attributes and functions used across both the
7 * public-facing side of the site and the admin area.
8 *
9 * @link piwebsolution.com
10 * @since 1.0.0
11 *
12 * @package Pisol_Enquiry_Quotation_Woocommerce
13 * @subpackage Pisol_Enquiry_Quotation_Woocommerce/includes
14 */
15
16 /**
17 * The core plugin class.
18 *
19 * This is used to define internationalization, admin-specific hooks, and
20 * public-facing site hooks.
21 *
22 * Also maintains the unique identifier of this plugin as well as the current
23 * version of the plugin.
24 *
25 * @since 1.0.0
26 * @package Pisol_Enquiry_Quotation_Woocommerce
27 * @subpackage Pisol_Enquiry_Quotation_Woocommerce/includes
28 * @author PI Websolution <sales@piwebsolution.com>
29 */
30 class Pisol_Enquiry_Quotation_Woocommerce {
31
32 /**
33 * The loader that's responsible for maintaining and registering all hooks that power
34 * the plugin.
35 *
36 * @since 1.0.0
37 * @access protected
38 * @var Pisol_Enquiry_Quotation_Woocommerce_Loader $loader Maintains and registers all hooks for the plugin.
39 */
40 protected $loader;
41
42 /**
43 * The unique identifier of this plugin.
44 *
45 * @since 1.0.0
46 * @access protected
47 * @var string $plugin_name The string used to uniquely identify this plugin.
48 */
49 protected $plugin_name;
50
51 /**
52 * The current version of the plugin.
53 *
54 * @since 1.0.0
55 * @access protected
56 * @var string $version The current version of the plugin.
57 */
58 protected $version;
59
60 /**
61 * Define the core functionality of the plugin.
62 *
63 * Set the plugin name and the plugin version that can be used throughout the plugin.
64 * Load the dependencies, define the locale, and set the hooks for the admin area and
65 * the public-facing side of the site.
66 *
67 * @since 1.0.0
68 */
69 public function __construct() {
70 if ( defined( 'PISOL_ENQUIRY_QUOTATION_WOOCOMMERCE_VERSION' ) ) {
71 $this->version = PISOL_ENQUIRY_QUOTATION_WOOCOMMERCE_VERSION;
72 } else {
73 $this->version = '1.0.0';
74 }
75 $this->plugin_name = 'pisol-enquiry-quotation-woocommerce';
76
77 $this->load_dependencies();
78 $this->set_locale();
79 $this->define_admin_hooks();
80 $this->define_public_hooks();
81
82 }
83
84 /**
85 * Load the required dependencies for this plugin.
86 *
87 * Include the following files that make up the plugin:
88 *
89 * - Pisol_Enquiry_Quotation_Woocommerce_Loader. Orchestrates the hooks of the plugin.
90 * - Pisol_Enquiry_Quotation_Woocommerce_i18n. Defines internationalization functionality.
91 * - Pisol_Enquiry_Quotation_Woocommerce_Admin. Defines all hooks for the admin area.
92 * - Pisol_Enquiry_Quotation_Woocommerce_Public. Defines all hooks for the public side of the site.
93 *
94 * Create an instance of the loader which will be used to register the hooks
95 * with WordPress.
96 *
97 * @since 1.0.0
98 * @access private
99 */
100 private function load_dependencies() {
101
102 /**
103 * The class responsible for orchestrating the actions and filters of the
104 * core plugin.
105 */
106 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-pisol-enquiry-quotation-woocommerce-loader.php';
107
108 /**
109 * The class responsible for defining internationalization functionality
110 * of the plugin.
111 */
112 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-pisol-enquiry-quotation-woocommerce-i18n.php';
113
114 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/includes.php';
115 /**
116 * The class responsible for defining all actions that occur in the admin area.
117 */
118 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-pisol-enquiry-quotation-woocommerce-admin.php';
119
120 /**
121 * The class responsible for defining all actions that occur in the public-facing
122 * side of the site.
123 */
124 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-pisol-enquiry-quotation-woocommerce-public.php';
125
126 $this->loader = new Pisol_Enquiry_Quotation_Woocommerce_Loader();
127
128 }
129
130 /**
131 * Define the locale for this plugin for internationalization.
132 *
133 * Uses the Pisol_Enquiry_Quotation_Woocommerce_i18n class in order to set the domain and to register the hook
134 * with WordPress.
135 *
136 * @since 1.0.0
137 * @access private
138 */
139 private function set_locale() {
140
141 $plugin_i18n = new Pisol_Enquiry_Quotation_Woocommerce_i18n();
142
143 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
144
145 }
146
147 /**
148 * Register all of the hooks related to the admin area functionality
149 * of the plugin.
150 *
151 * @since 1.0.0
152 * @access private
153 */
154 private function define_admin_hooks() {
155
156 $plugin_admin = new Pisol_Enquiry_Quotation_Woocommerce_Admin( $this->get_plugin_name(), $this->get_version() );
157
158 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
159 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
160
161 }
162
163 /**
164 * Register all of the hooks related to the public-facing functionality
165 * of the plugin.
166 *
167 * @since 1.0.0
168 * @access private
169 */
170 private function define_public_hooks() {
171
172 $plugin_public = new Pisol_Enquiry_Quotation_Woocommerce_Public( $this->get_plugin_name(), $this->get_version() );
173
174 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
175 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
176
177 }
178
179 /**
180 * Run the loader to execute all of the hooks with WordPress.
181 *
182 * @since 1.0.0
183 */
184 public function run() {
185 $this->loader->run();
186 }
187
188 /**
189 * The name of the plugin used to uniquely identify it within the context of
190 * WordPress and to define internationalization functionality.
191 *
192 * @since 1.0.0
193 * @return string The name of the plugin.
194 */
195 public function get_plugin_name() {
196 return $this->plugin_name;
197 }
198
199 /**
200 * The reference to the class that orchestrates the hooks with the plugin.
201 *
202 * @since 1.0.0
203 * @return Pisol_Enquiry_Quotation_Woocommerce_Loader Orchestrates the hooks of the plugin.
204 */
205 public function get_loader() {
206 return $this->loader;
207 }
208
209 /**
210 * Retrieve the version number of the plugin.
211 *
212 * @since 1.0.0
213 * @return string The version number of the plugin.
214 */
215 public function get_version() {
216 return $this->version;
217 }
218
219 }
220