PluginProbe
Survey Maker by AYS / 5.2.2.0
Survey Maker by AYS v5.2.2.0
5.2.4.1 5.2.4.0 5.2.3.9 5.2.3.8 5.2.3.7 5.2.3.6 5.2.3.5 5.2.3.4 5.2.3.3 5.2.3.2 5.2.3.1 5.2.3.0 5.2.2.9 5.2.2.8 5.2.2.7 5.2.2.6 5.2.2.5 5.2.2.4 5.2.2.3 5.2.2.2 5.2.2.1 5.2.2.0 5.2.1.9 5.2.1.8 5.2.0.8 All 154 releases
survey-maker / includes / class-survey-maker.php

class-survey-maker.php in Survey Maker by AYS 5.2.2.0, at includes/class-survey-maker.php

544 lines 24.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 https://ays-pro.com/
10 * @since 1.0.0
11 *
12 * @package Survey_Maker
13 * @subpackage Survey_Maker/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 Survey_Maker
27 * @subpackage Survey_Maker/includes
28 * @author Survey Maker team <[email protected]>
29 */
30 class Survey_Maker {
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 Survey_Maker_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( 'SURVEY_MAKER_VERSION' ) ) {
71 $this->version = SURVEY_MAKER_VERSION;
72 } else {
73 $this->version = '1.0.0';
74 }
75 $this->plugin_name = 'survey-maker';
76
77 $this->load_dependencies();
78 $this->set_locale();
79 $this->define_admin_hooks();
80 $this->define_public_hooks();
81 $this->define_integrations_hooks();
82 $this->define_custom_post_type_hooks();
83
84 }
85
86 /**
87 * Load the required dependencies for this plugin.
88 *
89 * Include the following files that make up the plugin:
90 *
91 * - Survey_Maker_Loader. Orchestrates the hooks of the plugin.
92 * - Survey_Maker_i18n. Defines internationalization functionality.
93 * - Survey_Maker_Admin. Defines all hooks for the admin area.
94 * - Survey_Maker_Public. Defines all hooks for the public side of the site.
95 *
96 * Create an instance of the loader which will be used to register the hooks
97 * with WordPress.
98 *
99 * @since 1.0.0
100 * @access private
101 */
102 private function load_dependencies() {
103
104 if ( ! class_exists( 'WP_List_Table' ) ) {
105 require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
106 }
107
108 /**
109 * The class responsible for orchestrating the actions and filters of the
110 * core plugin.
111 */
112 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-survey-maker-loader.php';
113
114 /**
115 * The class responsible for defining internationalization functionality
116 * of the plugin.
117 */
118 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-survey-maker-i18n.php';
119
120 /**
121 * The class responsible for defining all actions that occur in the admin area.
122 */
123 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-survey-maker-admin.php';
124
125 // /**
126 // * The class responsible for showing Poll Maker Welcome page.
127 // */
128 // require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-survey-maker-ays-welcome.php';
129 /**
130 * The class responsible for showing Quiz Maker Feedback popup.
131 */
132 require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-survey-maker-feedback.php';
133
134 /**
135 * The class responsible for defining all actions that occur in the public-facing
136 * side of the site.
137 */
138 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-survey-maker-public.php';
139
140 /**
141 * The class responsible for extra shortcodes on the front page
142 * side of the site.
143 */
144 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/class-survey-maker-extra-shortcode.php';
145
146 /*
147 * The class is responsible for showing surveys in wordpress default WP_LIST_TABLE style
148 */
149 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-surveys-list-table.php';
150
151 /*
152 * The class is responsible for showing popup surveys in wordpress default WP_LIST_TABLE style
153 */
154 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-popup-survey-list-table.php';
155
156 /*
157 * The class is responsible for showing survey categories in wordpress default WP_LIST_TABLE style
158 */
159 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-survey-categories-list-table.php';
160
161 /*
162 * The class is responsible for showing survey submissions in wordpress default WP_LIST_TABLE style
163 */
164 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-submissions-list-table.php';
165
166 /*
167 * The class is responsible for showing each survey submissions in wordpress default WP_LIST_TABLE style
168 */
169 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-each-submission-list-table.php';
170
171 /*
172 * The class is responsible for showing front requests in wordpress default WP_LIST_TABLE style
173 */
174 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-survey-maker-front-requests-list-table.php';
175
176 /*
177 * The class is responsible for showing survey submissions in wordpress default WP_LIST_TABLE style
178 */
179 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/settings/survey-maker-settings-actions.php';
180
181 /**
182 * The class responsible for defining all functions for getting all survey data
183 */
184 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-survey-maker-data.php';
185
186 /**
187 * The class responsible for defining all functions for getting all custom post type functions
188 */
189 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-survey-maker-custom-post-type.php';
190
191 /**
192 * The class responsible for defining all functions for getting all survey integrations
193 */
194 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-survey-maker-integrations.php';
195
196
197 /**
198 * The class responsible for defining all functions for generating General Settings shorcodes content
199 */
200 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/class-survey-maker-submissions-summary-shortcode.php';
201
202 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/class-survey-maker-most-popular-shortcode.php';
203
204 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/class-survey-maker-survey-links-by-category.php';
205
206
207 $this->loader = new Survey_Maker_Loader();
208
209 }
210
211 /**
212 * Define the locale for this plugin for internationalization.
213 *
214 * Uses the Survey_Maker_i18n class in order to set the domain and to register the hook
215 * with WordPress.
216 *
217 * @since 1.0.0
218 * @access private
219 */
220 private function set_locale() {
221
222 $plugin_i18n = new Survey_Maker_i18n();
223
224 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
225
226 }
227
228 /**
229 * Register all of the hooks related to the admin area functionality
230 * of the plugin.
231 *
232 * @since 1.0.0
233 * @access private
234 */
235 private function define_admin_hooks() {
236
237 $plugin_admin = new Survey_Maker_Admin( $this->get_plugin_name(), $this->get_version() );
238
239 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
240 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
241 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'disable_scripts', 100 );
242 $this->loader->add_filter( 'admin_body_class', $plugin_admin, 'ays_survey_add_body_class' );
243
244 // Add menu item
245 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_menu' );
246 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_dashboard_menu', 10 );
247 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_surveys_submenu', 90 );
248 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_categories_submenu', 95 );
249 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_front_requests_submenu', 100 );
250 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_questions_categories_submenu', 100 );
251 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_submissions_submenu', 105 );
252 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_export_import_submenu', 110 );
253 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_general_settings_submenu', 115 );
254 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_dashboard_submenu', 125 );
255 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_featured_plugins_submenu', 135 );
256 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_features_plugins_submenu', 140 );
257 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_subscribe_email', 140 );
258 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_features_plugins_submenu', 145 );
259
260 // Pro
261 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_popup_surveys_submenu', 100 );
262
263 $this->loader->add_action( 'wp_ajax_ays_survey_submission_report', $plugin_admin, 'ays_survey_submission_report' );
264 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_submission_report', $plugin_admin, 'ays_survey_submission_report' );
265
266 // Deactivate plugin AJAx action
267 $this->loader->add_action( 'wp_ajax_deactivate_plugin_option_sm', $plugin_admin, 'deactivate_plugin_option' );
268 $this->loader->add_action( 'wp_ajax_nopriv_deactivate_plugin_option_sm', $plugin_admin, 'deactivate_plugin_option' );
269
270 // Live preview
271 $this->loader->add_action( 'wp_ajax_ays_survey_maker_live_preview_content', $plugin_admin, 'ays_survey_maker_live_preview_content' );
272 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_maker_live_preview_content', $plugin_admin, 'ays_survey_maker_live_preview_content' );
273
274 // Live preview
275 $this->loader->add_action( 'wp_ajax_ays_survey_show_results', $plugin_admin, 'ays_survey_show_results' );
276 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_show_results', $plugin_admin, 'ays_survey_show_results' );
277
278 // Live preview
279 $this->loader->add_action( 'wp_ajax_ays_survey_add_survey_template', $plugin_admin, 'ays_survey_add_survey_template' );
280 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_add_survey_template', $plugin_admin, 'ays_survey_add_survey_template' );
281
282 $this->loader->add_action( 'wp_ajax_ays_survey_author_user_search', $plugin_admin, 'ays_survey_author_user_search' );
283 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_author_user_search', $plugin_admin, 'ays_survey_author_user_search' );
284
285 // Install and activate plugin AJAX actions
286 $this->loader->add_action('wp_ajax_ays_survey_install_plugin', $plugin_admin, 'ays_survey_install_plugin');
287 $this->loader->add_action('wp_ajax_ays_survey_activate_plugin', $plugin_admin, 'ays_survey_activate_plugin');
288
289 // Grab your gift
290 // $this->loader->add_action( 'wp_ajax_ays_survey_subscribe_email', $plugin_admin, 'ays_survey_subscribe_email' );
291 // $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_subscribe_email', $plugin_admin, 'ays_survey_subscribe_email' );
292
293 // Add Settings link to the plugin
294 $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php' );
295 $this->loader->add_filter( 'plugin_action_links_' . $plugin_basename, $plugin_admin, 'add_action_links' );
296
297 // CodeMirror Editor
298 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'codemirror_enqueue_scripts');
299
300 $this->loader->add_action( 'in_admin_footer', $plugin_admin, 'survey_maker_admin_footer', 1 );
301 // $this->loader->add_action( 'in_admin_footer', $plugin_admin, 'ays_survey_black_friady_popup_box', 10 );
302
303 $this->loader->add_action( 'elementor/widgets/widgets_registered', $plugin_admin, 'survey_maker_el_widgets_registered' );
304
305 // $this->loader->add_action( 'elementor/editor/before_enqueue_scripts', $plugin_admin, 'sm_enqueue_elementor_styles' );
306
307 // Add aditional links to the plugin
308 $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'add_survey_row_meta' , 10 , 2 );
309
310 // Sale Banner
311 // $this->loader->add_action( 'admin_notices', $plugin_admin, 'ays_survey_sale_baner', 15 );
312 $this->loader->add_action( 'ays_survey_sale_banner', $plugin_admin, 'ays_survey_sale_baner', 15 );
313
314 // Disable all notices from other plugins
315 $this->loader->add_action('current_screen', $plugin_admin, 'ays_survey_disable_all_notice_from_plugin', 200, 1);
316
317 }
318
319 /**
320 * Register all of the hooks related to the public-facing functionality
321 * of the plugin.
322 *
323 * @since 1.0.0
324 * @access private
325 */
326 private function define_public_hooks() {
327
328 $plugin_public = new Survey_Maker_Public( $this->get_plugin_name(), $this->get_version() );
329
330 // $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
331 // $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
332 $plugin_public_submissions_summary = new Survey_Maker_Submissions_Summary( $this->get_plugin_name(), $this->get_version() );
333 $plugin_public_extra_shortcodes = new Ays_Survey_Maker_Extra_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
334 $plugin_public_most_popular_shortcodes = new Ays_Survey_Maker_Most_Popular_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
335 $plugin_public_survey_links_by_category_shortcodes = new Ays_Survey_Maker_Links_By_Category_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
336 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles_early' );
337
338 $this->loader->add_action( 'wp_footer', $plugin_public, 'ays_shortcodes_show_all');
339
340 // Public AJAX action
341 $this->loader->add_action( 'wp_ajax_ays_survey_ajax', $plugin_public, 'ays_survey_ajax' );
342 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_ajax', $plugin_public, 'ays_survey_ajax' );
343
344 }
345
346 /**
347 * Register all of the hooks related to the integrations functionality
348 * of the plugin.
349 *
350 * @since 1.0.0
351 * @access private
352 */
353 private function define_integrations_hooks() {
354
355 $plugin_integrations = new Survey_Maker_Integrations( $this->get_plugin_name(), $this->get_version() );
356
357 // Survey Maker Integrations / survey page
358 $this->loader->add_action( 'ays_sm_survey_page_integrations', $plugin_integrations, 'ays_survey_page_integrations_content' );
359
360 // Survey Maker Integrations / settings page
361 $this->loader->add_action( 'ays_sm_settings_page_integrations', $plugin_integrations, 'ays_settings_page_integrations_content' );
362
363 // ===== MailChimp integration ====
364 // MailChimp integration / survey page
365 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mailchimp_content', 1, 2 );
366
367 // MailChimp integration / settings page
368 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mailchimp_content', 1, 2 );
369
370 // ===== Campaign Monitor integration =====
371 // Campaign Monitor integration / survey page
372 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_camp_monitor_content', 1, 2 );
373
374 // Campaign Monitor integration / settings page
375 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_campaign_monitor_content', 1, 2 );
376
377 // ===== Zapier integration =====
378 // Zapier integration / survey page
379 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_zapier_content', 1, 2 );
380
381 // Zapier integration / settings page
382 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_zapier_content', 1, 2 );
383
384 // ===== Active Campaign integration =====
385 // Active Campaign integration / survey page
386 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_active_camp_content', 1, 2 );
387
388 // Active Campaign integration / settings page
389 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_active_camp_content', 1, 2 );
390
391 // ===== Slack integration =====
392 // Slack integration / survey page
393 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_slack_content', 1, 2 );
394
395 // Slack integration / settings page
396 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_slack_content', 1, 2 );
397
398 // ===== Google integration =====
399 // Google integration / survey page
400 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_google_sheet_content', 1, 2 );
401
402 // Google integration / settings page
403 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_google_content', 1, 2 );
404
405 // ===== GamiPress integration =====
406 // GamiPress integration / settings page
407 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_gamipress_content', 80, 2 );
408 // ===== GamiPress integration =====
409
410 // ===== SendGrid integration =====
411 // SendGrid integration / settings page
412 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_sendgrid_content', 70, 2 );
413 // ===== SendGrid integration =====
414
415 // ===== Madmimi integration =====
416 // Madmimi integration / settings page
417 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mad_mimi_content', 90, 2 );
418 // Madmimi integration / survey page
419 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mad_mimi_content', 1, 2 );
420 // ===== Madmimi integration =====
421
422 // ===== GetResponse integration =====
423 // GetResponse integration / settings page
424 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_get_response_content', 100, 2 );
425 // GetResponse integration / survey page
426 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_get_response_content', 1, 2 );
427 // ===== GetResponse integration =====
428
429 // ===== ConvertKit integration =====
430 // ConvertKit integration / settings page
431 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_convert_kit_content', 110, 2 );
432 // ConvertKit integration / survey page
433 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_convert_kit_content', 1, 2 );
434 // ===== ConvertKit integration =====
435
436 // ===== Brevo integration =====
437 // Brevo integration / settings page
438 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_sendinblue_content', 115, 2 );
439 // Brevo integration / survey page
440 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_sendinblue_content', 1, 2 );
441 // ===== Brevo integration =====
442
443 // // ===== PayPal integration ====
444 // PayPal integration / settings page
445 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_PayPal_content', 125, 2 );
446
447 // PayPal integration / survey page
448 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_PayPal_content', 125, 2 );
449 // // ===== PayPal integration ====
450
451 // // ===== Stripe integration ====
452 // Stripe integration / settings page
453 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_Stripe_content', 130, 2 );
454
455 // Stripe integration / survey page
456 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_Stripe_content', 130, 2 );
457 // // ===== Stripe integration ====
458
459 // // ===== reCAPTCHA integration ====
460 // reCAPTCHA integration / settings page
461 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_recaptcha_content', 135, 2 );
462
463 // reCAPTCHA integration / survey page
464 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_recaptcha_content', 135, 2 );
465 // // ===== reCAPTCHA integration ====
466
467 // // ===== Aweber integration ====
468 // Aweber integration / settings page
469 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_aweber_settings_page_content', 140, 2 );
470
471 // Aweber integration / survey page
472 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_aweber_content', 140, 2 );
473 // // ===== Aweber integration ====
474
475 // // ===== MailPoet integration ====
476 // MailPoet integration / settings page
477 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mailpoet_content', 145, 2 );
478
479 // MailPoet integration / survey page
480 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mailpoet_content', 145, 2 );
481 // // ===== MailPoet integration ====
482
483 // // ===== MyCred integration ====
484 // MyCred integration / settings page
485 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_mycred_settings_page_content', 150, 2 );
486 // // ===== MyCred integration ====
487
488 // // ===== Klaviyo integration ====
489 // Klaviyo integration / settings page
490 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_klaviyo_content', 155, 2 );
491
492 // Klaviyo integration / survey page
493 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_klaviyo_content', 155, 2 );
494 // // ===== Klaviyo integration ====
495
496
497 }
498
499 private function define_custom_post_type_hooks(){
500 $plugin_custom_post_type = new Survey_Maker_Custom_Post_Type( $this->get_plugin_name(), $this->get_version() );
501 }
502
503 /**
504 * Run the loader to execute all of the hooks with WordPress.
505 *
506 * @since 1.0.0
507 */
508 public function run() {
509 $this->loader->run();
510 }
511
512 /**
513 * The name of the plugin used to uniquely identify it within the context of
514 * WordPress and to define internationalization functionality.
515 *
516 * @since 1.0.0
517 * @return string The name of the plugin.
518 */
519 public function get_plugin_name() {
520 return $this->plugin_name;
521 }
522
523 /**
524 * The reference to the class that orchestrates the hooks with the plugin.
525 *
526 * @since 1.0.0
527 * @return Survey_Maker_Loader Orchestrates the hooks of the plugin.
528 */
529 public function get_loader() {
530 return $this->loader;
531 }
532
533 /**
534 * Retrieve the version number of the plugin.
535 *
536 * @since 1.0.0
537 * @return string The version number of the plugin.
538 */
539 public function get_version() {
540 return $this->version;
541 }
542
543 }
544