PluginProbe
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls / 6.5.1
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls v6.5.1
6.5.1 6.5.0 6.4.9 6.4.8 6.4.7 6.4.6 6.4.5 6.4.4 6.4.3 6.4.2 6.4.1 6.4.0 6.3.9 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 5.6.0 5.6.1 5.6.2 5.6.3 5.6.4 5.6.5 All 154 releases
← All changes | includes/lists/class-poll-maker-polls-list-table.php +172 -84 5.6.0 → 6.5.1 View file →
@@ -9,10 +9,10 @@
9 9 public function __construct( $plugin_name ) {
10 10 $this->plugin_name = $plugin_name;
11 11 $this->title_length = Poll_Maker_Ays_Admin::get_listtables_title_length('polls');
12 12 parent::__construct(array(
13 - 'singular' => __('Poll', "poll-maker"), //singular name of the listed records
14 - 'plural' => __('Polls', "poll-maker"), //plural name of the listed records
13 + 'singular' =>esc_html__('Poll', "poll-maker"), //singular name of the listed records
14 + 'plural' =>esc_html__('Polls', "poll-maker"), //plural name of the listed records
15 15 'ajax' => false, //does this table support ajax?
16 16 ));
17 17 add_action('admin_notices', array($this, 'poll_notices'));
18 18 add_filter( 'default_hidden_columns', array( $this, 'get_hidden_columns'), 10, 2 );
@@ -104,9 +104,9 @@
104 104
105 105 ?>
106 106 <div id="poll-filter-div-<?php echo esc_attr( $which ); ?>" class="alignleft actions bulkactions">
107 107 <select name="filterby-<?php echo esc_attr($which); ?>" id="bulk-action-selector-<?php echo esc_attr($which); ?>">
108 - <option value=""><?php echo __('Select Category', "poll-maker")?></option>
108 + <option value=""><?php echo esc_html__('Select Category', "poll-maker")?></option>
109 109 <?php
110 110 foreach($categories_select as $key => $cat_title){
111 111 echo "<option ".$cat_title['selected']." value='".$cat_title['id']."'>".$cat_title['title']."</option>";
112 112 }
@@ -112,9 +112,9 @@
112 112 }
113 113 ?>
114 114 </select>
115 115 <select name="filterbyauthor-<?php echo esc_attr( $which ); ?>" id="bulk-action-selector-<?php echo esc_attr( $which ); ?>">
116 - <option value=""><?php echo __('Select Author', "poll-maker")?></option>
116 + <option value=""><?php echo esc_html__('Select Author', "poll-maker")?></option>
117 117 <?php
118 118 foreach ($authors as $author_key => $author) {
119 119 $user_selected = ( isset($author_id_select) && $author_key == $author_id_select ) ? "selected" : "";
120 120
@@ -122,9 +122,9 @@
122 122 }
123 123 ?>
124 124 </select>
125 125 <select name="filterbytype-<?php echo esc_attr( $which ); ?>" id="bulk-action-selector-<?php echo esc_attr( $which ); ?>">
126 - <option value=""><?php echo __('Select Type', "poll-maker")?></option>
126 + <option value=""><?php echo esc_html__('Select Type', "poll-maker"); ?></option>
127 127 <?php
128 128 foreach( $types as $type_key => $type){
129 129 $user_selected_type = ( isset($type_select) && $type == $type_select ) ? "selected" : "";
130 130 echo "<option ".$user_selected_type." value='".$type."'>".$type."</option>";
@@ -130,11 +130,11 @@
130 130 echo "<option ".$user_selected_type." value='".$type."'>".$type."</option>";
131 131 }
132 132 ?>
133 133 </select>
134 - <input type="button" id="doaction-<?php echo esc_attr($which); ?>" class="ays-poll-question-tab-all-filter-button-<?php echo esc_attr($which); ?> button" value="Filter">
134 + <input type="button" id="doaction-<?php echo esc_attr($which); ?>" class="ays-poll-question-tab-all-filter-button-<?php echo esc_attr($which); ?> button" value="<?php echo esc_attr__('Filter', "poll-maker"); ?>">
135 135 </div>
136 - <a href="?page=<?php echo esc_attr( $_REQUEST['page'] ); ?>" class="button actions_style"><?php echo __( "Clear filters", "poll-maker" ); ?></a>
136 + <a href="?page=<?php echo esc_attr( $_REQUEST['page'] ); ?>" class="button actions_style"><?php echo esc_html__( "Clear filters", "poll-maker" ); ?></a>
137 137 <?php
138 138 }
139 139
140 140 protected function get_views() {
@@ -170,11 +170,11 @@
170 170 $publish_url = esc_url( add_query_arg('fstatus', 1, $status_links_url) );
171 171 $unpublish_url = esc_url( add_query_arg('fstatus', 0, $status_links_url) );
172 172
173 173 $status_links = array(
174 - "all" => "<a ".$selected_all." href='?page=".esc_attr( $_REQUEST['page'] )."'>". __( 'All', "poll-maker" )." (".$all_count.")</a>",
175 - "published" => "<a ".$selected_1." href='". $publish_url ."'>". __( 'Published', "poll-maker" )." (".$published_count.")</a>",
176 - "unpublished" => "<a ".$selected_0." href='". $unpublish_url ."'>". __( 'Unpublished', "poll-maker" )." (".$unpublished_count.")</a>"
174 + "all" => "<a ".$selected_all." href='?page=".esc_attr( $_REQUEST['page'] )."'>".esc_html__( 'All', "poll-maker" )." (".$all_count.")</a>",
175 + "published" => "<a ".$selected_1." href='". $publish_url ."'>".esc_html__( 'Published', "poll-maker" )." (".$published_count.")</a>",
176 + "unpublished" => "<a ".$selected_0." href='". $unpublish_url ."'>".esc_html__( 'Unpublished', "poll-maker" )." (".$unpublished_count.")</a>"
177 177 );
178 178 return $status_links;
179 179 }
180 180
@@ -225,27 +225,35 @@
225 225 global $wpdb;
226 226 $poll_table = esc_sql($wpdb->prefix . 'ayspoll_polls');
227 227 $answer_table = esc_sql($wpdb->prefix . 'ayspoll_answers');
228 228 if (isset($data["poll_action"]) && wp_verify_nonce($data["poll_action"], 'poll_action')) {
229 +
230 + $poll_allowed_html = Poll_Maker_Data::ays_poll_custom_allowed_html();
231 +
229 232 $title = isset($data['ays-poll-title']) && $data['ays-poll-title'] != "" ? sanitize_text_field($data['ays-poll-title']) : "Default title";
230 233 $show_title = isset($data['show_title']) && $data['show_title'] == 'show' ? 1 : 0;
231 234 $limit_users = isset($data['apm_limit_users']) && $data['apm_limit_users'] == 'on' ? 1 : 0;
232 235 $limit_users_method = isset($data['ays_limit_method']) ? sanitize_text_field($data['ays_limit_method']) : 'ip';
233 - $limit_users_msg = isset($data['ays_limitation_message']) ? wpautop($data['ays_limitation_message']) : "";
236 + $limit_users_msg = isset($data['ays_limitation_message']) ? wp_kses( $data['ays_limitation_message'], $poll_allowed_html ) : "";
234 237 $limit_users_url = isset($data['ays_redirect_url']) ? wp_http_validate_url($data['ays_redirect_url']) : "";
235 238 $limit_users_delay = isset($data['ays_redirection_delay']) ? absint($data['ays_redirection_delay']) : 0;
236 239 $limit_users_role_enable = isset($data['ays_enable_restriction_pass']) && $data['ays_enable_restriction_pass'] == 'on' ? 1 : 0;
237 240 $limit_users_role = (isset($data["ays_users_roles"]) && !empty($data["ays_users_roles"])) ? $data["ays_users_roles"] : array();
238 - $limit_users_role_msg = isset($data['restriction_pass_message']) ? wpautop($data['restriction_pass_message']) : "";
241 + $limit_users_role_msg = isset($data['restriction_pass_message']) ? wp_kses( $data['restriction_pass_message'], $poll_allowed_html ) : "";
242 +
239 243 $limit_users_logged_enable = (isset($data['ays_enable_logged_users']) && $data['ays_enable_logged_users'] == 'on') || $limit_users_role_enable ? 1 : 0;
240 - $limit_users_logged_msg = isset($data['ays_enable_logged_users_message']) ? wpautop($data['ays_enable_logged_users_message']) : "";
244 + $limit_users_logged_msg = isset($data['ays_enable_logged_users_message']) ? wp_kses( $data['ays_enable_logged_users_message'], $poll_allowed_html ) : "";
245 +
241 246 $hide_results = isset($data['ays-poll-hide-results']) && 'hide' == $data['ays-poll-hide-results'] ? 1 : 0;
242 247 $hide_result_message = isset($data['ays_poll_result_message']) && 'hide' == $data['ays_poll_result_message'] ? 1 : 0;
243 - $hide_results_text = stripcslashes($data['ays-poll-hide-results-text']);
244 - $ays_result_message = wp_kses_post(stripcslashes($data['ays_result_message']));
248 +
249 + $hide_results_text = isset( $data['ays-poll-hide-results-text'] ) && $data['ays-poll-hide-results-text'] != '' ? wp_kses( $data['ays-poll-hide-results-text'], $poll_allowed_html ) : '';
250 +
251 + $ays_result_message = isset( $data['ays_result_message'] ) && $data['ays_result_message'] != '' ? wp_kses( $data['ays_result_message'], $poll_allowed_html ) : '';
252 +
245 253 $allow_not_vote = isset($data['ays-poll-allow-not-vote']) && 'allow' == $data['ays-poll-allow-not-vote'] ? 1 : 0;
246 254 $show_social = isset($data['ays-poll-show-social']) && 'show' == $data['ays-poll-show-social'] ? 1 : 0;
247 - $poll_social_buttons_heading = ( isset( $data[ 'ays_poll_social_buttons_heading' ] ) && $data[ 'ays_poll_social_buttons_heading' ] != '' ) ? stripslashes(wp_kses_post($data[ 'ays_poll_social_buttons_heading' ])) : '';
255 + $poll_social_buttons_heading = ( isset( $data[ 'ays_poll_social_buttons_heading' ] ) && $data[ 'ays_poll_social_buttons_heading' ] != '' ) ? wp_kses( $data['ays_poll_social_buttons_heading'], $poll_allowed_html ) : '';
248 256 $poll_show_social_ln = isset($data['ays_poll_enable_linkedin_share_button']) && $data['ays_poll_enable_linkedin_share_button'] == "on" ? "on" : "off";
249 257 $poll_show_social_fb = isset($data['ays_poll_enable_facebook_share_button']) && $data['ays_poll_enable_facebook_share_button'] == "on" ? "on" : "off";
250 258 $poll_show_social_tr = isset($data['ays_poll_enable_twitter_share_button']) && $data['ays_poll_enable_twitter_share_button'] == "on" ? "on" : "off";
251 259 $poll_show_social_vk = isset($data['ays_poll_enable_vkontakte_share_button']) && $data['ays_poll_enable_vkontakte_share_button'] == "on" ? "on" : "off";
@@ -251,16 +259,13 @@
251 259 $poll_show_social_vk = isset($data['ays_poll_enable_vkontakte_share_button']) && $data['ays_poll_enable_vkontakte_share_button'] == "on" ? "on" : "off";
252 260 $categories = isset($data['ays-poll-categories']) ? ',' . implode(',', $data['ays-poll-categories']) . ',' : ',1,';
253 261 $description = isset($data['ays-poll-description']) && $data['ays-poll-description'] != '' ? sanitize_textarea_field($data['ays-poll-description']) : "";
254 262 $type = isset($data['ays-poll-type']) ? sanitize_text_field($data['ays-poll-type']) : "";
255 - $question = wp_kses_post(stripcslashes($data['ays_poll_question']));
263 +
264 + $question = isset( $data['ays_poll_question'] ) && $data['ays_poll_question'] != '' ? wp_kses( $data['ays_poll_question'], $poll_allowed_html ) : '';
265 +
256 266 $image = isset($data['ays_poll_image']) && $data['ays_poll_image'] != '' ? sanitize_url($data['ays_poll_image']): '';
257 - // if ($image != '') {
258 - // if ( !(filter_var($image, FILTER_VALIDATE_URL) && wp_http_validate_url($image)) ) {
259 - // // invalid URL, handle accordingly
260 - // $image = '';
261 - // }
262 - // }
267 +
263 268 if( $image != "" ){
264 269 $check_if_current_image_exists = Poll_Maker_Ays_Admin::ays_poll_check_if_current_image_exists($image);
265 270
266 271 if( !$check_if_current_image_exists ){
@@ -267,16 +272,17 @@
267 272 $image = "";
268 273 }
269 274 }
270 275
271 - $theme_id = absint($data['ays_poll_theme']);
272 - $main_color = sanitize_text_field($data['ays_poll_main_color']);
273 - $text_color = sanitize_text_field($data['ays_poll_text_color']);
274 - $button_text_color = sanitize_text_field($data['ays_poll_button_text_color']);
275 - $button_bg_color = sanitize_text_field($data['ays_poll_button_bg_color']);
276 - $icon_color = sanitize_text_field($data['ays_poll_icon_color']);
277 - $bg_color = sanitize_text_field($data['ays_poll_bg_color']);
278 - $answer_bg_color = sanitize_text_field($data['ays_poll_answer_bg_color']);
276 + $theme_id = isset($data['ays_poll_theme']) ? absint($data['ays_poll_theme']) : 1;
277 + $main_color = isset($data['ays_poll_main_color']) ? sanitize_text_field($data['ays_poll_main_color']) : '#000000';
278 + $text_color = isset($data['ays_poll_text_color']) ? sanitize_text_field($data['ays_poll_text_color']) : '#000000';
279 + $button_text_color = isset($data['ays_poll_button_text_color']) ? sanitize_text_field($data['ays_poll_button_text_color']) : '#ffffff';
280 + $button_bg_color = isset($data['ays_poll_button_bg_color']) ? sanitize_text_field($data['ays_poll_button_bg_color']) : '#000000';
281 + $icon_color = isset($data['ays_poll_icon_color']) ? sanitize_text_field($data['ays_poll_icon_color']) : '#000000';
282 + $bg_color = isset($data['ays_poll_bg_color']) ? sanitize_text_field($data['ays_poll_bg_color']) : '#ffffff';
283 + $answer_bg_color = isset($data['ays_poll_answer_bg_color']) ? sanitize_text_field($data['ays_poll_answer_bg_color']) : '#FBFEF9';
284 + $answer_hover_color = isset($data['ays_poll_answer_hover_color']) ? sanitize_text_field($data['ays_poll_answer_hover_color']) : $text_color;
279 285 $answer_border_side = isset($data['ays_poll_border_side']) ? sanitize_text_field($data['ays_poll_border_side']) : 'all_sides';
280 286 $bg_image = isset($data['ays_poll_bg_image']) && $data['ays_poll_bg_image'] != '' ? sanitize_url($data['ays_poll_bg_image']): '';
281 287 // if ($bg_image != '') {
282 288 // if ( !(filter_var($bg_image, FILTER_VALIDATE_URL) && wp_http_validate_url($bg_image)) ) {
@@ -340,10 +346,11 @@
340 346 $deactiveInterval_fullArr = explode(" ",$deactiveInterval_full);
341 347 $deactiveInterval = isset($deactiveInterval_fullArr[0]) ? $deactiveInterval_fullArr[0] : "";
342 348 $deactiveIntervalSec = isset($deactiveInterval_fullArr[1]) ? $deactiveInterval_fullArr[1] : "";
343 349
344 - $active_date_message = wpautop($data['active_date_message']);
345 - $active_date_message_soon = wpautop($data['active_date_message_soon']);
350 + $active_date_message = isset( $data['active_date_message'] ) && $data['active_date_message'] != '' ? wp_kses( $data['active_date_message'], $poll_allowed_html ) : '';
351 + $active_date_message_soon = isset( $data['active_date_message_soon'] ) && $data['active_date_message_soon'] != '' ? wp_kses( $data['active_date_message_soon'], $poll_allowed_html ) : '';
352 +
346 353 $css = stripcslashes($data['ays_custom_css']);
347 354 $active_date_check = isset($data['active_date_check']) && !empty($data['active_date_check']) ? $data['active_date_check'] : '';
348 355 $enable_restart_button = isset($data['ays_enable_restart_button']) && 'on' == $data['ays_enable_restart_button'] ? 1 : 0;
349 356 $enable_vote_btn = isset($data['ays_enable_vote_button']) && 1 == $data['ays_enable_vote_button'] ? 1 : 0;
@@ -358,9 +365,9 @@
358 365 $ays_show_result_btn_see = isset($data['ays_poll_show_result_btn_see_schedule']) && !empty($data['ays_poll_show_result_btn_see_schedule']) ? $data['ays_poll_show_result_btn_see_schedule'] : 'with_see';
359 366 $info_form = isset($data['ays_poll_info_form']) && 'on' == $data['ays_poll_info_form'] ? 1 : 0;
360 367 $form_fields = isset($data['ays-poll-form-fields']) ? sanitize_text_field(implode(',', $data['ays-poll-form-fields'])) : "";
361 368 $form_required_fields = isset($data['ays-poll-form-required-fields']) ? sanitize_text_field(implode(',', $data['ays-poll-form-required-fields'])) : "";
362 - $info_form_title = isset($data['ays-poll-info-form-text']) ? wpautop(wp_kses_post(stripslashes($data['ays-poll-info-form-text']))) : "";
369 + $info_form_title = isset($data['ays-poll-info-form-text']) ? wp_kses( $data['ays-poll-info-form-text'], $poll_allowed_html ) : "";
363 370 $title_bg_color = sanitize_text_field($data['ays_poll_title_bg_color']);
364 371
365 372 // Poll main URL
366 373 $poll_main_url = (isset( $_POST['ays_poll_main_url'] ) && $_POST['ays_poll_main_url'] != '') ? wp_kses_post( $_POST['ays_poll_main_url'] ) : '';
@@ -444,8 +451,14 @@
444 451
445 452 // Poll schedule container on/off
446 453 $poll_show_container = (isset($data['ays_show_poll_container']) && $data['ays_show_poll_container'] == 'on') ? 'on' : 'off';
447 454
455 + // Show votes count per answers before voting
456 + $show_votes_before_voting = (isset($data['ays_show_votes_before_voting']) && $data['ays_show_votes_before_voting'] == 'on') ? 'on' : 'off';
457 + $show_votes_before_voting_by = (isset($data['ays_show_votes_before_voting_by']) && $data['ays_show_votes_before_voting_by'] != '') ? $data['ays_show_votes_before_voting_by'] : 'by_count';
458 +
459 +
460 +
448 461 // Poll see results button in limitations
449 462 $poll_see_result_button = (isset($data['ays_see_result_show']) && $data['ays_see_result_show'] == 'on') ? 'on' : 'off';
450 463 $poll_see_result_radio = (isset($data['ays_poll_see_result_show']) && $data['ays_poll_see_result_show'] != '') ? sanitize_text_field($data['ays_poll_see_result_show']) : '';
451 464
@@ -538,9 +551,11 @@
538 551 $poll_buttons_border_radius = (isset($data['ays_poll_buttons_border_radius']) && $data['ays_poll_buttons_border_radius'] != "") ? sanitize_text_field($data['ays_poll_buttons_border_radius']) : '3';
539 552
540 553 // Buttons width
541 554 $poll_buttons_width = (isset($data['ays_poll_buttons_width']) && sanitize_text_field( $data['ays_poll_buttons_width'] ) != "") ? sanitize_text_field( $data['ays_poll_buttons_width'] ) : '';
542 -
555 +
556 + // Buttons mobile width
557 + $poll_buttons_mobile_width = (isset($data['ays_poll_buttons_mobile_width']) && sanitize_text_field( $data['ays_poll_buttons_mobile_width'] ) != "") ? sanitize_text_field( $data['ays_poll_buttons_mobile_width'] ) : $poll_buttons_width;
543 558 // ==== ====
544 559
545 560 // ==== Allow Answer options ====
546 561 // Allow custom answer
@@ -545,8 +560,9 @@
545 560 // ==== Allow Answer options ====
546 561 // Allow custom answer
547 562 $poll_allow_answer = (isset($data['ays_poll_allow_add_answers']) && $data['ays_poll_allow_add_answers'] == "on") ? "on" : "off";
548 563 // Require admin approval
564 +
549 565 $poll_allow_answer_require = (isset($data['ays_poll_allow_answer_require']) && $data['ays_poll_allow_answer_require'] == "on") ? "on" : "off";
550 566
551 567 // ==== ====
552 568
@@ -598,8 +614,14 @@
598 614
599 615 // Poll title font size for mobile
600 616 $poll_title_font_size_mobile = (isset($data['ays_poll_title_font_size_mobile']) && $data['ays_poll_title_font_size_mobile'] != "" && $data['ays_poll_title_font_size_mobile'] > 0) ? sanitize_text_field($data['ays_poll_title_font_size_mobile']) : "20";
601 617
618 + // Poll title font weight
619 + $poll_title_font_weight = (isset($data['ays_poll_title_font_weight']) && $data['ays_poll_title_font_weight'] != "") ? sanitize_text_field($data['ays_poll_title_font_weight']) : "normal";
620 +
621 + // Poll title font weight for mobile
622 + $poll_title_font_weight_mobile = (isset($data['ays_poll_title_font_weight_mobile']) && $data['ays_poll_title_font_weight_mobile'] != "") ? sanitize_text_field($data['ays_poll_title_font_weight_mobile']) : "normal";
623 +
602 624 // Poll title alignment
603 625 $poll_title_alignment = ( isset($data['ays_poll_title_alignment']) && $data['ays_poll_title_alignment'] != "" ) ? sanitize_text_field($data['ays_poll_title_alignment']) : "center";
604 626
605 627 // Poll title alignment mobile
@@ -604,8 +626,11 @@
604 626
605 627 // Poll title alignment mobile
606 628 $poll_title_alignment_mobile = ( isset($data['ays_poll_title_alignment_mobile']) && $data['ays_poll_title_alignment_mobile'] != "" ) ? sanitize_text_field($data['ays_poll_title_alignment_mobile']) : "center";
607 629
630 + // Poll title text transform
631 + $poll_title_text_transform = ( isset($data['ays_poll_title_text_transform']) && $data['ays_poll_title_text_transform'] != "" ) ? sanitize_text_field($data['ays_poll_title_text_transform']) : "none";
632 +
608 633 // ===== Poll text type options start =====
609 634 $poll_text_type_length_enable = ( isset($data['ays_poll_enable_question_length']) && $data['ays_poll_enable_question_length'] != "" ) ? sanitize_text_field($data['ays_poll_enable_question_length']) : "off";
610 635 $poll_text_type_limit_type = ( isset($data['ays_poll_question_limit_text_type']) && $data['ays_poll_question_limit_text_type'] != "" ) ? sanitize_text_field($data['ays_poll_question_limit_text_type']) : "characters";
611 636 $poll_text_type_limit_length = ( isset($data['ays_poll_question_text_max_length']) && $data['ays_poll_question_text_max_length'] != "" ) ? sanitize_text_field($data['ays_poll_question_text_max_length']) : "";
@@ -618,9 +643,9 @@
618 643 $poll_enable_password = ( isset($data['ays_poll_enable_password']) && $data['ays_poll_enable_password'] == "on" ) ? "on" : "off";
619 644 $poll_password = ( isset($data['ays_poll_password']) && $data['ays_poll_password'] != "" ) ? sanitize_text_field($data['ays_poll_password']) : "";
620 645 // Enable toggle password visibility
621 646 $poll_enable_password_visibility = (isset($data['ays_poll_enable_password_visibility']) && $data['ays_poll_enable_password_visibility'] == 'on') ? 'on' : 'off';
622 - $poll_password_message = ( isset($data['ays_poll_password_message']) && $data['ays_poll_password_message'] != "" ) ? wp_kses_post($data['ays_poll_password_message']) : "Please enter password";
647 + $poll_password_message = ( isset($data['ays_poll_password_message']) && $data['ays_poll_password_message'] != "" ) ? wp_kses( $data['ays_poll_password_message'], $poll_allowed_html ) : "Please enter password";
623 648
624 649 // Add post for poll
625 650 $ays_add_post_for_poll = isset($data['ays_add_post_for_poll']) && $data['ays_add_post_for_poll'] == 'on' ? 'on' : 'off';
626 651
@@ -648,9 +673,9 @@
648 673 $poll_logo_url_new_tab = (isset( $data[ 'ays_poll_logo_enable_image_url_new_tab' ] ) && $data[ 'ays_poll_logo_enable_image_url_new_tab' ] == 'on') ? "on" : 'off';
649 674
650 675 // Social Media links
651 676 $enable_social_links = (isset($data['ays_poll_enable_social_links']) && sanitize_text_field( $data['ays_poll_enable_social_links'] ) == "on") ? 'on' : 'off';
652 - $poll_social_links_heading = ( isset( $data[ 'ays_poll_social_links_heading' ] ) && $data[ 'ays_poll_social_links_heading' ] != '' ) ? stripslashes(wp_kses_post($data[ 'ays_poll_social_links_heading' ])) : '';
677 + $poll_social_links_heading = ( isset( $data[ 'ays_poll_social_links_heading' ] ) && $data[ 'ays_poll_social_links_heading' ] != '' ) ? wp_kses( $data['ays_poll_social_links_heading'], $poll_allowed_html ) : '';
653 678 $ays_social_links = (isset($data['ays_poll_social_links'])) ? array_map( 'sanitize_text_field', $data['ays_poll_social_links'] ) : array(
654 679 'linkedin_link' => '',
655 680 'facebook_link' => '',
656 681 'twitter_link' => '',
@@ -655,8 +680,10 @@
655 680 'facebook_link' => '',
656 681 'twitter_link' => '',
657 682 'vkontakte_link' => '',
658 683 'youtube_link' => '',
684 + 'tiktok_link' => '',
685 + 'instagram_link' => '',
659 686 );
660 687
661 688 $linkedin_link = isset($ays_social_links['ays_linkedin_link']) && sanitize_text_field( $ays_social_links['ays_linkedin_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_linkedin_link'] ) : '';
662 689 $facebook_link = isset($ays_social_links['ays_facebook_link']) && sanitize_text_field( $ays_social_links['ays_facebook_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_facebook_link'] ) : '';
@@ -662,8 +689,10 @@
662 689 $facebook_link = isset($ays_social_links['ays_facebook_link']) && sanitize_text_field( $ays_social_links['ays_facebook_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_facebook_link'] ) : '';
663 690 $twitter_link = isset($ays_social_links['ays_twitter_link']) && sanitize_text_field( $ays_social_links['ays_twitter_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_twitter_link'] ) : '';
664 691 $vkontakte_link = isset($ays_social_links['ays_vkontakte_link']) && sanitize_text_field( $ays_social_links['ays_vkontakte_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_vkontakte_link'] ) : '';
665 692 $youtube_link = isset($ays_social_links['ays_youtube_link']) && sanitize_text_field( $ays_social_links['ays_youtube_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_youtube_link'] ) : '';
693 + $tiktok_link = isset($ays_social_links['ays_tiktok_link']) && sanitize_text_field( $ays_social_links['ays_tiktok_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_tiktok_link'] ) : '';
694 + $instagram_link = isset($ays_social_links['ays_instagram_link']) && sanitize_text_field( $ays_social_links['ays_instagram_link'] ) != '' ? sanitize_text_field( $ays_social_links['ays_instagram_link'] ) : '';
666 695
667 696 $social_links = array(
668 697 'linkedin_link' => $linkedin_link,
669 698 'facebook_link' => $facebook_link,
@@ -669,8 +698,10 @@
669 698 'facebook_link' => $facebook_link,
670 699 'twitter_link' => $twitter_link,
671 700 'vkontakte_link' => $vkontakte_link,
672 701 'youtube_link' => $youtube_link,
702 + 'tiktok_link' => $tiktok_link,
703 + 'instagram_link' => $instagram_link,
673 704 );
674 705
675 706 $show_chart_type = (isset($_POST['ays_poll_show_result_chart']) && sanitize_text_field( $_POST['ays_poll_show_result_chart'] ) != "") ? sanitize_text_field( $_POST['ays_poll_show_result_chart'] ) : 'default_bar_chart';
676 707 $show_chart_type_google_height = (isset($_POST['ays_poll_show_result_chart_google_height']) && $_POST['ays_poll_show_result_chart_google_height'] != "" && $_POST['ays_poll_show_result_chart_google_height'] != 0) ? absint( intval($_POST['ays_poll_show_result_chart_google_height']) ) : 400;
@@ -685,8 +716,9 @@
685 716 'bg_color' => $bg_color,
686 717 'bg_image' => $bg_image,
687 718 'enable_answer_style' => $enable_answer_style,
688 719 'answer_bg_color' => $answer_bg_color,
720 + 'answer_hover_color' => $answer_hover_color,
689 721 'answer_border_side' => $answer_border_side,
690 722 "answer_font_size" => $poll_answer_font_size,
691 723 "poll_answer_font_size_mobile" => $poll_answer_font_size_mobile,
692 724 'poll_answer_object_fit' => $poll_answer_object_fit,
@@ -703,8 +735,10 @@
703 735 'poll_answer_box_shadow_z_offset' => $poll_answer_box_shadow_z_offset,
704 736 'title_bg_color' => $title_bg_color, //aray
705 737 'poll_title_font_size' => $poll_title_font_size,
706 738 'poll_title_font_size_mobile' => $poll_title_font_size_mobile,
739 + 'poll_title_font_weight' => $poll_title_font_weight,
740 + 'poll_title_font_weight_mobile' => $poll_title_font_weight_mobile,
707 741 'icon_size' => $icon_size,
708 742 'width' => $width,
709 743 'width_for_mobile' => $width_for_mobile,
710 744 "poll_min_height" => $poll_min_height,
@@ -732,8 +766,9 @@
732 766 'poll_buttons_left_right_padding' => $poll_buttons_left_right_padding,
733 767 'poll_buttons_top_bottom_padding' => $poll_buttons_top_bottom_padding,
734 768 'poll_buttons_border_radius' => $poll_buttons_border_radius,
735 769 'poll_buttons_width' => $poll_buttons_width,
770 + 'poll_buttons_mobile_width' => $poll_buttons_mobile_width,
736 771 "disable_answer_hover" => $disable_answer_hover,
737 772 "logo_image" => $poll_logo_image,
738 773 'poll_enable_logo_url' => $poll_logo_image_url_check,
739 774 'poll_logo_title' => $poll_logo_title,
@@ -779,8 +814,10 @@
779 814 "enable_view_more_button" => $enable_view_more_button,
780 815 "poll_view_more_button_count" => $poll_view_more_button_count,
781 816 "answer_sort_type" => $poll_answer_ordering,
782 817 "show_answers_numbering" => $show_answers_numbering,
818 + "show_votes_before_voting" => $show_votes_before_voting,
819 + "show_votes_before_voting_by" => $show_votes_before_voting_by,
783 820 // Settings tab end
784 821 'hide_results' => $hide_results,
785 822 'hide_result_message' => $hide_result_message,
786 823 'hide_results_text' => $hide_results_text,
@@ -844,8 +881,9 @@
844 881 'poll_answer_image_height_for_mobile' => $poll_answer_image_height_for_mobile,
845 882 'poll_answer_image_border_radius' => $poll_answer_image_border_radius,
846 883 'poll_title_alignment' => $poll_title_alignment,
847 884 'poll_title_alignment_mobile' => $poll_title_alignment_mobile,
885 + 'poll_title_text_transform' => $poll_title_text_transform,
848 886 // Text type options
849 887 'poll_text_type_length_enable' => $poll_text_type_length_enable,
850 888 'poll_text_type_limit_type' => $poll_text_type_limit_type,
851 889 'poll_text_type_limit_length' => $poll_text_type_limit_length,
@@ -1005,8 +1043,17 @@
1005 1043 )
1006 1044 );
1007 1045 }
1008 1046 $message = 'created';
1047 +
1048 + $post_type_args = array(
1049 + 'poll_id' => $last_id,
1050 + 'author_id' => !empty($poll_create_author) ? $poll_create_author : get_current_user_id(),
1051 + 'poll_title' => $title,
1052 + );
1053 +
1054 + $custom_post_id = Poll_Maker_Custom_Post_Type::ays_poll_add_custom_post($post_type_args);
1055 +
1009 1056 } else {
1010 1057 $poll = $this->get_poll_by_id($id);
1011 1058 $poll_result = $wpdb->update(
1012 1059 $poll_table,
@@ -1252,15 +1299,15 @@
1252 1299 <!-- /wp:poll-maker/poll -->';
1253 1300 }
1254 1301
1255 1302 $new_post = array(
1256 - 'post_title' => $title,
1257 - 'post_content' => $post_content,
1258 - 'post_status' => 'publish',
1259 - 'post_date' => current_time( 'mysql' ),
1260 - 'post_author' => $user_ID,
1261 - 'post_type' => 'post',
1262 - 'post_category' => $add_postcat_for_poll
1303 + 'post_title' => $title,
1304 + 'post_content' => $post_content,
1305 + 'post_status' => 'publish',
1306 + 'post_date' => current_time( 'mysql' ),
1307 + 'post_author' => $user_ID,
1308 + 'post_type' => 'post',
1309 + 'post_category' => $add_postcat_for_poll
1263 1310 );
1264 1311 $post_id = wp_insert_post($new_post);
1265 1312 if(! empty($image)){
1266 1313 $sql = "SELECT ID FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND guid = '".$image."'";
@@ -1283,8 +1330,20 @@
1283 1330
1284 1331 if ($poll_result >= 0) {
1285 1332 if($message == 'created'){
1286 1333 setcookie('ays_poll_created_new', $last_id, time() + 3600, '/');
1334 + if(!empty($custom_post_id)){
1335 + $custom_post_url = array(
1336 + 'post_type' => 'ays-poll-maker',
1337 + 'p' => $custom_post_id,
1338 + 'preview' => 'true',
1339 + );
1340 + $custom_post_url_ready = http_build_query($custom_post_url);
1341 + $ready_url = get_home_url();
1342 + $ready_url .= '/?' . $custom_post_url_ready;
1343 + setcookie('ays_poll_created_new_'.$last_id.'_post_id', $ready_url, time() + 3600, '/');
1344 + }
1345 +
1287 1346 }
1288 1347 }
1289 1348
1290 1349 if ($poll_result >= 0) {
@@ -1313,9 +1372,9 @@
1313 1372 global $wpdb;
1314 1373
1315 1374 // Nonce verification for CSRF protection
1316 1375 if (!isset($_GET['_wpnonce']) && !wp_verify_nonce($_GET['_wpnonce'], $this->plugin_name . '-duplicate-poll')) {
1317 - wp_die(__('Security check error. Try again.', "poll-maker"));
1376 + wp_die( esc_html__('Security check error. Try again.', "poll-maker"));
1318 1377 }
1319 1378
1320 1379 $poll_table = esc_sql($wpdb->prefix."ayspoll_polls");
1321 1380 $answers_table = esc_sql($wpdb->prefix."ayspoll_answers");
@@ -1392,8 +1451,17 @@
1392 1451 }
1393 1452 }
1394 1453 $message = 'duplicated';
1395 1454 if ($result >= 0 && $flag == true) {
1455 +
1456 + $post_type_args = array(
1457 + 'poll_id' => $poll_id,
1458 + 'author_id' => !empty($user->ID) ? $user->ID : $user_id,
1459 + 'poll_title' => "Copy - ".$duplicate['title'],
1460 + );
1461 +
1462 + $custom_post_id = Poll_Maker_Custom_Post_Type::ays_poll_add_custom_post($post_type_args);
1463 +
1396 1464 $url = esc_url_raw(remove_query_arg(array('action', 'poll'))) . '&status=' . $message;
1397 1465 wp_redirect($url);
1398 1466 exit;
1399 1467 }
@@ -1503,28 +1571,37 @@
1503 1571 $duplicate_nonce = wp_create_nonce($this->plugin_name . '-duplicate-poll');
1504 1572
1505 1573 $poll_title = stripcslashes($item['title']);
1506 1574
1575 + $custom_post_id = isset($item['custom_post_id']) && $item['custom_post_id'] != 0 && $item['custom_post_id'] != '' ? esc_attr(intval($item['custom_post_id'])) : 0;
1576 +
1507 1577 $p = esc_attr($poll_title);
1508 1578 $polls_title_length = intval( $this->title_length );
1509 1579
1510 1580 $restitle = Poll_Maker_Ays_Admin::ays_restriction_string("word", $poll_title, $polls_title_length);
1511 1581
1512 - $title = sprintf('<a href="?page=%s&action=%s&poll=%d" title="%s">%s</a>', esc_attr($_REQUEST['page']), 'edit', absint($item['id']), $p, $restitle);
1513 - $actions = [
1514 - 'edit' => sprintf('<a href="?page=%s&action=%s&poll=%d">' . __('Edit', "poll-maker") . '</a>', esc_attr($_REQUEST['page']), 'edit', absint($item['id'])),
1515 - 'duplicate' => sprintf('<a href="?page=%s&action=%s&poll=%d&_wpnonce=%s">' . __('Duplicate', "poll-maker") . '</a>', esc_attr($_REQUEST['page']), 'duplicate', absint($item['id']),$duplicate_nonce),
1516 - 'results' => sprintf('<a href="?page=%s&poll=%d&title=%s">'. __('View Results', "poll-maker") .'</a>', esc_attr( $_REQUEST['page'] ) . '-results-each', absint( $item['id'] ) , $poll_title ),
1517 - 'delete' => sprintf('<a href="?page=%s&action=%s&poll=%d&_wpnonce=%s">' . __('Delete', "poll-maker") . '</a>', esc_attr($_REQUEST['page']), 'delete', absint($item['id']), $delete_nonce),
1518 - ];
1582 + $title = sprintf('<a href="?page=%s&action=%s&poll=%d" title="%s">%s</a>', esc_attr($_REQUEST['page']), 'edit', absint($item['id']), $p, $restitle);
1519 1583
1584 + $actions['edit'] = sprintf( '<a href="?page=%s&action=%s&poll=%d">'. esc_html__('Edit', 'poll-maker') .'</a>', esc_attr( $_REQUEST['page'] ), 'edit', absint( $item['id'] ) );
1585 +
1586 + $actions['duplicate'] = sprintf('<a href="?page=%s&action=%s&poll=%d&_wpnonce=%s">' .esc_html__('Duplicate', "poll-maker") . '</a>', esc_attr($_REQUEST['page']), 'duplicate', absint($item['id']),$duplicate_nonce);
1587 +
1588 + $actions['results'] = sprintf( '<a href="?page=%s&poll=%d&title=%s">'. esc_html__('View Results', 'poll-maker') .'</a>', esc_attr( $_REQUEST['page'] ) . '-results-each', absint( $item['id'] ), $poll_title );
1589 +
1590 + if($custom_post_id > 0){
1591 + $actions['custom_posts'] = sprintf( '<a href="%s" target="_blank">'. esc_html__('Preview', "poll-maker") .'</a>', esc_url( add_query_arg( 'preview', 'true', get_permalink($custom_post_id) ) ));
1592 + }
1593 +
1594 + $actions['delete'] = sprintf( '<a class="ays_confirm_del" data-message="%s" href="?page=%s&action=%s&poll=%d&_wpnonce=%s">'. esc_html__('Delete', 'poll-maker') .'</a>', $restitle, esc_attr( $_REQUEST['page'] ), 'delete', absint( $item['id'] ), $delete_nonce );
1595 +
1596 +
1520 1597 return $title . $this->row_actions($actions);
1521 1598 }
1522 1599
1523 1600 function column_shortcode( $item ) {
1524 1601 $shortcode_content = '<div class="ays-poll-shortcode-container">
1525 - <div class="ays-poll-copy-image" data-toggle="tooltip" aria-label="Click to copy" data-original-title="Click to copy">
1526 - <img src="' . POLL_MAKER_AYS_ADMIN_URL . '/images/icons/edit-shortcode.svg">
1602 + <div class="ays-poll-copy-image" data-toggle="tooltip" aria-label="' . __( 'Click to copy', "poll-maker" ) . '" data-original-title="' . __( 'Click to copy', "poll-maker" ) . '">
1603 + <img src="' . esc_url(POLL_MAKER_AYS_ADMIN_URL) . '/images/icons/edit-shortcode.svg">
1527 1604 </div>';
1528 1605
1529 1606 $shortcode_input = sprintf('<input type="text" class="ays-poll-shortcode-input" onclick="this.setSelectionRange(0, this.value.length)" readonly value="[ays_poll id=%s]" />', $item["id"]);
1530 1607
@@ -1538,9 +1615,9 @@
1538 1615 return sprintf('<input type="text" onClick="this.setSelectionRange(0, this.value.length)" readonly value="<?php echo do_shortcode(\'[ays_poll id=%s]\'); ?>" />', $item["id"]);
1539 1616 }
1540 1617
1541 1618 function column_results($item) {
1542 - return sprintf('<a href="?page=%s&poll=%d&title=%s"><img src="'. POLL_MAKER_AYS_ADMIN_URL .'/images/icons/view-poll-results.svg"></a>', esc_attr( $_REQUEST['page'] ) . '-results-each', absint( $item['id']), $item['title']);
1619 + return sprintf('<a href="?page=%s&poll=%d&title=%s"><img src="'. esc_url(POLL_MAKER_AYS_ADMIN_URL) .'/images/icons/view-poll-results.svg"></a>', esc_attr( $_REQUEST['page'] ) . '-results-each', absint( $item['id']), $item['title']);
1543 1620 }
1544 1621
1545 1622 function column_categories( $item ) {
1546 1623 if ($item['categories'] == '') {
@@ -1616,9 +1693,9 @@
1616 1693 );
1617 1694 $options = json_decode($res['styles'], true);
1618 1695 $status = isset($options['published']) ? $options['published'] : 1;
1619 1696
1620 - return $status ? "<i class=\"ays_poll_far ays_poll_fa-check-square\"></i> " . __("Published", "poll-maker") : "<i class=\"ays_poll_far ays_poll_fa-square\"></i> " . __("Unpublished", "poll-maker");
1697 + return $status ? "<i class=\"ays_poll_far ays_poll_fa-check-square\"></i> " .esc_html__("Published", "poll-maker") : "<i class=\"ays_poll_far ays_poll_fa-xmark-square\"></i> " .esc_html__("Unpublished", "poll-maker");
1621 1698 }
1622 1699
1623 1700 function column_poll_image( $item ) {
1624 1701 global $wpdb;
@@ -1666,19 +1743,19 @@
1666 1743 */
1667 1744 function get_columns() {
1668 1745 $columns = array(
1669 1746 'cb' => '<input type="checkbox" />',
1670 - 'title' => __('Title', "poll-maker"),
1671 - 'poll_image' => __('Question image', "poll-maker"),
1672 - 'type' => __('Type', "poll-maker"),
1673 - 'shortcode' => __('Shortcode', "poll-maker"),
1674 - 'code_include' => __('Code Include', "poll-maker"),
1675 - 'results' => __('Results', "poll-maker"),
1676 - 'categories' => __('Categories', "poll-maker"),
1677 - 'create_date' => __('Created', "poll-maker" ),
1678 - 'completed_count' => __('Completed count', "poll-maker" ),
1679 - 'publish' => __('Status', "poll-maker"),
1680 - 'id' => __('ID', "poll-maker"),
1747 + 'title' => esc_html__('Title', "poll-maker"),
1748 + 'poll_image' => esc_html__('Question image', "poll-maker"),
1749 + 'type' => esc_html__('Type', "poll-maker"),
1750 + 'shortcode' => esc_html__('Shortcode', "poll-maker"),
1751 + 'code_include' => esc_html__('Code Include', "poll-maker"),
1752 + 'results' => esc_html__('Results', "poll-maker"),
1753 + 'categories' => esc_html__('Categories', "poll-maker"),
1754 + 'create_date' => esc_html__('Created', "poll-maker" ),
1755 + 'completed_count' => esc_html__('Completed count', "poll-maker" ),
1756 + 'publish' => esc_html__('Status', "poll-maker"),
1757 + 'id' => esc_html__('ID', "poll-maker"),
1681 1758 );
1682 1759
1683 1760 return $columns;
1684 1761 }
@@ -1717,9 +1794,9 @@
1717 1794 * @return array
1718 1795 */
1719 1796 public function get_bulk_actions() {
1720 1797 $actions = array(
1721 - 'bulk-delete' => __('Delete', "poll-maker"),
1798 + 'bulk-delete' =>esc_html__('Delete', "poll-maker"),
1722 1799 );
1723 1800
1724 1801 return $actions;
1725 1802 }
@@ -1839,11 +1916,15 @@
1839 1916
1840 1917 $sql = "SELECT COUNT(*) FROM {$wpdb->prefix}ayspoll_polls";
1841 1918
1842 1919 if (isset($_GET['filterby']) && absint(intval($_GET['filterby'])) > 0) {
1843 - $cat_id = absint(intval($_GET['filterby']));
1844 - $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1845 - }
1920 + $cat_id = absint(intval($_GET['filterby']));
1921 + if (isset($_SERVER['HTTP_HOST']) && sanitize_text_field($_SERVER['HTTP_HOST']) == "playground.wordpress.net") {
1922 + $sql .= " WHERE categories LIKE '%," . $cat_id . ",%' OR categories LIKE '" . $cat_id . ",%' OR categories LIKE '%," . $cat_id . "' OR categories = '" . $cat_id . "'";
1923 + } else {
1924 + $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1925 + }
1926 + }
1846 1927
1847 1928 return $wpdb->get_var( $sql );
1848 1929 }
1849 1930
@@ -1857,9 +1938,13 @@
1857 1938 $sql = "SELECT * FROM " . $poll_table;
1858 1939
1859 1940 if (isset($_GET['filterby']) && absint(intval($_GET['filterby'])) > 0) {
1860 1941 $cat_id = absint(intval($_GET['filterby']));
1861 - $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1942 + if (isset($_SERVER['HTTP_HOST']) && sanitize_text_field($_SERVER['HTTP_HOST']) == "playground.wordpress.net") {
1943 + $sql .= " WHERE categories LIKE '%," . $cat_id . ",%' OR categories LIKE '" . $cat_id . ",%' OR categories LIKE '%," . $cat_id . "' OR categories = '" . $cat_id . "'";
1944 + } else {
1945 + $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1946 + }
1862 1947 }
1863 1948
1864 1949 $results = $wpdb->get_results($sql, ARRAY_A);
1865 1950
@@ -1885,9 +1970,13 @@
1885 1970 $sql = "SELECT * FROM " . $poll_table;
1886 1971
1887 1972 if (isset($_GET['filterby']) && absint(intval($_GET['filterby'])) > 0) {
1888 1973 $cat_id = absint(intval($_GET['filterby']));
1889 - $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1974 + if (isset($_SERVER['HTTP_HOST']) && sanitize_text_field($_SERVER['HTTP_HOST']) == "playground.wordpress.net") {
1975 + $sql .= " WHERE categories LIKE '%," . $cat_id . ",%' OR categories LIKE '" . $cat_id . ",%' OR categories LIKE '%," . $cat_id . "' OR categories = '" . $cat_id . "'";
1976 + } else {
1977 + $sql .= " WHERE FIND_IN_SET('{$cat_id}', categories) > 0";
1978 + }
1890 1979 }
1891 1980
1892 1981 $results = $wpdb->get_results($sql, ARRAY_A);
1893 1982
@@ -1971,13 +2060,12 @@
1971 2060
1972 2061 $where[] = sprintf(" categories LIKE('%%,%s,%%') ", esc_sql( $wpdb->esc_like( $cat_id ) ) );
1973 2062 }
1974 2063
1975 - if ( isset($_REQUEST['filterbyauthor'] ) && $_REQUEST['filterbyauthor'] > 0) {
1976 - $poll_author = esc_sql( sanitize_text_field( $_REQUEST['filterbyauthor'] ) );
1977 -
1978 - $where[] = " JSON_EXTRACT(styles, '$.poll_create_author') = " . ($poll_author);
1979 - }
2064 + if ( isset( $_REQUEST['filterbyauthor'] ) && absint( $_REQUEST['filterbyauthor'] ) > 0 ) {
2065 + $poll_author = absint( $_REQUEST['filterbyauthor'] );
2066 + $where[] = $wpdb->prepare( "JSON_EXTRACT(styles, '$.poll_create_author') = %d", $poll_author );
2067 + }
1980 2068
1981 2069 if(isset( $_REQUEST['filterbytype'] ) && $_REQUEST['filterbytype'] != "" ){
1982 2070 $type = esc_sql( sanitize_text_field( $_REQUEST['filterbytype'] ) );
1983 2071 if (isset($type) && $type != '') {
@@ -2032,18 +2120,18 @@
2032 2120 return;
2033 2121 }
2034 2122
2035 2123 if ('created' == $status) {
2036 - $updated_message = esc_html(__('Poll created.', "poll-maker"));
2124 + $updated_message = esc_html( esc_html__('Poll created.', "poll-maker"));
2037 2125 } elseif ('updated' == $status) {
2038 - $updated_message = esc_html(__('Poll saved.', "poll-maker"));
2126 + $updated_message = esc_html( esc_html__('Poll saved.', "poll-maker"));
2039 2127 } elseif ('duplicated' == $status) {
2040 - $updated_message = esc_html(__('Poll duplicated.', "poll-maker"));
2128 + $updated_message = esc_html( esc_html__('Poll duplicated.', "poll-maker"));
2041 2129 } elseif ('deleted' == $status) {
2042 2130 $deleted_count = isset($_GET['d_count']) && $_GET['d_count'] != "" ? intval(esc_attr($_GET['d_count'])) : 0;
2043 - $deleted_count_message = __('Poll deleted.', "poll-maker");
2131 + $deleted_count_message =esc_html__('Poll deleted.', "poll-maker");
2044 2132 if($deleted_count > 1){
2045 - $deleted_count_message = $deleted_count . __(' Polls are deleted.', "poll-maker");
2133 + $deleted_count_message = $deleted_count .esc_html__(' Polls are deleted.', "poll-maker");
2046 2134 }
2047 2135 $updated_message = $deleted_count_message;
2048 2136 }
2049 2137
@@ -2051,9 +2139,9 @@
2051 2139 return;
2052 2140 }
2053 2141
2054 2142 ?>
2055 - <div class="notice notice-success is-dismissible">
2143 + <div class="ays-poll-admin-notice notice notice-success is-dismissible">
2056 2144 <p>
2057 2145 <?php echo $updated_message; ?>
2058 2146 </p>
2059 2147 </div>