array( 'class' => array() ), 'svg' => array( 'class' => array(), 'version' => array(), 'xmlns' => array(), 'xmlns:xlink' => array(), 'overflow' => array(), 'preserveAspectRatio' => array(), 'viewBox' => array(), 'width' => array(), 'height' => array() ), 'g' => array(), 'path' => array( 'xmlns:default' => array(), 'd' => array(), 'fill' => array(), 'vector-effect' => array() ) ); $poll_acordion_svg_html = '
'; $id = (isset($_GET['poll'])) ? absint(intval($_GET['poll'])) : null; if ($action == 'edit') { if ($id === null || $id === 0) { $url = esc_url_raw(remove_query_arg(array('action', 'poll'))); wp_safe_redirect($url); } } $user_id = get_current_user_id(); $user = get_userdata($user_id); $users_table = esc_sql( $wpdb->prefix . 'users' ); // $sql_users = "SELECT ID, display_name FROM {$users_table}"; // $ays_poll_wp_users = $wpdb->get_results($sql_users, "ARRAY_A"); $author = array( 'id' => $user->ID, 'name' => $user->data->display_name ); $cat_list = get_categories( array( 'hide_empty' => false ) ); $poll_category_page_url = admin_url( 'admin.php?page=poll-maker-ays-cats' ); $poll_message_vars = array( '%%user_name%%' =>esc_html__("User Name", "poll-maker"), '%%user_email%%' =>esc_html__("User Email", "poll-maker"), '%%user_phone%%' =>esc_html__("User Phone", "poll-maker"), '%%poll_title%%' =>esc_html__("Poll title", "poll-maker"), '%%poll_id%%' =>esc_html__("Poll ID", "poll-maker"), '%%users_first_name%%' =>esc_html__("User's First Name", "poll-maker"), '%%users_last_name%%' =>esc_html__("User's Last Name", "poll-maker"), '%%creation_date%%' =>esc_html__("Creation date of the poll", "poll-maker"), '%%current_date%%' =>esc_html__("Current Date", "poll-maker"), '%%current_time%%' =>esc_html__("Current Time", "poll-maker"), '%%current_day%%' =>esc_html__("Current Day", "poll-maker"), '%%current_month%%' =>esc_html__("Current Month", "poll-maker"), '%%current_poll_author%%' =>esc_html__("Author of the current poll", "poll-maker"), '%%current_poll_author_email%%' =>esc_html__("Author's Email of the current poll", "poll-maker"), '%%current_poll_author_nickname%%' =>esc_html__("Author's Nick Name of the current poll", "poll-maker"), '%%current_poll_author_display_name%%' =>esc_html__("Author's Display Name of the current poll", "poll-maker"), '%%current_poll_author_website_url%%' =>esc_html__("Author's Website URl of the current poll", "poll-maker"), '%%current_poll_author_registered%%' =>esc_html__("Author's Registered Date of the current poll", "poll-maker"), '%%admin_email%%' =>esc_html__("Admin Email", "poll-maker"), '%%user_wordpress_roles%%' =>esc_html__("User's Wordpress Roles", "poll-maker"), "%%user_wordpress_email%%" =>esc_html__("User's WordPress profile email", "poll-maker"), '%%user_wordpress_website%%' =>esc_html__("User's Wordpress Website", "poll-maker"), '%%user_first_name%%' =>esc_html__("User's First Name", "poll-maker"), '%%user_display_name%%' =>esc_html__("User's Display Name", "poll-maker"), '%%user_nickname%%' =>esc_html__("User's Nick Name", "poll-maker"), '%%user_ip_address%%' =>esc_html__("User's IP address", "poll-maker"), '%%user_id%%' =>esc_html__("User's ID", "poll-maker"), '%%user_registered%%' =>esc_html__("User's Registered Date", "poll-maker"), '%%poll_pass_count%%' =>esc_html__("Polls pass count", "poll-maker"), '%%passed_poll_count_per_user%%' =>esc_html__("Passed polls count per user", "poll-maker"), '%%current_poll_page_link%%' =>esc_html__("Current polls posted link", "poll-maker"), '%%post_title%%' =>esc_html__("Post Title", "poll-maker"), '%%post_author_email%%' =>esc_html__("Post Author Email", "poll-maker"), '%%post_author_display_name%%' =>esc_html__("Post Author Display Name", "poll-maker"), '%%post_author_first_name%%' =>esc_html__("Post Author First Name", "poll-maker"), '%%post_author_last_name%%' =>esc_html__("Post Author Last Name", "poll-maker"), '%%post_author_nickname%%' =>esc_html__("Post Author Nickname", "poll-maker"), '%%post_author_website_url%%' =>esc_html__("Post Author Website URL", "poll-maker"), '%%post_author_roles%%' =>esc_html__("Post Author Roles", "poll-maker"), '%%post_id%%' =>esc_html__("Post ID", "poll-maker"), '%%site_title%%' =>esc_html__("Site Title", "poll-maker"), '%%site_description%%' =>esc_html__("Site Description", "poll-maker"), '%%home_page_url%%' =>esc_html__("Home Page", "poll-maker"), ); $poll_message_vars_html = $this->ays_poll_generate_message_vars_html( $poll_message_vars ); $poll = array( 'title' => 'Default title', 'description' => '', 'categories' => array(), 'image' => '', 'question' => '', 'type' => 'choosing', 'view_type' => '', 'answers' => array(), 'show_title' => 1, 'styles' => '', 'custom_css' => '', 'theme_id' => 1, ); $default_colors = array( "main_color" => "#0C6291", "text_color" => "#0C6291", "icon_color" => "#0C6291", "box_shadow_color" => "#000000", "bg_color" => "#FBFEF9", "answer_bg_color" => "#FBFEF9", "answer_hover_color" => "#0C6291", "title_bg_color" => "", "border_color" => "#0C6291", ); $default_options = array( 'randomize_answers' => 'off', "icon_size" => 24, "width" => 600, "width_for_mobile" => '', "btn_text" =>esc_html__('Vote', "poll-maker"), "see_res_btn_text" =>esc_html__('See Results', "poll-maker"), "border_style" => "ridge", "border_radius" => 0, "border_width" => 2, "enable_box_shadow" => "", "bg_image" => "", "hide_results" => 0, "hide_results_text" => "

" .esc_html__("Thanks for your answer!", "poll-maker") . "

", "allow_not_vote" => 0, "show_social" => 0, "poll_show_social_ln" => "on", "poll_show_social_fb" => "on", "poll_show_social_tr" => "on", "poll_show_social_vk" => "off", "load_effect" => "load_gif", "load_gif" => "plg_default", 'limit_users' => 0, "limitation_message" => "

" .esc_html__("You have already voted", "poll-maker") . "

", 'redirect_url' => '', 'redirection_delay' => '', 'users_role' => '', 'enable_restriction_pass' => 0, 'restriction_pass_message' => "

" .esc_html__("You don't have permissions for passing the poll", "poll-maker") . "

", 'enable_logged_users' => 0, 'enable_logged_users_message' => "

" .esc_html__('You must sign in for passing the poll', "poll-maker") . "

", 'notify_email_on' => 0, 'notify_email' => '', 'result_sort_type' => 'none', 'redirect_after_submit' => 0, 'redirect_users' => 0, 'redirect_after_vote_url' => '', 'redirect_after_vote_delay' => '', 'published' => 1, 'enable_pass_count' => 'on', 'activeInterval' => '', 'create_date' => current_time( 'mysql' ), 'author' => $author, 'deactiveInterval' => '', 'enable_background_gradient' => 'off', 'background_gradient_color_1' => '#103251', 'background_gradient_color_2' => '#607593', 'poll_gradient_direction' => 'vertical', 'activeIntervalSec' => '', 'deactiveIntervalSec' => '', 'active_date_check' => '', 'active_date_message_soon' => "

" .esc_html__("The poll will be available soon!", "poll-maker") . "

", 'active_date_message' => "

" .esc_html__("The poll has expired!", "poll-maker") . "

", 'enable_restart_button' => 0, 'enable_vote_btn' => 1, 'show_votes_count' => 1, 'show_res_percent' => 1, 'poll_direction' => 'ltr', 'info_form' => 0, 'fields' => 'apm_name,apm_email,apm_phone', 'required_fields' => 'apm_email', 'info_form_title' => "
" .esc_html__("Please fill out the form:", "poll-maker") . "
", 'disable_answer_hover' => 0, 'enable_asnwers_sound' => 'off', 'poll_bg_image_position' => 'center center', 'poll_bg_img_in_finish_page' => 'off', 'ays_add_post_for_poll' => 'off', 'result_in_rgba' => 'off', 'answer_sort_type' => 'default', 'answer_font_size' => '16', 'poll_answer_font_size_mobile' => '16', 'show_passed_users' => 'off', 'logo_image' => '', 'dont_show_poll_cont' => 'off', 'show_votes_before_voting' => 'off', 'show_votes_before_voting_by' => 'by_count', 'see_result_button' => 'on', 'see_result_radio' => 'ays_see_result_button', 'loader_font_size' => '64', 'show_answers_numbering' => 'none', 'poll_box_shadow_x_offset' => 0, 'poll_box_shadow_y_offset' => 0, 'poll_box_shadow_z_offset' => 15, 'poll_question_size_pc' => 16, 'poll_question_size_mobile' => 16, 'poll_question_image_object_fit' => "cover", 'poll_title_font_size' => 20, 'poll_title_font_size_mobile' => 20, 'poll_title_font_weight' => "normal", 'poll_title_font_weight_mobile' => "normal", 'poll_title_alignment' => "center", 'poll_title_alignment_mobile' => "center", 'poll_title_text_transform' => "none", 'poll_text_type_length_enable' => "off", 'poll_text_type_limit_type' => "characters", 'poll_text_type_limit_length' => "", 'poll_text_type_limit_message' => "off", 'poll_text_type_placeholder' => "Your answer", 'poll_text_type_width' => "", 'poll_text_type_width_type' => "percent", 'poll_enable_password' => "off", 'poll_password' => "", 'poll_enable_password_visibility' => "off", 'poll_password_message' => 'Please enter password', 'poll_answer_enable_box_shadow' => "off", 'poll_answer_box_shadow_color' => "#000000", 'poll_answer_box_shadow_x_offset' => 0, 'poll_answer_box_shadow_y_offset' => 0, 'poll_answer_box_shadow_z_offset' => 10, 'poll_answer_border_radius' => 0, 'poll_enable_answer_image_after_voting' => "off", 'enable_poll_title_text_shadow' => 'off', 'poll_title_text_shadow' => 'rgba(255,255,255,0)', 'poll_title_text_shadow_x_offset' => 2, 'poll_title_text_shadow_y_offset' => 2, 'poll_title_text_shadow_z_offset' => 0, 'display_fields_labels' => 'off', 'autofill_user_data' => 'off', 'poll_create_author' => $user_id, 'poll_main_url' => '', 'poll_logo_url_new_tab' => 'off', 'show_chart_type' => 'google_bar_chart', ); $settings_options = $this->settings_obj->ays_get_setting('options'); if($settings_options){ $settings_options = json_decode($settings_options, true); }else{ $settings_options = array(); } $loader_iamge_allow = array( 'span' => array( 'class' => array() ), 'img' => array( 'src' => array(), 'class' => array() ) ); switch ( $action ) { case 'add': $heading =esc_html__('Add new poll', "poll-maker"); $options = array_merge($default_options, $default_colors); $loader_iamge = ""; // Default category $poll_default_cat = isset($settings_options['default_category']) && !empty($settings_options['default_category']) ? explode("," , $settings_options['default_category']) : array("1"); $poll['categories'] = $poll_default_cat; // Default type $poll_default_type = isset($settings_options['default_type']) && $settings_options['default_type'] != '' ? esc_attr($settings_options['default_type']) : "choosing"; $poll['type'] = $poll_default_type; $ays_check_post = ''; break; case 'edit': $heading =esc_html__('Edit poll', "poll-maker"); $loader_iamge = ""; $poll = $this->polls_obj->get_poll_by_id($id); $post_id = !empty($poll) ? $poll['post_id'] : ''; $ays_check_post = isset($poll['styles']['ays_add_post_for_poll']) ? $poll['styles']['ays_add_post_for_poll'] : 'off'; $ays_poll_view_post_url = get_permalink($post_id); $ays_poll_edit_post_url = get_edit_post_link($post_id); if (empty($poll)) { $url = esc_url_raw(remove_query_arg(array('action', 'poll'))); wp_safe_redirect($url); } $options = array_merge($default_options, (isset($poll['styles']) ? $poll['styles'] : array())); break; default: $url = esc_url_raw(remove_query_arg(array('action', 'poll'))); wp_safe_redirect($url); break; } $enable_pass_count = $options['enable_pass_count']; $categories = $this->polls_obj->get_categories(); global $wp_roles; $ays_users_roles = $wp_roles->roles; if (isset($_POST['ays_submit']) || isset($_POST['ays_submit_top'])) { $this->polls_obj->add_or_edit_polls($_POST, $id); } if (isset($_POST['ays_apply_top']) || isset($_POST['ays_apply'])) { $this->polls_obj->add_or_edit_polls($_POST, $id, "apply"); } if (isset($_POST['ays_poll_cancel']) || isset($_POST['ays_poll_cancel_top']) ) { unset($_GET['page']); $url = remove_query_arg( array_keys($_GET) ); wp_redirect( $url ); } $style = "display: none;"; $style_bg = "display: none;"; $style_bg_options = "display: none;"; $style_logo = "display: none;"; $style_logo_check = false; if (isset($poll['image']) && !empty($poll['image'])) { $style = "display: block;"; $image_text =esc_html__('Edit Image', "poll-maker"); } if (isset($options['bg_image']) && !empty($options['bg_image'])) { $style_bg = "display: flex;"; $style_bg_options = "display: block;"; $image_text_bg =esc_html__('Edit Image', "poll-maker"); } if (isset($options['logo_image']) && !empty($options['logo_image'])) { $style_logo = "display: block;"; $style_logo_check = true; $image_text_logo =esc_html__('Edit Image', "poll-maker"); } $published = $options['published']; if (!empty($options['activeInterval']) && !empty($options['deactiveInterval'])) { $activateTime = strtotime($options['activeInterval']); $activePoll = date('Y-m-d', $activateTime); $deactivateTime = strtotime($options['deactiveInterval']); $deactivePoll = date('Y-m-d', $deactivateTime); } else { $activePoll = date('Y-m-d'); $deactivePoll = date('Y-m-d'); } $activePollSec = isset($options['activeIntervalSec']) && !empty($options['activeIntervalSec']) ? $options['activeIntervalSec'] : ''; $deactivePollSec = isset($options['deactiveIntervalSec']) && !empty($options['deactiveIntervalSec']) ? $options['deactiveIntervalSec'] : ''; $activePoll = $activePoll . " " . $activePollSec; $deactivePoll = $deactivePoll . " " . $deactivePollSec; $randomize_answers = (isset($options['randomize_answers']) && $options['randomize_answers'] == 'on') ? true : false; $all_fields = array( array( "name" =>esc_html__("Name", "poll-maker"), "slug" => "apm_name", ), array( "name" =>esc_html__("Email", "poll-maker"), "slug" => "apm_email", ), array( "name" =>esc_html__("Phone", "poll-maker"), "slug" => "apm_phone", ), ); //INTEGRATIONS $poll_settings = $this->settings_obj; $asnwers_sound = (isset($settings_options['answers_sound']) && $settings_options['answers_sound'] != '') ? true : false; $answer_default_count = (isset($settings_options['answer_default_count']) && $settings_options['answer_default_count'] != '') ? $settings_options['answer_default_count'] : 2; $answers_sound_status = false; if($asnwers_sound){ $answers_sound_status = true; } // WP Editor height $poll_wp_editor_height = (isset($settings_options['poll_wp_editor_height']) && $settings_options['poll_wp_editor_height'] != '') ? absint( sanitize_text_field($settings_options['poll_wp_editor_height']) ) : 100 ; // Answers sound option $options['enable_asnwers_sound'] = isset($options['enable_asnwers_sound']) ? $options['enable_asnwers_sound'] : 'off'; $enable_asnwers_sound = (isset($options['enable_asnwers_sound']) && $options['enable_asnwers_sound'] == "on") ? true : false; $mailchimp_res = ($poll_settings->ays_get_setting('mailchimp') === false) ? json_encode(array()) : $poll_settings->ays_get_setting('mailchimp'); $mailchimp = json_decode($mailchimp_res, true); $mailchimp_username = isset($mailchimp['username']) ? $mailchimp['username'] : ''; $mailchimp_api_key = isset($mailchimp['apiKey']) ? $mailchimp['apiKey'] : ''; $mailchimp_lists = $mailchimp_api_key ? $this->ays_get_mailchimp_lists($mailchimp_username, $mailchimp_api_key) : array(); $mailchimp_select = array(); if (!empty($mailchimp_lists) && isset($mailchimp_lists['total_items']) && $mailchimp_lists['total_items'] > 0) { foreach ( $mailchimp_lists['lists'] as $list ) { $mailchimp_select[] = array( 'listId' => $list['id'], 'listName' => $list['name'] ); } } else { $mailchimp_select =esc_html__("There are no lists", "poll-maker"); } // MailChimp $enable_mailchimp = (isset($options['enable_mailchimp']) && $options['enable_mailchimp'] == 'on') ? true : false; $mailchimp_list = (isset($options['mailchimp_list'])) ? $options['mailchimp_list'] : ''; $fields = !empty($options['fields']) ? explode(",", $options['fields']) : array(); $required_fields = !empty($options['required_fields']) ? explode(",", $options['required_fields']) : array(); // Show votes count $options['show_votes_count'] = isset($options['show_votes_count']) ? $options['show_votes_count'] : 1; $showvotescount = isset($options['show_votes_count']) && intval($options['show_votes_count']) == 1 ? true : false; // Show result percent $options['show_res_percent'] = isset($options['show_res_percent']) ? $options['show_res_percent'] : 1; $show_res_percent = isset($options['show_res_percent']) && intval($options['show_res_percent']) == 1 ? true : false; // Show result button after schedule $options['show_result_btn_schedule'] = isset($options['show_result_btn_schedule']) ? $options['show_result_btn_schedule'] : 0; $showresbtnschedule = isset($options['show_result_btn_schedule']) && intval($options['show_result_btn_schedule']) == 1 ? true : false; $show_res_btn = isset($options['show_result_btn_see_schedule']) && !empty($options['show_result_btn_see_schedule']) ? $options['show_result_btn_see_schedule'] : 'with_see'; $schedule_show_timer = isset($options['ays_poll_show_timer']) && intval($options['ays_poll_show_timer']) == 1 ? true : false; $show_timer_type = isset($options['ays_show_timer_type']) && !empty($options['ays_show_timer_type'])? $options['ays_show_timer_type'] : 'countdown'; $show_bottom_timer = isset($options['show_bottom_timer']) && intval($options['show_bottom_timer']) == 1 ? true : false; // Show login form for not logged in users $options['show_login_form'] = isset($options['show_login_form']) ? $options['show_login_form'] : 'off'; $show_login_form = (isset($options['show_login_form'] ) && $options['show_login_form'] == "on") ? true : false; // Redirect after voting $options['redirect_users'] = isset($options['redirect_users']) ? $options['redirect_users'] : 0; $redirect_users = (isset($options['redirect_users']) && $options['redirect_users'] == 1) ? true : false; // Results notification by email $options['notify_email_on'] = isset($options['notify_email_on']) ? $options['notify_email_on'] : 0; $notify_email_on = (isset($options['notify_email_on']) && $options['notify_email_on'] == 1) ? true : false; // Background gradient $options['enable_background_gradient'] = (!isset($options['enable_background_gradient'])) ? 'off' : $options['enable_background_gradient']; $enable_background_gradient = (isset($options['enable_background_gradient']) && $options['enable_background_gradient'] == 'on') ? true : false; $background_gradient_color_1 = (isset($options['background_gradient_color_1']) && $options['background_gradient_color_1'] != '' && $enable_background_gradient) ? $options['background_gradient_color_1'] : '#103251'; $background_gradient_color_2 = (isset($options['background_gradient_color_2']) && $options['background_gradient_color_2'] != '' && $enable_background_gradient) ? $options['background_gradient_color_2'] : '#607593'; $poll_gradient_direction = (isset($options['poll_gradient_direction']) && $options['poll_gradient_direction'] != '') ? $options['poll_gradient_direction'] : 'vertical'; // Redirect after submit $options['redirect_after_submit'] = (!isset($options['redirect_after_submit'])) ? 0 : $options['redirect_after_submit']; $redirect_after_submit = (isset($options['redirect_after_submit']) && $options['redirect_after_submit'] == 1) ? true : false; $submit_redirect_url = isset($options['ays_submit_redirect_url']) ? $options['ays_submit_redirect_url'] : ''; // $submit_redirect_delay = isset($options['submit_redirect_delay']) ? $options['submit_redirect_delay'] : ''; $users_role = (isset($options['users_role']) && $options['users_role'] != "") ? json_decode($options['users_role'], true) : array(); $options['enable_answer_style'] = isset($options['enable_answer_style']) ? $options['enable_answer_style'] : 'on'; // $poll_create_date = (isset($options['create_date']) && $options['create_date'] != '') ? $options['create_date'] : "0000-00-00 00:00:00"; $change_creation_date = (isset($options['create_date']) && $options['create_date'] != '') ? $options['create_date'] : current_time( 'mysql' ); // Bg image positioning $poll_bg_image_position = (isset($options['poll_bg_image_position']) && $options['poll_bg_image_position'] != '') ? $options['poll_bg_image_position'] : "center center"; $poll_bg_img_in_finish_page = (isset($options['poll_bg_img_in_finish_page']) && $options['poll_bg_img_in_finish_page'] == "on") ? true : false; if(isset($options['author']) && $options['author'] != 'null'){ if ( ! is_array( $options['author'] ) ) { $options['author'] = json_decode($options['author'], true); $poll_author = $options['author']; } else { $poll_author = array_map( 'stripslashes', $options['author'] ); } } else { $poll_author = array('name' => 'Unknown'); } $show_create_date = (isset($options['show_create_date']) && $options['show_create_date'] == 1) ? true : false; $show_author = (isset($options['show_author']) && $options['show_author'] == 1) ? true : false; $custom_class = (isset($options['custom_class']) && $options['custom_class'] != "") ? $options['custom_class'] : ''; // Results bar in RGBA $options['result_in_rgba'] = isset($options['result_in_rgba']) ? $options['result_in_rgba'] : 'off'; $result_in_rgba = (isset($options['result_in_rgba']) && $options['result_in_rgba'] == "on") ? true : false; // Enable View more button $options['enable_view_more_button'] = isset($options['enable_view_more_button']) ? $options['enable_view_more_button'] : 'off'; $enable_view_more_button = (isset($options['enable_view_more_button']) && $options['enable_view_more_button'] == 'on' ) ? true : false; $poll_view_more_button_count = (isset($options['poll_view_more_button_count']) && $options['poll_view_more_button_count'] != '' ) ? absint(intval($options['poll_view_more_button_count'])) : 0; // Poll Min Height $poll_min_height = (isset($options['poll_min_height']) && $options['poll_min_height'] != '') ? absint(intval($options['poll_min_height'])) : ''; // Poll answer font size $poll_answer_font_size = (isset($options['answer_font_size']) && $options['answer_font_size'] != '') ? esc_html($options['answer_font_size']) : '15'; // Poll answers font size on mobile $poll_answer_font_size_mobile = (isset($options['poll_answer_font_size_mobile']) && $options['poll_answer_font_size_mobile'] != '') ? esc_attr($options['poll_answer_font_size_mobile']) : '16'; // Poll show passed users $poll_show_passed_users = isset($options['show_passed_users']) ? esc_html($options['show_passed_users']) : 'off'; $poll_show_passed_users_checked = isset($poll_show_passed_users) && $poll_show_passed_users == 'on' ? 'checked' : ''; $poll_show_passed_users_count = isset($options['poll_show_passed_users_count']) && $options['poll_show_passed_users_count'] != "" ? intval(esc_attr($options['poll_show_passed_users_count'])) : 3; // Poll Logo image $poll_logo_image = isset($options['logo_image']) && $options['logo_image'] != '' ? esc_url($options['logo_image']) : ''; $poll_check_logo = isset($poll_logo_image) && $poll_logo_image != '' ? true : false; $poll_logo_img = $poll_check_logo ? 'ays_logo_image_on' : 'display_none'; $poll_logo_for_live_container = $poll_check_logo ? 'ays_logo_cont_image_on' : ''; // $checking_answer_hover_live = ($options['disable_answer_hover'] == 1) ? 'disable_hover' : 'ays_enable_hover'; // Poll schedule container on/off $poll_check_exp_cont = (isset($options['dont_show_poll_cont']) && $options['dont_show_poll_cont'] == 'on') ? 'checked' : ''; // Poll see results button in limitations $poll_see_result_button = (isset($options['see_result_button']) && $options['see_result_button'] == 'on') ? 'checked' : ''; $poll_see_result_button_check = (isset($options['see_result_button']) && $options['see_result_button'] == 'on') ? true : false; $poll_see_result_button_cont = (isset($options['see_result_button']) && $options['see_result_button'] != 'on') ? 'ays_poll_display_none' : ''; $poll_see_result_radio = (isset($options['see_result_radio']) && $options['see_result_radio'] != '') ? esc_attr($options['see_result_radio']) : 'ays_see_result_button'; $poll_see_result_botton_show = isset($poll_see_result_radio) && $poll_see_result_radio == 'ays_see_result_button' ? 'checked' : ''; $poll_see_result_immediately = isset($poll_see_result_radio) && $poll_see_result_radio == 'ays_see_result_immediately' ? 'checked' : ''; // Loader font size $poll_loader_font_size = (isset($options['loader_font_size']) && $options['loader_font_size'] != '') ? esc_attr($options['loader_font_size']) : '64'; $poll_loader_size_enable = isset($options['load_effect']) && $options['load_effect'] == "load_gif" ? "" : "display_none"; $poll_loader_size_line_enable = isset($options['load_effect']) && $options['load_effect'] == "load_gif" ? "" : "ays_hr_display_none"; // Show answers numbering $show_answers_numbering = (isset($options['show_answers_numbering']) && sanitize_text_field( $options['show_answers_numbering'] ) != '') ? sanitize_text_field( $options['show_answers_numbering'] ) : 'none'; // Default border color $main_color = isset($options['main_color']) && $options['main_color'] != "" ? $options['main_color'] : $default_colors['main_color']; $default_border = isset($options['border_color']) && $options['border_color'] != "" ? $options['border_color'] : $main_color; // Poll load effect message $poll_effect_message = isset($options['effect_message']) && $options['effect_message'] != "" ? $options['effect_message'] : ""; // Poll title $poll_title = isset($poll['title']) && $poll['title'] != "" ? stripslashes(htmlentities($poll['title'])) : "Default title"; // Box shadow coords // Box Shadow X offset $poll_box_shadow_x_offset = (isset($options['poll_box_shadow_x_offset']) && $options['poll_box_shadow_x_offset'] != '' && $options['poll_box_shadow_x_offset'] != 0 ) ? intval( esc_attr( $options['poll_box_shadow_x_offset'] ) ) : 0; // Box Shadow Y offset $poll_box_shadow_y_offset = (isset($options['poll_box_shadow_y_offset']) && $options['poll_box_shadow_y_offset'] != '' && $options['poll_box_shadow_y_offset'] != 0 ) ? intval( esc_attr( $options['poll_box_shadow_y_offset'] ) ) : 0; // Box Shadow Z offset $poll_box_shadow_z_offset = (isset($options['poll_box_shadow_z_offset']) && $options['poll_box_shadow_z_offset'] != '' && $options['poll_box_shadow_z_offset'] != 0 ) ? intval( esc_attr( $options['poll_box_shadow_z_offset'] ) ) : 15; // Poll Vote Reason $poll_vote_reason = (isset($options['poll_vote_reason']) && $options['poll_vote_reason'] == 'on' ) ? "checked" : ""; // Allow multivote $poll_allow_multivote = isset($options['poll_allow_multivote']) && $options['poll_allow_multivote'] == 'on' ? "checked" : ""; // Enable multivote answer $poll_enable_multivote_answer = $poll_allow_multivote == "checked" ? true : false; // Minimum count for multivote answer $poll_multivote_min_count = (isset($options['multivote_answer_min_count']) && $options['multivote_answer_min_count'] != '') ? intval(esc_attr($options['multivote_answer_min_count'])) : '1'; // Count for multivote answer $poll_multivote_answer_count = (isset($options['poll_allow_multivote_count']) && $options['poll_allow_multivote_count'] != '') ? intval(esc_attr($options['poll_allow_multivote_count'])) : '1'; // Allow collect user info $poll_allow_collecting_users_data = (isset($options['poll_allow_collecting_users_data']) && $options['poll_allow_collecting_users_data'] == 'on') ? "checked" : ""; // Show answers icon $poll_answer_icon_check = (isset($options['poll_answer_icon_check']) && $options['poll_answer_icon_check'] == 'on') ? true : false; // Poll answer icon $poll_answer_icon = isset($options['poll_answer_icon']) ? $options['poll_answer_icon'] : 'radio'; // Every Answer redirect delay $poll_every_answer_redirect_delay = isset($options['poll_every_answer_redirect_delay']) && $options['poll_every_answer_redirect_delay'] != "" ? esc_attr($options['poll_every_answer_redirect_delay']) : ""; // Enable answer redirect delay $poll_enable_answer_redirect_delay = isset($options['poll_enable_answer_redirect_delay']) && $options['poll_enable_answer_redirect_delay'] == "on" ? true : false; // Show Answers image after voting $poll_enable_answer_image_after_voting = isset($options['poll_enable_answer_image_after_voting']) && $options['poll_enable_answer_image_after_voting'] == "on" ? true : false; // Poll logo image url $poll_logo_image_url = isset($options['poll_logo_url']) && $options['poll_logo_url'] != "" ? esc_attr($options['poll_logo_url']) : ""; // Check if the poll logo URL is enabled $poll_logo_image_url_check = isset($options['poll_enable_logo_url']) && $options['poll_enable_logo_url'] == "on" ? true : false; // Poll question font size $poll_question_font_size_pc = isset($options['poll_question_size_pc']) && $options['poll_question_size_pc'] != "" ? esc_attr($options['poll_question_size_pc']) : 16; // Poll question font size for mobile $poll_question_font_size_mobile = isset($options['poll_question_size_mobile']) && $options['poll_question_size_mobile'] != "" ? esc_attr($options['poll_question_size_mobile']) : 16; // Poll question image height $poll_question_image_height = isset($options['poll_question_image_height']) && $options['poll_question_image_height'] != "" ? esc_attr($options['poll_question_image_height']) : ""; // Poll container max-width for mobile $poll_mobile_max_width = (isset($options['poll_mobile_max_width']) && $options['poll_mobile_max_width'] != "") ? esc_attr($options['poll_mobile_max_width']) : ''; // ==== BUTTON STYLES START ==== // Buttons font size $poll_buttons_font_size = (isset($options['poll_buttons_font_size']) && $options['poll_buttons_font_size'] != "") ? esc_attr($options['poll_buttons_font_size']) : '17'; // Buttons text color $poll_button_text_color = (isset($options['button_text_color']) && $options['button_text_color'] != "") ? $options['button_text_color'] : $options['bg_color']; // Buttons background color $poll_button_bg_color = (isset($options['button_bg_color']) && $options['button_bg_color'] != "") ? $options['button_bg_color'] : $main_color; // Buttons mobile font size $poll_buttons_mobile_font_size = (isset($options['poll_buttons_mobile_font_size']) && $options['poll_buttons_mobile_font_size'] != "") ? esc_attr($options['poll_buttons_mobile_font_size']) : '17'; // Buttons Left / Right padding $poll_buttons_left_right_padding = (isset($options['poll_buttons_left_right_padding']) && $options['poll_buttons_left_right_padding'] != '') ? esc_attr($options['poll_buttons_left_right_padding']) : '20'; // Buttons Top / Bottom padding $poll_buttons_top_bottom_padding = (isset($options['poll_buttons_top_bottom_padding']) && $options['poll_buttons_top_bottom_padding'] != '') ? esc_attr($options['poll_buttons_top_bottom_padding']) : '10'; // Buttons border radius $poll_buttons_border_radius = (isset($options['poll_buttons_border_radius']) && $options['poll_buttons_border_radius'] != "") ? esc_attr($options['poll_buttons_border_radius']) : '3'; // Buttons Width $poll_buttons_width = (isset($options['poll_buttons_width']) && $options['poll_buttons_width'] != "") ? esc_attr($options['poll_buttons_width']) : ''; // Buttons mobile width $poll_buttons_mobile_width = (isset($options['poll_buttons_mobile_width']) && $options['poll_buttons_mobile_width'] != "") ? esc_attr($options['poll_buttons_mobile_width']) : $poll_buttons_width; $poll_button_selected = isset($options['poll_buttons_size']) && $options['poll_buttons_size'] != "" ? esc_attr($options['poll_buttons_size']) : ""; // ==== BUTTON STYLES END ==== // ==== Allow Answer options ==== // Allow custom answer $poll_allow_answer = (isset($options['poll_allow_answer']) && $options['poll_allow_answer'] == "on") ? "checked" : ""; // Require admin approval $poll_allow_answer_require = (isset($options['poll_allow_answer_require']) && $options['poll_allow_answer_require'] == "on") ? "checked" : ""; // ==== ==== // Poll answer view type $poll_answer_view_type = (isset($options['poll_answer_view_type']) && $options['poll_answer_view_type'] != "") ? esc_attr($options['poll_answer_view_type']) : "list"; // Poll answer image height $poll_answer_image_height = (isset($options['poll_answer_image_height']) && $options['poll_answer_image_height'] != "") ? esc_attr($options['poll_answer_image_height']) : "150"; // Poll answer image height for mobile $poll_answer_image_height_for_mobile = (isset($options['poll_answer_image_height_for_mobile']) && $options['poll_answer_image_height_for_mobile'] != "") ? esc_attr($options['poll_answer_image_height_for_mobile']) : "150"; // Poll answer image border radius $poll_answer_image_border_radius = (isset($options['poll_answer_image_border_radius']) && $options['poll_answer_image_border_radius'] != "") ? esc_attr($options['poll_answer_image_border_radius']) : 0; // Poll question image object fit $poll_question_image_object_fit = (isset($options['poll_question_image_object_fit']) && $options['poll_question_image_object_fit'] != "") ? esc_attr($options['poll_question_image_object_fit']) : "cover"; // Poll answer image object fit $poll_answer_object_fit = (isset($options['poll_answer_object_fit']) && $options['poll_answer_object_fit'] != "") ? esc_attr($options['poll_answer_object_fit']) : "cover"; // Poll answer padding $poll_answer_padding = (isset($options['poll_answer_padding']) && $options['poll_answer_padding'] != "") ? esc_attr($options['poll_answer_padding']) : "10"; // Poll 1 column in mobile $options['answers_grid_column_mobile'] = isset($options['answers_grid_column_mobile']) ? $options['answers_grid_column_mobile'] : 'on'; $answers_grid_column_mobile = (isset($options['answers_grid_column_mobile']) && $options['answers_grid_column_mobile'] == 'on') ? true : false; // Poll answer gap $poll_answer_margin = (isset($options['poll_answer_margin']) && $options['poll_answer_margin'] != "") ? esc_attr($options['poll_answer_margin']) : "10"; // Poll title font size $poll_title_font_size = (isset($options['poll_title_font_size']) && $options['poll_title_font_size'] != "") ? absint(intval(esc_attr($options['poll_title_font_size']))) : "20"; // Poll title font size for mobile $poll_title_font_size_mobile = (isset($options['poll_title_font_size_mobile']) && $options['poll_title_font_size_mobile'] != "") ? absint(intval(esc_attr($options['poll_title_font_size_mobile']))) : "20"; // Poll title font weight $poll_title_font_weight = (isset($options['poll_title_font_weight']) && $options['poll_title_font_weight'] != "") ? esc_attr($options['poll_title_font_weight']) : "normal"; // Poll title font weight mobile $poll_title_font_weight_mobile = (isset($options['poll_title_font_weight_mobile']) && $options['poll_title_font_weight_mobile'] != "") ? esc_attr($options['poll_title_font_weight_mobile']) : $poll_title_font_weight; // Poll title alignment $poll_title_alignment = ( isset($options['poll_title_alignment']) && $options['poll_title_alignment'] != "" ) ? esc_attr($options['poll_title_alignment']) : "center"; // Poll title alignment mobile $poll_title_alignment_mobile = ( isset($options['poll_title_alignment_mobile']) && $options['poll_title_alignment_mobile'] != "" ) ? esc_attr($options['poll_title_alignment_mobile']) : $poll_title_alignment; // Poll title text transform $poll_title_text_transform = ( isset($options['poll_title_text_transform']) && $options['poll_title_text_transform'] != "" ) ? esc_attr($options['poll_title_text_transform']) : "none"; // Poll view type $poll_view_type_for_text = ( isset($poll['view_type']) && $poll['view_type'] == "paragraph" ) ? "paragraph" : "short_text"; $options['show_votes_before_voting'] = isset($options['show_votes_before_voting']) ? $options['show_votes_before_voting'] : 'off'; $show_votes_before_voting = (isset($options['show_votes_before_voting']) && $options['show_votes_before_voting'] == 'on') ? true : false; $show_votes_before_voting_by = (isset($options['show_votes_before_voting_by']) && $options['show_votes_before_voting_by'] != '') ? $options['show_votes_before_voting_by'] : 'by_count'; // ===== Poll text type options start ===== $poll_text_type_length_enable = ( isset($options['poll_text_type_length_enable']) && $options['poll_text_type_length_enable'] == "on" ) ? true : false; $poll_text_type_limit_type = ( isset($options['poll_text_type_limit_type']) && $options['poll_text_type_limit_type'] != "" ) ? esc_attr($options['poll_text_type_limit_type']) : "characters"; $poll_text_type_limit_length = ( isset($options['poll_text_type_limit_length']) && $options['poll_text_type_limit_length'] != "" ) ? esc_attr($options['poll_text_type_limit_length']) : ""; $poll_text_type_limit_message = ( isset($options['poll_text_type_limit_message']) && $options['poll_text_type_limit_message'] == "on" ) ? true : false; $poll_text_type_placeholder = ( isset($options['poll_text_type_placeholder']) && $options['poll_text_type_placeholder'] != "" ) ? stripslashes(esc_attr($options['poll_text_type_placeholder'])) : ""; $poll_text_type_width = ( isset($options['poll_text_type_width']) && $options['poll_text_type_width'] != "" ) ? stripslashes(esc_attr($options['poll_text_type_width'])) : ""; $poll_text_type_width_type = ( isset($options['poll_text_type_width_type']) && $options['poll_text_type_width_type'] != "" ) ? esc_attr($options['poll_text_type_width_type']) : "percent"; // ===== Poll text type options end ===== $poll_enable_password = ( isset($options['poll_enable_password']) && $options['poll_enable_password'] == "on" ) ? true : false; // Enable toggle password visibility $options['poll_enable_password_visibility'] = isset($options['poll_enable_password_visibility']) ? $options['poll_enable_password_visibility'] : 'off'; $poll_enable_password_visibility = (isset($options['poll_enable_password_visibility']) && $options['poll_enable_password_visibility'] == 'on') ? true : false; $poll_password = ( isset($options['poll_password']) && $options['poll_password'] != "" ) ? stripslashes(esc_attr($options['poll_password'])) : ""; $poll_password_message = ( isset($options['poll_password_message']) && $options['poll_password_message'] != "" ) ? stripslashes($options['poll_password_message']) : "Please enter password"; // == Poll answer box shadow == // Poll answer box shadow enable $poll_answer_enable_box_shadow = (isset($options['poll_answer_enable_box_shadow']) && $options['poll_answer_enable_box_shadow'] == "on") ? true : false; // Poll answer box shadow color $poll_answer_box_shadow_color = (isset($options['poll_answer_box_shadow_color']) && $options['poll_answer_box_shadow_color'] != "") ? esc_attr($options['poll_answer_box_shadow_color']) : "#000000"; // answer hover color $answer_hover_color = (isset($options['answer_hover_color']) && $options['answer_hover_color'] != "") ? esc_attr($options['answer_hover_color']) : $options['text_color']; // answer bg color $answer_bg_color = (isset($options['answer_bg_color']) && $options['answer_bg_color'] != "") ? esc_attr($options['answer_bg_color']) : "rgba(255,255,255,0)"; // Poll answer box shadow parameters $poll_answer_box_shadow_x_offset = (isset($options['poll_answer_box_shadow_x_offset']) && $options['poll_answer_box_shadow_x_offset'] != "") ? intval($options['poll_answer_box_shadow_x_offset']) : 0; $poll_answer_box_shadow_y_offset = (isset($options['poll_answer_box_shadow_y_offset']) && $options['poll_answer_box_shadow_y_offset'] != "") ? intval($options['poll_answer_box_shadow_y_offset']) : 0; $poll_answer_box_shadow_z_offset = (isset($options['poll_answer_box_shadow_z_offset']) && $options['poll_answer_box_shadow_z_offset'] != "") ? intval($options['poll_answer_box_shadow_z_offset']) : 10; // Poll answer box shadow color $poll_answer_border_radius = (isset($options['poll_answer_border_radius']) && $options['poll_answer_border_radius'] != "") ? esc_attr($options['poll_answer_border_radius']) : 0; $poll_social_buttons = isset($options['show_social']) && $options['show_social'] ? true : false; $poll_social_buttons_heading = ( isset( $options[ 'poll_social_buttons_heading' ] ) && $options[ 'poll_social_buttons_heading' ] != '' ) ? stripslashes( wpautop( $options[ 'poll_social_buttons_heading' ] ) ) : ''; $poll_show_social_ln = isset($options['poll_show_social_ln']) && $options['poll_show_social_ln'] == "on" ? true : false; $poll_show_social_fb = isset($options['poll_show_social_fb']) && $options['poll_show_social_fb'] == "on" ? true : false; $poll_show_social_tr = isset($options['poll_show_social_tr']) && $options['poll_show_social_tr'] == "on" ? true : false; $poll_show_social_vk = isset($options['poll_show_social_vk']) && $options['poll_show_social_vk'] == "on" ? true : false; // Title text shadow $options['enable_poll_title_text_shadow'] = (isset($options['enable_poll_title_text_shadow']) && $options['enable_poll_title_text_shadow'] == 'on') ? 'on' : 'off'; $enable_poll_title_text_shadow = (isset($options['enable_poll_title_text_shadow']) && $options['enable_poll_title_text_shadow'] == 'on') ? true : false; $poll_title_text_shadow = (isset($options['poll_title_text_shadow']) && $options['poll_title_text_shadow'] != '') ? stripslashes( esc_attr( $options['poll_title_text_shadow'] ) ) : 'rgba(255,255,255,0)'; $poll_title_text_shadow_x_offset = (isset($options['poll_title_text_shadow_x_offset']) && $options['poll_title_text_shadow_x_offset'] != '') ? stripslashes( esc_attr( $options['poll_title_text_shadow_x_offset'] ) ) : 2; $poll_title_text_shadow_y_offset = (isset($options['poll_title_text_shadow_y_offset']) && $options['poll_title_text_shadow_y_offset'] != '') ? stripslashes( esc_attr( $options['poll_title_text_shadow_y_offset'] ) ) : 2; $poll_title_text_shadow_z_offset = (isset($options['poll_title_text_shadow_z_offset']) && $options['poll_title_text_shadow_z_offset'] != '') ? stripslashes( esc_attr( $options['poll_title_text_shadow_z_offset'] ) ) : 0; // Display form fields labels $options['display_fields_labels'] = isset($options['display_fields_labels']) ? sanitize_text_field($options['display_fields_labels']) : 'off'; $display_fields_labels = (isset($options['display_fields_labels']) && $options['display_fields_labels'] == 'on') ? true : false; // Autofill user data $options['autofill_user_data'] = isset($options['autofill_user_data']) ? sanitize_text_field($options['autofill_user_data']) : 'off'; $autofill_user_data = (isset($options['autofill_user_data']) && $options['autofill_user_data'] == 'on') ? true : false; // Change the author of the current poll $change_poll_create_author = (isset($options['poll_create_author']) && $options['poll_create_author'] != '') ? absint( sanitize_text_field( $options['poll_create_author'] ) ) : $user_id; $get_current_poll_author_data = get_userdata($change_poll_create_author); // Poll main url $poll_main_url = (isset($options['poll_main_url']) && $options['poll_main_url'] != '') ? stripslashes( esc_url($options['poll_main_url']) ) : ''; //Open logo URL in new tab $poll_logo_image_url_check_new_tab = (isset($options['poll_logo_url_new_tab' ]) && $options['poll_logo_url_new_tab' ] == 'on') ? "checked" : ""; //Poll Logo title $poll_logo_title = (isset( $options['poll_logo_title' ] ) && $options['poll_logo_title' ] != '') ? esc_attr( $options['poll_logo_title' ] ) : ''; //Poll mobile width $width_for_mobile = (isset($options['width_for_mobile' ]) && $options['width_for_mobile' ] != '') ? $options['width_for_mobile' ] : ''; // Social Media links $enable_social_links = (isset($options['enable_social_links']) && $options['enable_social_links'] == "on") ? true : false; $social_links = (isset($options['social_links'])) ? $options['social_links'] : array( 'linkedin_link' => '', 'facebook_link' => '', 'twitter_link' => '', 'vkontakte_link' => '', 'instagram_link' => '', 'youtube_link' => '', 'tiktok_link' => '', ); $linkedin_link = isset($social_links['linkedin_link']) && $social_links['linkedin_link'] != '' ? $social_links['linkedin_link'] : ''; $facebook_link = isset($social_links['facebook_link']) && $social_links['facebook_link'] != '' ? $social_links['facebook_link'] : ''; $twitter_link = isset($social_links['twitter_link']) && $social_links['twitter_link'] != '' ? $social_links['twitter_link'] : ''; $vkontakte_link = isset($social_links['vkontakte_link']) && $social_links['vkontakte_link'] != '' ? $social_links['vkontakte_link'] : ''; $youtube_link = isset($social_links['youtube_link']) && $social_links['youtube_link'] != '' ? $social_links['youtube_link'] : ''; $tiktok_link = isset($social_links['tiktok_link']) && $social_links['tiktok_link'] != '' ? $social_links['tiktok_link'] : ''; $instagram_link = isset($social_links['instagram_link']) && $social_links['instagram_link'] != '' ? $social_links['instagram_link'] : ''; $poll_social_links_heading = ( isset( $options[ 'poll_social_links_heading' ] ) && $options[ 'poll_social_links_heading' ] != '' ) ? stripslashes( wpautop( $options[ 'poll_social_links_heading' ] ) ) : ''; $show_chart_type = (isset($options['show_chart_type']) && $options['show_chart_type'] != "") ? $options['show_chart_type'] : 'google_bar_chart'; $show_chart_type_google_height = (isset($options['show_chart_type_google_height']) && $options['show_chart_type_google_height'] != "") ? $options['show_chart_type_google_height'] : 400; $next_poll_id = ""; $prev_poll_id = ''; if ( isset( $id ) && !is_null( $id ) ) { $next_poll = $this->get_next_or_prev_row_by_id( $id, "next", "ayspoll_polls" ); $next_poll_id = (isset( $next_poll['id'] ) && $next_poll['id'] != "") ? absint( $next_poll['id'] ) : null; $prev_poll = $this->get_next_or_prev_row_by_id( $id, "prev", "ayspoll_polls" ); $prev_poll_id = (isset( $prev_poll['id'] ) && $prev_poll['id'] != "") ? absint( $prev_poll['id'] ) : null; } $get_all_polls = Poll_Maker_Data::get_all_polls(); ?> ", "", "", "", "", ); ?>

1):?>

1):?>
$var_name): if( intval($var_name['id']) == $id ){continue;} $var_counter++; ?>

" onClick="selectElementContents(this)" style="font-size:16px; font-style:normal;">


'ays-button-top-apply', 'title' => 'Ctrl + s', 'data-toggle' => 'tooltip', 'data-delay'=> '{"show":"1000"}' ); submit_button( esc_html__('Save', "poll-maker"), 'ays-bottom-menu-buttons', 'ays_apply_top', false, $save_attributes); $save_close_attributes = array('id' => 'ays-button-top'); submit_button( esc_html__('Save and close', "poll-maker"), 'primary ays-top-menu-save-and-close ays-bottom-menu-buttons', 'ays_submit_top', false, $save_close_attributes); submit_button( esc_html__('Cancel', "poll-maker"), 'ays-button ays-top-menu-cancel ays-bottom-menu-buttons', 'ays_poll_cancel_top', false, array()); ?>


$poll_wp_editor_height, 'textarea_name' => 'ays_poll_question', 'editor_class' => 'ays-textarea', 'media_buttons' => true, 'tinymce' => array( "init_instance_callback" => "function(editor) { editor.on('Change', function(e) { document.querySelector('.box-apm .ays_question').innerHTML = e.level.content; }); }", ) ); wp_editor($content, $editor_id, $settings); ?>

array( 'type' => array(), 'class' => array(), 'style' => array(), 'title' => array(), 'checked' => array() ) ); if (count($answers) > 0 && $poll['type'] == 'choosing') : foreach ($answers as $index => $answer) { $user_add_html = ''; $class = (($index + 1) % 2 == 0) ? "even" : ""; $answer_val = stripslashes(htmlentities($answer["answer"])); $answer_id = $answer["id"]; $answer_img_class = (isset($answer['answer_img']) && $answer['answer_img'] != '') ? 'display:block' : 'display:none;'; $answer_img = (isset($answer['answer_img']) && $answer['answer_img'] == '') ? '' : $answer['answer_img']; $answer_redirect = (isset($answer['redirect']) && $answer['redirect'] != '') ? esc_url($answer['redirect']) : ''; $user_added = (isset($answer['user_added']) && $answer['user_added'] == 1) ? true : false; $show_user_added = (isset($answer['show_user_added']) && $answer['show_user_added'] == 1) ? true : false; if ((isset($options['poll_allow_answer']) && $options['poll_allow_answer'] == "on") && (isset($options['poll_allow_answer_require']) && $options['poll_allow_answer_require'] == "on")) { $disable_show_user_added = ''; }else{ $disable_show_user_added = 'display: none;'; } $show_user_added_checkbox = ''; if ($show_user_added == 1) { $show_user_added_checkbox = 'checked'; } if ( $user_added ) { $user_add_html = ''; } if(isset($answer['show_user_added']) && $answer['show_user_added'] == 1){ $check_show_user_added = "1"; }elseif (isset($answer['show_user_added']) && $answer['show_user_added'] == 0) { $check_show_user_added = "0"; }else{ $check_show_user_added = "1"; } if($loop_iteration == $rows_count - 1){ $ays_key_enter = "ays_poll_enter_key"; } $loop_iteration++; ?>
">

/>

>
>
/>
$answer) { if($answer['user_added'] == 1) { $is_user_added_exist++; } } if($is_user_added_exist > 0): ?>
>



>
>
>

>
>

>
>


/>


>
>
>






" id="ays-poll-bg-img"/> "/> "/>


/>

>
">

">
">

/>

" id="ays-poll-logo-img" class="ays_poll_logo_image_main" width="55" height="55"/> "/>

">
">
>
">
" >

">
">
>

">
">








/>



%






>

/>

value='on'/>

>
">


>




















{$poll['title']}
"; $content .= "
" . stripslashes($poll['question']) . "
"; $content .= !empty($poll['image']) ? "" : ""; $checking_answer_hover = ($options['disable_answer_hover'] == 1) ? 'disable_hover' : 'ays_enable_hover'; $content .= "
"; $minimalTheme = ($poll['theme_id'] == 3) ? 'ays_poll_minimal_theme' : '' ; $minimalThemeBtn = ($poll['theme_id'] == 3) ? 'ays_poll_minimal_theme_btn' : '' ; if ($poll_answer_icon_check && $poll['theme_id'] != 3) { switch ($poll_answer_icon) { case 'radio': $answer_icon_class = 'ays_poll_answer_icon_radio'; break; case 'checkbox': $answer_icon_class = 'ays_poll_answer_icon_checkbox'; break; default: $answer_icon_class = ''; break; } }else{ $answer_icon_class = ''; } switch ( $poll['type'] ) { case 'choosing': if(empty($poll['answers'])){ for ($i = 0 ; $i < $answer_default_count ; $i++){ $content .= "
"; } } else{ foreach ( $poll['answers'] as $index => $answer ) { $answer_image = isset($answer['answer_img']) && $answer['answer_img'] != "" ? "
" : ""; $poll_class_for_answer_label = ""; $poll_class_for_answer_label_text = ""; if($answer_image != ""){ $poll_class_for_answer_label = "ays_poll_label_without_padding"; $poll_class_for_answer_label_text = "ays_poll_label_text_with_padding"; } $content .= "
"; } } break; case 'voting': $poll_view_type_voting = isset($poll['view_type']) && $poll['view_type'] != "" ? $poll['view_type'] : "hand"; switch ( $poll_view_type_voting ) { case 'hand': foreach ( $poll['answers'] as $index => $answer ) { $content .= "
"; } break; case 'emoji': foreach ( $poll['answers'] as $index => $answer ) { $content .= "
"; } break; default: break; } break; case 'rating': $poll_view_type_rating = isset($poll['view_type']) && $poll['view_type'] != "" ? $poll['view_type'] : "star"; switch ( $poll_view_type_rating ) { case 'star': foreach ( $poll['answers'] as $index => $answer ) { $content .= "
"; } break; case 'emoji': foreach ( $poll['answers'] as $index => $answer ) { $content .= "
"; } break; default: break; } break; case 'text': $poll_view_type_text = isset($poll['view_type']) && $poll['view_type'] != "" ? $poll['view_type'] : "short_text"; switch ( $poll_view_type_text ) { case 'short_text': $content .= "
"; break; case 'paragraph': $content .= "
"; break; default: break; } break; default: break; } $content .= "
'; $content .= "
"; if($poll_check_logo){ $content .= ""; } $content .= "
"; $content .='
'; print wp_kses_post($content); ?>




/>
/>

HTML code */ wp_kses_post(__('Create a new category %s here %s', 'poll-maker')), '', '' )); ?>







>

/>
/>
/>





>

>

>

>
/>
/>

>

$poll_wp_editor_height, 'textarea_name' => 'active_date_message_soon', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

$poll_wp_editor_height, 'textarea_name' => 'active_date_message', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

>

>

>

/>

/>
" size="25">

" size="15">

/>

/>

>

/>

>
>
/>



/>


/>
/>
/>
/>
/>

$poll_wp_editor_height, 'textarea_name' => 'ays_limitation_message', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>



>
>
>


/>
$poll_wp_editor_height, 'textarea_name' => 'ays_enable_logged_users_message', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

/>

/>

$poll_wp_editor_height, 'textarea_name' => 'restriction_pass_message', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

>
">
/>

$poll_wp_editor_height, 'textarea_name' => 'ays_poll_password_message', 'editor_class' => 'ays-textarea', 'media_elements' => false); wp_editor($content, $editor_id, $settings); ?>


100, 'textarea_name' => 'vote_limit_message', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor('This feature is available only in PRO version!!!', 'editor_id', $settings); ?>



$poll_wp_editor_height, 'textarea_name' => 'ays-poll-info-form-text', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

>
>
">
>

> >


>

>



0): ?>
plugin_name-settings&ays_poll_tab=tab2'>".esc_html__("this", "poll-maker")."" ) ); ?>
/>

plugin_name-settings&ays_poll_tab=tab2'>".esc_html__("this", "poll-maker")."" ) ); ?>








array( 'id' => array(), 'class' => array() ), 'option' => array( 'value' => array(), 'selected' => array() ) ); $mad_mimi_select = ""; echo wp_kses($mad_mimi_select, $allowed_tags); ?>


array( 'id' => array(), 'class' => array(), 'name' => array() ), 'option' => array( 'value' => array(), 'selected' => array(), 'disabled' => array() ) ); $mad_mimi_select = ""; echo wp_kses($mad_mimi_select, $allowed_tags); ?>








>

>
$poll_wp_editor_height, 'textarea_name' => 'ays-poll-hide-results-text', 'editor_class' => 'ays-textarea', 'media_elements' => false ); wp_editor($content, $editor_id, $settings); ?>

>
'.esc_html__("Thank you!", "poll-maker") .'

' : ''; echo $poll_message_vars_html; $content = wpautop(stripslashes((isset($options['result_message'])) ? $options['result_message'] : $res_def_message)); $editor_id = 'ays_result_message'; $settings = array('editor_height' => $poll_wp_editor_height, 'textarea_name' => 'ays_result_message', 'editor_class' => 'ays-textarea', 'media_elements' => false); wp_editor($content, $editor_id, $settings); ?>


>

id="plg_default" value="plg_default">
id="plg_1" value="plg_1">
id="plg_2" value="plg_2">
id="plg_3" value="plg_3">
id="plg_4" value="plg_4">
id="plg_5" value="plg_5">


/>

>
$poll_wp_editor_height, 'textarea_name' => 'ays_poll_social_buttons_heading', 'editor_class' => 'ays-textarea', 'media_elements' => false); wp_editor($content, $editor_id, $settings); ?>

/>

/>

/>

/>

/>
$poll_wp_editor_height, 'textarea_name' => 'ays_poll_social_links_heading', 'editor_class' => 'ays-textarea', 'media_elements' => false); wp_editor($content, $editor_id, $settings); ?>








>

>
">

>
">

>






array( 'class' => true ), 'table' => array( 'class' => true ), 'thead' => array(), 'tbody' => array(), 'tr' => array( 'class' => true ), 'th' => array(), 'td' => array( 'class' => true ), 'span' => array(), 'input' => array( 'type' => true, 'name' => true, 'class' => true, 'value' => true, 'hidden' => true ), 'textarea' => array( 'type' => true, 'name' => true, 'class' => true ), 'label' => array( 'class' => true, 'for' => true ), 'a' => array( 'href' => true, 'class' => true ), 'img' => array( 'src' => true, 'class' => true ) ); $content = '
'; $content .= ''; $content .= '
'. esc_html__('Answers', "poll-maker").' '. esc_html__('Text', "poll-maker").' '. esc_html__('Image', "poll-maker").'
'. esc_html__("Answer 1", "poll-maker").'
'. esc_html__("Answer 2", "poll-maker").'
'; echo wp_kses($content, $allowed_tags); ?>

'ays-button-apply', 'title' => 'Ctrl + s', 'data-toggle' => 'tooltip', 'data-delay'=> '{"show":"1000"}' ); submit_button( esc_html__('Save', "poll-maker"), 'ays-bottom-menu-buttons', 'ays_apply', false, $save_bottom_attributes); $save_close_bottom_attributes = array('id' => 'ays-button'); submit_button( esc_html__('Save and close', "poll-maker"), 'primary ays-button ays-loader-banner ays-bottom-menu-save-and-close ays-bottom-menu-buttons', 'ays_submit', false, $save_close_bottom_attributes); submit_button( esc_html__('Cancel', "poll-maker"), 'ays-button ays_poll_cancel_bottom ays-bottom-menu-buttons', 'ays_poll_cancel', false, array()); ?>

" data-type="">
×