PluginProbe
Survey Maker by AYS / 5.2.0.8
Survey Maker by AYS v5.2.0.8
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.0.8, at includes/class-survey-maker.php

543 lines 23.9 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
243 // Add menu item
244 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_menu' );
245 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_dashboard_menu', 10 );
246 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_surveys_submenu', 90 );
247 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_categories_submenu', 95 );
248 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_front_requests_submenu', 100 );
249 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_questions_categories_submenu', 100 );
250 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_submissions_submenu', 105 );
251 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_export_import_submenu', 110 );
252 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_general_settings_submenu', 115 );
253 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_dashboard_submenu', 125 );
254 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_featured_plugins_submenu', 135 );
255 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_features_plugins_submenu', 140 );
256 // $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_subscribe_email', 140 );
257 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_survey_features_plugins_submenu', 145 );
258
259 // Pro
260 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_popup_surveys_submenu', 100 );
261
262 $this->loader->add_action( 'wp_ajax_ays_survey_submission_report', $plugin_admin, 'ays_survey_submission_report' );
263 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_submission_report', $plugin_admin, 'ays_survey_submission_report' );
264
265 // Deactivate plugin AJAx action
266 $this->loader->add_action( 'wp_ajax_deactivate_plugin_option_sm', $plugin_admin, 'deactivate_plugin_option' );
267 $this->loader->add_action( 'wp_ajax_nopriv_deactivate_plugin_option_sm', $plugin_admin, 'deactivate_plugin_option' );
268
269 // Live preview
270 $this->loader->add_action( 'wp_ajax_ays_survey_maker_live_preview_content', $plugin_admin, 'ays_survey_maker_live_preview_content' );
271 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_maker_live_preview_content', $plugin_admin, 'ays_survey_maker_live_preview_content' );
272
273 // Live preview
274 $this->loader->add_action( 'wp_ajax_ays_survey_show_results', $plugin_admin, 'ays_survey_show_results' );
275 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_show_results', $plugin_admin, 'ays_survey_show_results' );
276
277 // Live preview
278 $this->loader->add_action( 'wp_ajax_ays_survey_add_survey_template', $plugin_admin, 'ays_survey_add_survey_template' );
279 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_add_survey_template', $plugin_admin, 'ays_survey_add_survey_template' );
280
281 $this->loader->add_action( 'wp_ajax_ays_survey_author_user_search', $plugin_admin, 'ays_survey_author_user_search' );
282 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_author_user_search', $plugin_admin, 'ays_survey_author_user_search' );
283
284 // Install and activate plugin AJAX actions
285 $this->loader->add_action('wp_ajax_ays_survey_install_plugin', $plugin_admin, 'ays_survey_install_plugin');
286 $this->loader->add_action('wp_ajax_ays_survey_activate_plugin', $plugin_admin, 'ays_survey_activate_plugin');
287
288 // Grab your gift
289 // $this->loader->add_action( 'wp_ajax_ays_survey_subscribe_email', $plugin_admin, 'ays_survey_subscribe_email' );
290 // $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_subscribe_email', $plugin_admin, 'ays_survey_subscribe_email' );
291
292 // Add Settings link to the plugin
293 $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php' );
294 $this->loader->add_filter( 'plugin_action_links_' . $plugin_basename, $plugin_admin, 'add_action_links' );
295
296 // CodeMirror Editor
297 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'codemirror_enqueue_scripts');
298
299 $this->loader->add_action( 'in_admin_footer', $plugin_admin, 'survey_maker_admin_footer', 1 );
300 // $this->loader->add_action( 'in_admin_footer', $plugin_admin, 'ays_survey_black_friady_popup_box', 10 );
301
302 $this->loader->add_action( 'elementor/widgets/widgets_registered', $plugin_admin, 'survey_maker_el_widgets_registered' );
303
304 // $this->loader->add_action( 'elementor/editor/before_enqueue_scripts', $plugin_admin, 'sm_enqueue_elementor_styles' );
305
306 // Add aditional links to the plugin
307 $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'add_survey_row_meta' , 10 , 2 );
308
309 // Sale Banner
310 // $this->loader->add_action( 'admin_notices', $plugin_admin, 'ays_survey_sale_baner', 15 );
311 $this->loader->add_action( 'ays_survey_sale_banner', $plugin_admin, 'ays_survey_sale_baner', 15 );
312
313 // Disable all notices from other plugins
314 $this->loader->add_action('current_screen', $plugin_admin, 'ays_survey_disable_all_notice_from_plugin', 200, 1);
315
316 }
317
318 /**
319 * Register all of the hooks related to the public-facing functionality
320 * of the plugin.
321 *
322 * @since 1.0.0
323 * @access private
324 */
325 private function define_public_hooks() {
326
327 $plugin_public = new Survey_Maker_Public( $this->get_plugin_name(), $this->get_version() );
328
329 // $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
330 // $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
331 $plugin_public_submissions_summary = new Survey_Maker_Submissions_Summary( $this->get_plugin_name(), $this->get_version() );
332 $plugin_public_extra_shortcodes = new Ays_Survey_Maker_Extra_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
333 $plugin_public_most_popular_shortcodes = new Ays_Survey_Maker_Most_Popular_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
334 $plugin_public_survey_links_by_category_shortcodes = new Ays_Survey_Maker_Links_By_Category_Shortcodes_Public( $this->get_plugin_name(), $this->get_version() );
335 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles_early' );
336
337 $this->loader->add_action( 'wp_footer', $plugin_public, 'ays_shortcodes_show_all');
338
339 // Public AJAX action
340 $this->loader->add_action( 'wp_ajax_ays_survey_ajax', $plugin_public, 'ays_survey_ajax' );
341 $this->loader->add_action( 'wp_ajax_nopriv_ays_survey_ajax', $plugin_public, 'ays_survey_ajax' );
342
343 }
344
345 /**
346 * Register all of the hooks related to the integrations functionality
347 * of the plugin.
348 *
349 * @since 1.0.0
350 * @access private
351 */
352 private function define_integrations_hooks() {
353
354 $plugin_integrations = new Survey_Maker_Integrations( $this->get_plugin_name(), $this->get_version() );
355
356 // Survey Maker Integrations / survey page
357 $this->loader->add_action( 'ays_sm_survey_page_integrations', $plugin_integrations, 'ays_survey_page_integrations_content' );
358
359 // Survey Maker Integrations / settings page
360 $this->loader->add_action( 'ays_sm_settings_page_integrations', $plugin_integrations, 'ays_settings_page_integrations_content' );
361
362 // ===== MailChimp integration ====
363 // MailChimp integration / survey page
364 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mailchimp_content', 1, 2 );
365
366 // MailChimp integration / settings page
367 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mailchimp_content', 1, 2 );
368
369 // ===== Campaign Monitor integration =====
370 // Campaign Monitor integration / survey page
371 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_camp_monitor_content', 1, 2 );
372
373 // Campaign Monitor integration / settings page
374 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_campaign_monitor_content', 1, 2 );
375
376 // ===== Zapier integration =====
377 // Zapier integration / survey page
378 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_zapier_content', 1, 2 );
379
380 // Zapier integration / settings page
381 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_zapier_content', 1, 2 );
382
383 // ===== Active Campaign integration =====
384 // Active Campaign integration / survey page
385 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_active_camp_content', 1, 2 );
386
387 // Active Campaign integration / settings page
388 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_active_camp_content', 1, 2 );
389
390 // ===== Slack integration =====
391 // Slack integration / survey page
392 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_slack_content', 1, 2 );
393
394 // Slack integration / settings page
395 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_slack_content', 1, 2 );
396
397 // ===== Google integration =====
398 // Google integration / survey page
399 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_google_sheet_content', 1, 2 );
400
401 // Google integration / settings page
402 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_google_content', 1, 2 );
403
404 // ===== GamiPress integration =====
405 // GamiPress integration / settings page
406 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_gamipress_content', 80, 2 );
407 // ===== GamiPress integration =====
408
409 // ===== SendGrid integration =====
410 // SendGrid integration / settings page
411 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_sendgrid_content', 70, 2 );
412 // ===== SendGrid integration =====
413
414 // ===== Madmimi integration =====
415 // Madmimi integration / settings page
416 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mad_mimi_content', 90, 2 );
417 // Madmimi integration / survey page
418 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mad_mimi_content', 1, 2 );
419 // ===== Madmimi integration =====
420
421 // ===== GetResponse integration =====
422 // GetResponse integration / settings page
423 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_get_response_content', 100, 2 );
424 // GetResponse integration / survey page
425 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_get_response_content', 1, 2 );
426 // ===== GetResponse integration =====
427
428 // ===== ConvertKit integration =====
429 // ConvertKit integration / settings page
430 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_convert_kit_content', 110, 2 );
431 // ConvertKit integration / survey page
432 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_convert_kit_content', 1, 2 );
433 // ===== ConvertKit integration =====
434
435 // ===== Brevo integration =====
436 // Brevo integration / settings page
437 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_sendinblue_content', 115, 2 );
438 // Brevo integration / survey page
439 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_sendinblue_content', 1, 2 );
440 // ===== Brevo integration =====
441
442 // // ===== PayPal integration ====
443 // PayPal integration / settings page
444 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_PayPal_content', 125, 2 );
445
446 // PayPal integration / survey page
447 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_PayPal_content', 125, 2 );
448 // // ===== PayPal integration ====
449
450 // // ===== Stripe integration ====
451 // Stripe integration / settings page
452 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_Stripe_content', 130, 2 );
453
454 // Stripe integration / survey page
455 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_Stripe_content', 130, 2 );
456 // // ===== Stripe integration ====
457
458 // // ===== reCAPTCHA integration ====
459 // reCAPTCHA integration / settings page
460 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_recaptcha_content', 135, 2 );
461
462 // reCAPTCHA integration / survey page
463 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_recaptcha_content', 135, 2 );
464 // // ===== reCAPTCHA integration ====
465
466 // // ===== Aweber integration ====
467 // Aweber integration / settings page
468 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_aweber_settings_page_content', 140, 2 );
469
470 // Aweber integration / survey page
471 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_aweber_content', 140, 2 );
472 // // ===== Aweber integration ====
473
474 // // ===== MailPoet integration ====
475 // MailPoet integration / settings page
476 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_mailpoet_content', 145, 2 );
477
478 // MailPoet integration / survey page
479 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_mailpoet_content', 145, 2 );
480 // // ===== MailPoet integration ====
481
482 // // ===== MyCred integration ====
483 // MyCred integration / settings page
484 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_mycred_settings_page_content', 150, 2 );
485 // // ===== MyCred integration ====
486
487 // // ===== Klaviyo integration ====
488 // Klaviyo integration / settings page
489 $this->loader->add_filter( 'ays_sm_settings_page_integrations_contents', $plugin_integrations, 'ays_settings_page_klaviyo_content', 155, 2 );
490
491 // Klaviyo integration / survey page
492 $this->loader->add_filter( 'ays_sm_survey_page_integrations_contents', $plugin_integrations, 'ays_survey_page_klaviyo_content', 155, 2 );
493 // // ===== Klaviyo integration ====
494
495
496 }
497
498 private function define_custom_post_type_hooks(){
499 $plugin_custom_post_type = new Survey_Maker_Custom_Post_Type( $this->get_plugin_name(), $this->get_version() );
500 }
501
502 /**
503 * Run the loader to execute all of the hooks with WordPress.
504 *
505 * @since 1.0.0
506 */
507 public function run() {
508 $this->loader->run();
509 }
510
511 /**
512 * The name of the plugin used to uniquely identify it within the context of
513 * WordPress and to define internationalization functionality.
514 *
515 * @since 1.0.0
516 * @return string The name of the plugin.
517 */
518 public function get_plugin_name() {
519 return $this->plugin_name;
520 }
521
522 /**
523 * The reference to the class that orchestrates the hooks with the plugin.
524 *
525 * @since 1.0.0
526 * @return Survey_Maker_Loader Orchestrates the hooks of the plugin.
527 */
528 public function get_loader() {
529 return $this->loader;
530 }
531
532 /**
533 * Retrieve the version number of the plugin.
534 *
535 * @since 1.0.0
536 * @return string The version number of the plugin.
537 */
538 public function get_version() {
539 return $this->version;
540 }
541
542 }
543