PluginProbe
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls / 6.4.9
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls v6.4.9
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 5.6.6 5.6.7 All 152 releases
poll-maker / poll-maker-ays.php

poll-maker-ays.php in Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls 6.4.9, at poll-maker-ays.php

226 lines 14.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 ob_start();
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://ays-pro.com/
12 * @since 1.0.0
13 * @package Poll_Maker_Ays
14 *
15 * @wordpress-plugin
16 * Plugin Name: Poll Maker
17 * Plugin URI: https://ays-pro.com/wordpress/poll-maker/
18 * Description: Poll Maker is a powerful plugin for creating custom polls and gathering opinions. It lets you design and share polls quickly to engage your audience and collect feedback.
19 * Version: 6.4.9
20 * Author: Poll Maker Team
21 * Author URI: https://ays-pro.com/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: poll-maker
25 * Domain Path: /languages
26 */
27
28 // If this file is called directly, abort.
29 if (!defined('WPINC')) {
30 die;
31 }
32
33 /**
34 * Currently plugin version.
35 * Start at version 1.0.0 and use SemVer - https://semver.org
36 * Rename this for your plugin and update it as you release new versions.
37 */
38 define('POLL_MAKER_AYS_VERSION', '6.4.9');
39 define('POLL_MAKER_AYS_NAME', 'poll-maker-ays');
40
41 if (!defined('POLL_MAKER_AYS_DIR')) {
42 define('POLL_MAKER_AYS_DIR', plugin_dir_path(__FILE__));
43 }
44
45 if (!defined('POLL_MAKER_AYS_BASE_URL')) {
46 define('POLL_MAKER_AYS_BASE_URL', plugin_dir_url(__FILE__));
47 }
48 if (!defined('POLL_MAKER_AYS_ADMIN_URL')) {
49 define('POLL_MAKER_AYS_ADMIN_URL', plugin_dir_url(__FILE__) . 'admin');
50 }
51
52 if (!defined('POLL_MAKER_AYS_PUBLIC_URL')) {
53 define('POLL_MAKER_AYS_PUBLIC_URL', plugin_dir_url(__FILE__) . 'public');
54 }
55
56 if( ! defined( 'POLL_MAKER_AYS_BASENAME' ) ) {
57 define( 'POLL_MAKER_AYS_BASENAME', plugin_basename( __FILE__ ) );
58 }
59
60 /**
61 * The code that runs during plugin activation.
62 * This action is documented in includes/class-poll-maker-ays-activator.php
63 */
64 function activate_poll_maker_ays() {
65 require_once plugin_dir_path(__FILE__) . 'includes/class-poll-maker-ays-activator.php';
66 Poll_Maker_Ays_Activator::ays_poll_update_db_check();
67 }
68
69 /**
70 * The code that runs during plugin deactivation.
71 * This action is documented in includes/class-poll-maker-ays-deactivator.php
72 */
73 function deactivate_poll_maker_ays() {
74 require_once plugin_dir_path(__FILE__) . 'includes/class-poll-maker-ays-deactivator.php';
75 Poll_Maker_Ays_Deactivator::deactivate();
76 }
77
78 register_activation_hook(__FILE__, 'activate_poll_maker_ays');
79 register_deactivation_hook(__FILE__, 'deactivate_poll_maker_ays');
80
81 add_action('plugins_loaded', 'activate_poll_maker_ays');
82 /**
83 * The core plugin class that is used to define internationalization,
84 * admin-specific hooks, and public-facing site hooks.
85 */
86 require plugin_dir_path(__FILE__) . 'includes/class-poll-maker-ays.php';
87
88 /**
89 * The Gutenberg block registration.
90 */
91 require plugin_dir_path(__FILE__) . 'poll/poll-maker-block.php';
92
93
94 if (!function_exists('array_column')) {
95 function array_column( array $array, $columnKey, $indexKey = null ) {
96 $result = array();
97 foreach ( $array as $subArray ) {
98 if (!is_array($subArray)) {
99 continue;
100 } elseif (is_null($indexKey) && array_key_exists($columnKey, $subArray)) {
101 $result[] = $subArray[$columnKey];
102 } elseif (array_key_exists($indexKey, $subArray)) {
103 if (is_null($columnKey)) {
104 $result[$subArray[$indexKey]] = $subArray;
105 } elseif (array_key_exists($columnKey, $subArray)) {
106 $result[$subArray[$indexKey]] = $subArray[$columnKey];
107 }
108 }
109 }
110
111 return $result;
112 }
113 }
114
115 /**
116 * Begins execution of the plugin.
117 *
118 * Since everything within the plugin is registered via hooks,
119 * then kicking off the plugin from this point in the file does
120 * not affect the page life cycle.
121 *
122 * @since 1.0.0
123 */
124 function run_poll_maker_ays() {
125 add_action('admin_notices', 'poll_maker_admin_notice');
126 $plugin = new Poll_Maker_Ays();
127 $plugin->run();
128
129 }
130
131 function poll_maker_activation_redirect_method( $plugin ) {
132 if( $plugin == plugin_basename( __FILE__ ) ) {
133 exit( wp_redirect( admin_url( 'admin.php?page=' . POLL_MAKER_AYS_NAME ) ) );
134 }
135 }
136
137 function poll_maker_admin_notice() {
138 if (isset($_GET['page']) && strpos($_GET['page'], POLL_MAKER_AYS_NAME) !== false) {
139 ?>
140
141 <div class="ays-notice-banner">
142 <div class="navigation-bar">
143 <div id="navigation-container">
144 <div class="ays-poll-logo-container-upgrade">
145 <div class="logo-container">
146 <a href="https://ays-pro.com/wordpress/poll-maker?utm_source=dashboard&utm_medium=poll-free&utm_campaign=poll-maker-top-banner-logo-link-<?php echo esc_attr( POLL_MAKER_AYS_VERSION ); ?>" target="_blank" style="box-shadow: none;">
147 <img class="poll-logo" src="<?php echo esc_attr(POLL_MAKER_AYS_ADMIN_URL) . '/images/icons/icon-poll-128x128.png'; ?>" alt="<?php echo esc_html__( "Poll Maker", "poll-maker" ); ?>" title="<?php echo esc_html__( "Poll Maker", "poll-maker" ); ?>"/>
148 </a>
149 </div>
150
151 <div class="ays-poll-top-banner-title">
152 <span class="ays-poll-top-banner-main-title"><?php echo esc_html__( "Poll Maker by AYS", 'poll-maker' ); ?></span>
153 <span class="ays-poll-top-banner-sub-title"><?php echo esc_html__( "Build online interactive polls", 'poll-maker' ); ?></span>
154 </div>
155 <div class="ays-poll-upgrade-container">
156 <a href="https://ays-pro.com/wordpress/poll-maker?utm_source=dashboard&utm_medium=poll-free&utm_campaign=poll-top-banner-upgrade-button-<?php echo esc_attr( POLL_MAKER_AYS_VERSION ); ?>" target="_blank" class="poll-maker-upgrade-to-pro">
157 <img src="<?php echo esc_url(POLL_MAKER_AYS_ADMIN_URL) . '/images/icons/lightning-white.svg' ?>" class="poll-maker-upgrade-white-icon">
158 <span><?php echo esc_html__( "Upgrade", "poll-maker" ); ?></span>
159 </a>
160 <span class="ays-poll-logo-container-one-time-text"><?php echo esc_html__( "One-time payment", "poll-maker" ); ?></span>
161 </div>
162 </div>
163 <ul id="menu">
164 <li class="modile-ddmenu-lg"><a class="ays-btn" href="https://ays-pro.com/wordpress/poll-maker/?utm_source=dashboard&utm_medium=poll-free&utm_campaign=poll-top-banner-pricing-link-<?php echo esc_attr( POLL_MAKER_AYS_VERSION ); ?>" target="_blank"><?php echo esc_html__( "Pricing", 'poll-maker' ); ?></a></li>
165 <li class="modile-ddmenu-lg"><a class="ays-btn" href="https://poll-plugin.com/wordpress-poll-plugin-free-demo/" target="_blank"><?php echo esc_html__( "Demo", 'poll-maker' ); ?></a></li>
166 <li class="modile-ddmenu-lg"><a class="ays-btn" href="https://wordpress.org/support/plugin/poll-maker/" target="_blank"><?php echo esc_html__( "Free Support", 'poll-maker' ); ?></a></li>
167 <li class="ays_poll_take_gift"><a class="ays-btn" href="https://poll-plugin.com/poll-coupon-code-as-a-gift/" target="_blank"><?php echo esc_html__( "Get 50% discount", 'poll-maker' ); ?></a></li>
168 <li class="modile-ddmenu-lg"><a class="ays-btn" href="https://ays-pro.com/contact" target="_blank"><?php echo esc_html__( "Contact us", 'poll-maker' ); ?></a></li>
169 <li class="modile-ddmenu-md">
170 <a class="toggle_ddmenu" href="javascript:void(0);"><i class="ays_poll_fa ays_fa_ellipsis_h"></i></a>
171 <ul class="ddmenu" data-expanded="false">
172 <li><a class="ays-btn" href="https://ays-pro.com/wordpress/poll-maker/?utm_source=dashboard&utm_medium=poll-free&utm_campaign=poll-top-banner-pricing-link-<?php echo esc_attr( POLL_MAKER_AYS_VERSION ); ?>" target="_blank"><?php echo esc_html__( "Pricing", 'poll-maker' ); ?></a></li>
173 <li class="ays_poll_take_gift"><a class="ays-btn" href="https://poll-plugin.com/poll-coupon-code-as-a-gift/" target="_blank"><?php echo esc_html__( "Get 50% discount", 'poll-maker' ); ?></a></li>
174 <li><a class="ays-btn" href="https://poll-plugin.com/wordpress-poll-plugin-free-demo/" target="_blank"><?php echo esc_html__( "Demo", 'poll-maker' ); ?></a></li>
175 <li><a class="ays-btn" href="https://wordpress.org/support/plugin/poll-maker/" target="_blank"><?php echo esc_html__( "Free Support", 'poll-maker' ); ?></a></li>
176 <li><a class="ays-btn" href="https://ays-pro.com/contact" target="_blank"><?php echo esc_html__( "Contact us", 'poll-maker' ); ?></a></li>
177 </ul>
178 </li>
179 <li class="modile-ddmenu-sm">
180 <a class="toggle_ddmenu" href="javascript:void(0);"><i class="ays_poll_fa ays_fa_ellipsis_h"></i></a>
181 <ul class="ddmenu" data-expanded="false">
182 <li><a class="ays-btn" href="https://ays-pro.com/wordpress/poll-maker/?utm_source=dashboard&utm_medium=poll-free&utm_campaign=poll-top-banner-pricing-link-<?php echo esc_attr( POLL_MAKER_AYS_VERSION ); ?>" target="_blank"><?php echo esc_html__( "Pricing", 'poll-maker' ); ?></a></li>
183 <li><a class="ays-btn" href="https://poll-plugin.com/wordpress-poll-plugin-free-demo/" target="_blank"><?php echo esc_html__( "Demo", 'poll-maker' ); ?></a></li>
184 <li><a class="ays-btn" href="https://wordpress.org/support/plugin/poll-maker/" target="_blank"><?php echo esc_html__( "Free Support", 'poll-maker' ); ?></a></li>
185 <li class="ays_poll_take_gift"><a class="ays-btn" href="https://poll-plugin.com/poll-coupon-code-as-a-gift/" target="_blank"><?php echo esc_html__( "Get 50% discount", 'poll-maker' ); ?></a></li>
186 <li><a class="ays-btn" href="https://ays-pro.com/contact" target="_blank"><?php echo esc_html__( "Contact us", 'poll-maker' ); ?></a></li>
187 </ul>
188 </li>
189 </ul>
190 <div class="ays-poll-checklist-open-icon" style="<?php echo (1 == 0 ) ? 'display: none;' : ''; ?>" title="<?php echo esc_html__( "Checklist", 'poll-maker' ); ?>">
191 <svg width="18" height="24" viewBox="0 0 18 24" fill="none" xmlns="http://www.w3.org/2000/svg">
192 <g clip-path="url(#clip0_130_42)">
193 <path d="M9 0C7.26094 0 5.83125 1.3125 5.64375 3H5.25C4.27031 3 3.43594 3.62812 3.12656 4.5H3C1.34531 4.5 0 5.84531 0 7.5V21C0 22.6547 1.34531 24 3 24H15C16.6547 24 18 22.6547 18 21V7.5C18 5.84531 16.6547 4.5 15 4.5H14.8734C14.5641 3.62812 13.7297 3 12.75 3H12.3563C12.1688 1.3125 10.7391 0 9 0ZM0.75 7.5C0.75 6.25781 1.75781 5.25 3 5.25V6C3 6.82969 3.67031 7.5 4.5 7.5H13.5C14.3297 7.5 15 6.82969 15 6V5.25C16.2422 5.25 17.25 6.25781 17.25 7.5V21C17.25 22.2422 16.2422 23.25 15 23.25H3C1.75781 23.25 0.75 22.2422 0.75 21V7.5ZM6.375 3.375C6.375 1.92656 7.55156 0.75 9 0.75C10.4484 0.75 11.625 1.92656 11.625 3.375C11.625 3.58125 11.7937 3.75 12 3.75H12.75C13.5797 3.75 14.25 4.42031 14.25 5.25V6C14.25 6.4125 13.9125 6.75 13.5 6.75H4.5C4.0875 6.75 3.75 6.4125 3.75 6V5.25C3.75 4.42031 4.42031 3.75 5.25 3.75H6C6.20625 3.75 6.375 3.58125 6.375 3.375ZM9 4.5C9.19891 4.5 9.38968 4.42098 9.53033 4.28033C9.67098 4.13968 9.75 3.94891 9.75 3.75C9.75 3.55109 9.67098 3.36032 9.53033 3.21967C9.38968 3.07902 9.19891 3 9 3C8.80109 3 8.61032 3.07902 8.46967 3.21967C8.32902 3.36032 8.25 3.55109 8.25 3.75C8.25 3.94891 8.32902 4.13968 8.46967 4.28033C8.61032 4.42098 8.80109 4.5 9 4.5ZM7.39219 11.1422C7.5375 10.9969 7.5375 10.7578 7.39219 10.6125C7.24687 10.4672 7.00781 10.4672 6.8625 10.6125L4.5 12.9703L3.64219 12.1078C3.49687 11.9625 3.25781 11.9625 3.1125 12.1078C2.96719 12.2531 2.96719 12.4922 3.1125 12.6375L4.2375 13.7625C4.38281 13.9078 4.62187 13.9078 4.76719 13.7625L7.39219 11.1375V11.1422ZM9 12.375C9 12.5813 9.16875 12.75 9.375 12.75H14.625C14.8313 12.75 15 12.5813 15 12.375C15 12.1687 14.8313 12 14.625 12H9.375C9.16875 12 9 12.1687 9 12.375ZM7.5 18C7.5 18.2063 7.66875 18.375 7.875 18.375H14.625C14.8313 18.375 15 18.2063 15 18C15 17.7937 14.8313 17.625 14.625 17.625H7.875C7.66875 17.625 7.5 17.7937 7.5 18ZM4.5 18.75C4.69891 18.75 4.88968 18.671 5.03033 18.5303C5.17098 18.3897 5.25 18.1989 5.25 18C5.25 17.8011 5.17098 17.6103 5.03033 17.4697C4.88968 17.329 4.69891 17.25 4.5 17.25C4.30109 17.25 4.11032 17.329 3.96967 17.4697C3.82902 17.6103 3.75 17.8011 3.75 18C3.75 18.1989 3.82902 18.3897 3.96967 18.5303C4.11032 18.671 4.30109 18.75 4.5 18.75Z" fill="black"/>
194 </g>
195 <defs>
196 <clipPath id="clip0_130_42">
197 <rect width="18" height="24" fill="white"/>
198 </clipPath>
199 </defs>
200 </svg>
201 </div>
202 <div class="ays-poll-checklist-popup" style="display:none; position: absolute; top: 80px; right: 0; background: #111; color: #fff; padding: 16px; border-radius: 6px; z-index: 9999; max-width: 250px;">
203 <div style="position: absolute; top: -10px; right: 20px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid #111;"></div>
204 <strong><?php echo esc_html__( "Looking for your Launchpad Checklist?", 'poll-maker' ); ?></strong>
205 <p><?php echo esc_html__( "Click the launch icon to continue setting up your poll.", 'poll-maker' ); ?></p>
206 <button class="ays-poll-checklist-popup-close" style="background-color: #07acc1; color: #fff; padding: 5px 10px; border: none; border-radius: 4px; cursor: pointer;"><?php echo esc_html__( "Got it", 'poll-maker' ); ?></button>
207 </div>
208 </div>
209 </div>
210 </div>
211
212 <!-- Ask a question box start -->
213 <div class="ays_ask_question_content">
214 <div class="ays_ask_question_content_inner">
215 <a href="https://wordpress.org/support/plugin/poll-maker" class="ays_poll_question_link" target="_blank">
216 <span class="ays-ask-question-content-inner-question-mark-text">?</span>
217 <span class="ays-ask-question-content-inner-hidden-text"><?php echo esc_html__( "Ask a question", 'poll-maker' ); ?></span>
218 </a>
219 </div>
220 </div>
221 <!-- Ask a question box end -->
222 <?php
223 }
224 }
225
226 run_poll_maker_ays();