| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* The admin-specific functionality of the plugin. |
| 5 |
* |
| 6 |
* @link http://ays-pro.com/ |
| 7 |
* @since 1.0.0 |
| 8 |
* |
| 9 |
* @package Survey_Maker |
| 10 |
* @subpackage Survey_Maker/includes |
| 11 |
*/ |
| 12 |
|
| 13 |
/** |
| 14 |
* The admin-specific functionality of the plugin. |
| 15 |
* |
| 16 |
* Defines the plugin name, version, and two examples hooks for how to |
| 17 |
* enqueue the admin-specific stylesheet and JavaScript. |
| 18 |
* |
| 19 |
* @package Survey_Maker |
| 20 |
* @subpackage Survey_Maker/includes |
| 21 |
* @author AYS Pro LLC <[email protected]> |
| 22 |
*/ |
| 23 |
class Survey_Maker_Integrations |
| 24 |
{ |
| 25 |
|
| 26 |
/** |
| 27 |
* The ID of this plugin. |
| 28 |
* |
| 29 |
* @since 1.0.0 |
| 30 |
* @access private |
| 31 |
* @var string $plugin_name The ID of this plugin. |
| 32 |
*/ |
| 33 |
private $plugin_name; |
| 34 |
|
| 35 |
/** |
| 36 |
* The version of this plugin. |
| 37 |
* |
| 38 |
* @since 1.0.0 |
| 39 |
* @access private |
| 40 |
* @var string $version The current version of this plugin. |
| 41 |
*/ |
| 42 |
private $version; |
| 43 |
|
| 44 |
private $capability; |
| 45 |
|
| 46 |
/** |
| 47 |
* The settings object of this plugin. |
| 48 |
* |
| 49 |
* @since 1.0.0 |
| 50 |
* @access private |
| 51 |
* @var object $settings_obj The settings object of this plugin. |
| 52 |
*/ |
| 53 |
private $settings_obj; |
| 54 |
|
| 55 |
/** |
| 56 |
* Initialize the class and set its properties. |
| 57 |
* |
| 58 |
* @since 1.0.0 |
| 59 |
* @param string $plugin_name The name of this plugin. |
| 60 |
* @param string $version The version of this plugin. |
| 61 |
*/ |
| 62 |
public function __construct($plugin_name, $version){ |
| 63 |
|
| 64 |
$this->plugin_name = $plugin_name; |
| 65 |
$this->version = $version; |
| 66 |
|
| 67 |
$this->settings_obj = new Survey_Maker_Settings_Actions($this->plugin_name); |
| 68 |
} |
| 69 |
|
| 70 |
// ===== INTEGRATIONS HOOKS ===== |
| 71 |
|
| 72 |
// Integrations survey page action hook |
| 73 |
public function ays_survey_page_integrations_content( $args ){ |
| 74 |
|
| 75 |
$integrations_contents = apply_filters( 'ays_sm_survey_page_integrations_contents', array(), $args ); |
| 76 |
|
| 77 |
$integrations = array(); |
| 78 |
|
| 79 |
foreach ($integrations_contents as $key => $integrations_content) { |
| 80 |
$content = '<fieldset>'; |
| 81 |
if(isset($integrations_content['title'])){ |
| 82 |
$content .= '<legend>'; |
| 83 |
if(isset($integrations_content['icon'])){ |
| 84 |
$content .= '<img class="ays_integration_logo" src="'. $integrations_content['icon'] .'" alt="">'; |
| 85 |
} |
| 86 |
$content .= '<h5>'. $integrations_content['title'] .'</h5></legend>'; |
| 87 |
} |
| 88 |
$content .= $integrations_content['content']; |
| 89 |
|
| 90 |
$content .= '</fieldset>'; |
| 91 |
|
| 92 |
$integrations[] = $content; |
| 93 |
} |
| 94 |
|
| 95 |
$integrations = implode('<hr/>', $integrations); |
| 96 |
echo html_entity_decode(esc_html( $integrations )); |
| 97 |
} |
| 98 |
|
| 99 |
// Integrations settings page action hook |
| 100 |
public function ays_settings_page_integrations_content( $args ){ |
| 101 |
|
| 102 |
$integrations_contents = apply_filters( 'ays_sm_settings_page_integrations_contents', array(), $args ); |
| 103 |
|
| 104 |
$integrations = array(); |
| 105 |
|
| 106 |
foreach ($integrations_contents as $key => $integrations_content) { |
| 107 |
$content = '<fieldset>'; |
| 108 |
if(isset($integrations_content['title'])){ |
| 109 |
$content .= '<legend>'; |
| 110 |
if(isset($integrations_content['icon'])){ |
| 111 |
$content .= '<img class="ays_integration_logo" src="'. $integrations_content['icon'] .'" alt="">'; |
| 112 |
} |
| 113 |
$content .= '<h5>'. $integrations_content['title'] .'</h5></legend>'; |
| 114 |
} |
| 115 |
if(isset($integrations_content['content'])){ |
| 116 |
$content .= $integrations_content['content']; |
| 117 |
} |
| 118 |
|
| 119 |
$content .= '</fieldset>'; |
| 120 |
|
| 121 |
$integrations[] = $content; |
| 122 |
} |
| 123 |
|
| 124 |
$integrations = implode('<hr/>', $integrations); |
| 125 |
echo html_entity_decode(esc_html( $integrations )); |
| 126 |
} |
| 127 |
|
| 128 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 129 |
//====================================================================================// |
| 130 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 131 |
|
| 132 |
// ===== MailChimp integration start ===== |
| 133 |
|
| 134 |
// MailChimp integration / survey page |
| 135 |
|
| 136 |
// MailChimp integration in survey page content |
| 137 |
public function ays_survey_page_mailchimp_content( $integrations, $args ){ |
| 138 |
|
| 139 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/mailchimp_logo.png'; |
| 140 |
$title = __('MailChimp Settings',"survey-maker"); |
| 141 |
|
| 142 |
$content = ''; |
| 143 |
|
| 144 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 145 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 146 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 147 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 148 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 149 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 150 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 151 |
$content .= __("Upgrade" , "survey-maker"); |
| 152 |
$content .= '</div>'; |
| 153 |
$content .= '</a>'; |
| 154 |
$content .= '</div>'; |
| 155 |
$content .= '<hr>'; |
| 156 |
$content .= '<div class="form-group row"> |
| 157 |
<div class="col-sm-4"> |
| 158 |
<label for="ays_enable_mailchimp">'. __('Enable MailChimp',"survey-maker") .'</label> |
| 159 |
</div> |
| 160 |
<div class="col-sm-1"> |
| 161 |
<input type="checkbox" checked class="ays-enable-timer1" id="ays_enable_mailchimp" value="on" >'; |
| 162 |
$content .= ' |
| 163 |
</div> |
| 164 |
</div> |
| 165 |
<hr> |
| 166 |
<div class="form-group row"> |
| 167 |
<div class="col-sm-4"> |
| 168 |
<label for="ays_mailchimp_list">'. __('MailChimp list',"survey-maker") .'</label> |
| 169 |
</div> |
| 170 |
<div class="col-sm-8">'; |
| 171 |
$content .= '<select id="ays_mailchimp_list">'; |
| 172 |
$content .= '<option value="" disabled selected>'. __( "Select list", "survey-maker" ) .'</option>'; |
| 173 |
$content .= '</select>'; |
| 174 |
$content .= '</div> |
| 175 |
</div> |
| 176 |
</div> |
| 177 |
</div>'; |
| 178 |
|
| 179 |
$integrations['mailchimp'] = array( |
| 180 |
'content' => $content, |
| 181 |
'icon' => $icon, |
| 182 |
'title' => $title, |
| 183 |
); |
| 184 |
|
| 185 |
return $integrations; |
| 186 |
} |
| 187 |
|
| 188 |
// MailChimp integration / settings page |
| 189 |
|
| 190 |
// MailChimp integration in General settings page content |
| 191 |
public function ays_settings_page_mailchimp_content( $integrations, $args ){ |
| 192 |
|
| 193 |
$actions = $this->settings_obj; |
| 194 |
|
| 195 |
$mailchimp_res = ($actions->ays_get_setting('mailchimp') === false) ? json_encode(array()) : $actions->ays_get_setting('mailchimp'); |
| 196 |
$mailchimp = json_decode($mailchimp_res, true); |
| 197 |
$mailchimp_username = isset($mailchimp['username']) ? $mailchimp['username'] : '' ; |
| 198 |
$mailchimp_api_key = isset($mailchimp['apiKey']) ? $mailchimp['apiKey'] : '' ; |
| 199 |
|
| 200 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/mailchimp_logo.png'; |
| 201 |
$title = __( 'MailChimp', "survey-maker" ); |
| 202 |
|
| 203 |
$content = ''; |
| 204 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 205 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 206 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 207 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 208 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 209 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 210 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 211 |
$content .= __("Upgrade" , "survey-maker"); |
| 212 |
$content .= '</div>'; |
| 213 |
$content .= '</a>'; |
| 214 |
$content .= '</div>'; |
| 215 |
$content .= '<div class="form-group row"> |
| 216 |
<div class="col-sm-12"> |
| 217 |
<div class="form-group row" aria-describedby="aaa"> |
| 218 |
<div class="col-sm-3"> |
| 219 |
<label for="ays_mailchimp_username">'. __( 'MailChimp Username', "survey-maker" ) .'</label> |
| 220 |
</div> |
| 221 |
<div class="col-sm-9"> |
| 222 |
<input type="text" |
| 223 |
class="ays-text-input" |
| 224 |
id="ays_mailchimp_username" |
| 225 |
name="ays_mailchimp_username" |
| 226 |
value="'. $mailchimp_username .'" |
| 227 |
/> |
| 228 |
</div> |
| 229 |
</div> |
| 230 |
<hr/> |
| 231 |
<div class="form-group row" aria-describedby="aaa"> |
| 232 |
<div class="col-sm-3"> |
| 233 |
<label for="ays_mailchimp_api_key">'. __( 'MailChimp API Key', "survey-maker" ) .'</label> |
| 234 |
</div> |
| 235 |
<div class="col-sm-9"> |
| 236 |
<input type="text" |
| 237 |
class="ays-text-input" |
| 238 |
id="ays_mailchimp_api_key" |
| 239 |
name="ays_mailchimp_api_key" |
| 240 |
value="'. $mailchimp_api_key .'" |
| 241 |
/> |
| 242 |
</div> |
| 243 |
</div> |
| 244 |
<blockquote>'; |
| 245 |
$content .= sprintf( __( "You can get your API key from your ", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://us20.admin.mailchimp.com/account/api/", "Account Extras menu" ); |
| 246 |
$content .= '</blockquote> |
| 247 |
</div> |
| 248 |
</div> |
| 249 |
</div> |
| 250 |
</div>'; |
| 251 |
|
| 252 |
$integrations['mailchimp'] = array( |
| 253 |
'content' => $content, |
| 254 |
'icon' => $icon, |
| 255 |
'title' => $title, |
| 256 |
); |
| 257 |
|
| 258 |
return $integrations; |
| 259 |
} |
| 260 |
|
| 261 |
// ===== MailChimp integration end ===== |
| 262 |
|
| 263 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 264 |
//====================================================================================// |
| 265 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 266 |
|
| 267 |
// ===== Campaign Monitor start ===== |
| 268 |
// Campaign Monitor integration / survey page |
| 269 |
|
| 270 |
// Campaign Monitor integration in survey page content |
| 271 |
public function ays_survey_page_camp_monitor_content($integrations, $args){ |
| 272 |
|
| 273 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/campaignmonitor_logo.png'; |
| 274 |
$title = __('Campaign Monitor Settings',"survey-maker"); |
| 275 |
$content = ''; |
| 276 |
|
| 277 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 278 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 279 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 280 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 281 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 282 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 283 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 284 |
$content .= __("Upgrade" , "survey-maker"); |
| 285 |
$content .= '</div>'; |
| 286 |
$content .= '</a>'; |
| 287 |
$content .= '</div>'; |
| 288 |
$content .= '<hr/> |
| 289 |
<div class="form-group row"> |
| 290 |
<div class="col-sm-4"> |
| 291 |
<label for="ays_enable_monitor">'.__('Enable Campaign Monitor', "survey-maker").'</label> |
| 292 |
</div> |
| 293 |
<div class="col-sm-1"> |
| 294 |
<input type="checkbox" checked class="ays-enable-timer1" id="ays_enable_monitor" value="on" /> |
| 295 |
</div> |
| 296 |
</div> |
| 297 |
<hr> |
| 298 |
<div class="form-group row"> |
| 299 |
<div class="col-sm-4"> |
| 300 |
<label for="ays_monitor_list">'.__('Campaign Monitor list', "survey-maker").'</label> |
| 301 |
</div> |
| 302 |
<div class="col-sm-8">'; |
| 303 |
$content .= '<select id="ays_monitor_list"> |
| 304 |
<option disabled selected>'.__("Select List", "survey-maker").'</option>'; |
| 305 |
$content .= '</select>'; |
| 306 |
$content .= ' |
| 307 |
</div> |
| 308 |
</div> |
| 309 |
</div>'; |
| 310 |
|
| 311 |
$integrations['monitor'] = array( |
| 312 |
'content' => $content, |
| 313 |
'icon' => $icon, |
| 314 |
'title' => $title, |
| 315 |
); |
| 316 |
|
| 317 |
return $integrations; |
| 318 |
} |
| 319 |
|
| 320 |
// Campaign Monitor integration / settings page |
| 321 |
|
| 322 |
// Campaign Monitor integration in General settings page |
| 323 |
public function ays_settings_page_campaign_monitor_content( $integrations, $args ){ |
| 324 |
$actions = $this->settings_obj; |
| 325 |
|
| 326 |
$monitor_res = ($actions->ays_get_setting('monitor') === false) ? json_encode(array()) : $actions->ays_get_setting('monitor'); |
| 327 |
$monitor = json_decode($monitor_res, true); |
| 328 |
$monitor_client = isset($monitor['client']) ? $monitor['client'] : ''; |
| 329 |
$monitor_api_key = isset($monitor['apiKey']) ? $monitor['apiKey'] : ''; |
| 330 |
|
| 331 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/campaignmonitor_logo.png'; |
| 332 |
$title = __( 'Campaign Monitor', "survey-maker" ); |
| 333 |
|
| 334 |
$content = ''; |
| 335 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 336 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 337 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 338 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 339 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 340 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 341 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 342 |
$content .= __("Upgrade" , "survey-maker"); |
| 343 |
$content .= '</div>'; |
| 344 |
$content .= '</a>'; |
| 345 |
$content .= '</div>'; |
| 346 |
$content .= '<div class="form-group row"> |
| 347 |
<div class="col-sm-12"> |
| 348 |
<div class="form-group row" aria-describedby="aaa"> |
| 349 |
<div class="col-sm-3"> |
| 350 |
<label for="ays_monitor_client">'. __( 'Campaign Monitor Client ID', "survey-maker" ) .'</label> |
| 351 |
</div> |
| 352 |
<div class="col-sm-9"> |
| 353 |
<input type="text" |
| 354 |
class="ays-text-input" |
| 355 |
id="ays_monitor_client" |
| 356 |
name="ays_monitor_client" |
| 357 |
value="'. $monitor_client .'" |
| 358 |
/> |
| 359 |
</div> |
| 360 |
</div> |
| 361 |
<hr/> |
| 362 |
<div class="form-group row" aria-describedby="aaa"> |
| 363 |
<div class="col-sm-3"> |
| 364 |
<label for="ays_monitor_api_key">'. __( 'Campaign Monitor API Key', "survey-maker" ) .'</label> |
| 365 |
</div> |
| 366 |
<div class="col-sm-9"> |
| 367 |
<input type="text" |
| 368 |
class="ays-text-input" |
| 369 |
id="ays_monitor_api_key" |
| 370 |
name="ays_monitor_api_key" |
| 371 |
value="'. $monitor_api_key .'" |
| 372 |
/> |
| 373 |
</div> |
| 374 |
</div> |
| 375 |
<blockquote>'; |
| 376 |
$content .= __( "You can get your API key and Client ID from your Account Settings page.", "survey-maker"); |
| 377 |
$content .= '</blockquote> |
| 378 |
</div> |
| 379 |
</div> |
| 380 |
</div> |
| 381 |
</div>'; |
| 382 |
|
| 383 |
$integrations['monitor'] = array( |
| 384 |
'content' => $content, |
| 385 |
'icon' => $icon, |
| 386 |
'title' => $title |
| 387 |
); |
| 388 |
|
| 389 |
return $integrations; |
| 390 |
} |
| 391 |
|
| 392 |
|
| 393 |
// ===== Campaign Monitor end ===== |
| 394 |
|
| 395 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 396 |
//====================================================================================// |
| 397 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 398 |
|
| 399 |
// ===== Zapier start ===== |
| 400 |
|
| 401 |
// Zapier integration / survey page |
| 402 |
|
| 403 |
// Zapier integration in survey page content |
| 404 |
public function ays_survey_page_zapier_content($integrations, $args){ |
| 405 |
|
| 406 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/zapier_logo.png'; |
| 407 |
$title = __('Zapier Settings',"survey-maker"); |
| 408 |
|
| 409 |
$content = ''; |
| 410 |
|
| 411 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 412 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 413 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 414 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 415 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 416 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 417 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 418 |
$content .= __("Upgrade" , "survey-maker"); |
| 419 |
$content .= '</div>'; |
| 420 |
$content .= '</a>'; |
| 421 |
$content .= '</div>'; |
| 422 |
$content .= '<hr/> |
| 423 |
<div class="form-group row"> |
| 424 |
<div class="col-sm-4"> |
| 425 |
<label for="ays_enable_zapier">'.__('Enable Zapier Integration', "survey-maker").'</label> |
| 426 |
</div> |
| 427 |
<div class="col-sm-1"> |
| 428 |
<input type="checkbox" class="ays-enable-timer1" id="ays_enable_zapier" value="on" > |
| 429 |
</div> |
| 430 |
<div class="col-sm-3"> |
| 431 |
<button type="button" id="testZapier" class="btn btn-outline-secondary">'.__("Send test data", "survey-maker").'</button> |
| 432 |
<a class="ays_help" data-toggle="tooltip" style="font-size: 16px;" |
| 433 |
title="'.__("We will send you a test data, and you can catch it in your ZAP for configure it.", "survey-maker").'"> |
| 434 |
<i class="ays_fa ays_fa_info_circle"></i> |
| 435 |
</a> |
| 436 |
</div> |
| 437 |
</div> |
| 438 |
</div> |
| 439 |
</div>'; |
| 440 |
|
| 441 |
$integrations['zapier'] = array( |
| 442 |
'content' => $content, |
| 443 |
'icon' => $icon, |
| 444 |
'title' => $title, |
| 445 |
); |
| 446 |
return $integrations; |
| 447 |
} |
| 448 |
|
| 449 |
// Zapier integration / settings page |
| 450 |
|
| 451 |
// Zapier integration in General settings page content |
| 452 |
public function ays_settings_page_zapier_content( $integrations, $args ){ |
| 453 |
$actions = $this->settings_obj; |
| 454 |
|
| 455 |
$zapier_res = ($actions->ays_get_setting('zapier') === false) ? json_encode(array()) : $actions->ays_get_setting('zapier'); |
| 456 |
$zapier = json_decode($zapier_res, true); |
| 457 |
$zapier_hook = isset($zapier['hook']) ? $zapier['hook'] : ''; |
| 458 |
|
| 459 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/zapier_logo.png'; |
| 460 |
$title = __( 'Zapier', "survey-maker" ); |
| 461 |
|
| 462 |
$content = ''; |
| 463 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 464 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 465 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 466 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 467 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 468 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 469 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 470 |
$content .= __("Upgrade" , "survey-maker"); |
| 471 |
$content .= '</div>'; |
| 472 |
$content .= '</a>'; |
| 473 |
$content .= '</div>'; |
| 474 |
$content .= '<div class="form-group row"> |
| 475 |
<div class="col-sm-12"> |
| 476 |
<div class="form-group row" aria-describedby="aaa"> |
| 477 |
<div class="col-sm-3"> |
| 478 |
<label for="ays_zapier_hook">'. __( 'Zapier Webhook URL', "survey-maker" ) .'</label> |
| 479 |
</div> |
| 480 |
<div class="col-sm-9"> |
| 481 |
<input type="text" |
| 482 |
class="ays-text-input" |
| 483 |
id="ays_zapier_hook" |
| 484 |
name="ays_zapier_hook" |
| 485 |
value="'. $zapier_hook .'" |
| 486 |
/> |
| 487 |
</div> |
| 488 |
</div> |
| 489 |
<blockquote>'; |
| 490 |
$content .= sprintf( __( "If you don't have any ZAP created, go", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://zapier.com/app/editor/", "here..." ); |
| 491 |
$content .= '</blockquote> |
| 492 |
<blockquote> |
| 493 |
'.__("We will send you all data from survey information form with the “AysSurvey” key by POST method.", "survey-maker").' |
| 494 |
</blockquote> |
| 495 |
</div> |
| 496 |
</div> |
| 497 |
</div> |
| 498 |
</div>'; |
| 499 |
|
| 500 |
$integrations['zapier'] = array( |
| 501 |
'content' => $content, |
| 502 |
'icon' => $icon, |
| 503 |
'title' => $title |
| 504 |
); |
| 505 |
|
| 506 |
return $integrations; |
| 507 |
} |
| 508 |
|
| 509 |
// ===== Zapier end ===== |
| 510 |
|
| 511 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 512 |
//====================================================================================// |
| 513 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 514 |
|
| 515 |
// ===== Active Campaign start ===== |
| 516 |
|
| 517 |
// Active Campaign integration / survey page |
| 518 |
|
| 519 |
// Active Campaign integration in survey page content |
| 520 |
public function ays_survey_page_active_camp_content($integrations, $args){ |
| 521 |
|
| 522 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/activecampaign_logo.png'; |
| 523 |
$title = __('ActiveCampaign Settings', "survey-maker"); |
| 524 |
|
| 525 |
$content = ''; |
| 526 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 527 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 528 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 529 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 530 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 531 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 532 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 533 |
$content .= __("Upgrade" , "survey-maker"); |
| 534 |
$content .= '</div>'; |
| 535 |
$content .= '</a>'; |
| 536 |
$content .= '</div>'; |
| 537 |
$content .= '<hr/> |
| 538 |
<div class="form-group row"> |
| 539 |
<div class="col-sm-4"> |
| 540 |
<label for="ays_enable_active_camp">'. __('Enable ActiveCampaign', "survey-maker") .'</label> |
| 541 |
</div> |
| 542 |
<div class="col-sm-1"> |
| 543 |
<input type="checkbox" checked class="ays-enable-timer1" id="ays_enable_active_camp" value="on"> |
| 544 |
</div> |
| 545 |
</div> |
| 546 |
<hr/> |
| 547 |
<div class="form-group row"> |
| 548 |
<div class="col-sm-4"> |
| 549 |
<label for="ays_active_camp_list">'.__('ActiveCampaign list', "survey-maker").'</label> |
| 550 |
</div> |
| 551 |
<div class="col-sm-8">'; |
| 552 |
$content .= '<select id="ays_active_camp_list"> |
| 553 |
<option value="" disabled selected>'. __("Select List", "survey-maker") .'</option> |
| 554 |
<option value="">'.__("Just create contact", "survey-maker").'</option>'; |
| 555 |
$content .= '</select></div>'; |
| 556 |
$content .= '</div><hr>'; |
| 557 |
$content .= ' |
| 558 |
<div class="form-group row"> |
| 559 |
<div class="col-sm-4"> |
| 560 |
<label for="ays_active_camp_automation">'.__("ActiveCampaign automation", "survey-maker").'</label> |
| 561 |
</div> |
| 562 |
<div class="col-sm-8">'; |
| 563 |
|
| 564 |
$content .= '<select id="ays_active_camp_automation"> |
| 565 |
<option value="" disabled selected>'.__("Select List", "survey-maker").'</option> |
| 566 |
<option value="">'.__("Just create contact", "survey-maker").'</option>'; |
| 567 |
$content .= '</select></div>'; |
| 568 |
$content .= '</div></div>'; |
| 569 |
|
| 570 |
$integrations['active_camp'] = array( |
| 571 |
'content' => $content, |
| 572 |
'icon' => $icon, |
| 573 |
'title' => $title, |
| 574 |
); |
| 575 |
|
| 576 |
return $integrations; |
| 577 |
} |
| 578 |
|
| 579 |
|
| 580 |
// Active Campaign integration / settings page |
| 581 |
|
| 582 |
// Active Campaign integration in Gengeral settings page content |
| 583 |
public function ays_settings_page_active_camp_content( $integrations, $args ){ |
| 584 |
$actions = $this->settings_obj; |
| 585 |
|
| 586 |
$active_camp_res = ($actions->ays_get_setting('active_camp') === false) ? json_encode(array()) : $actions->ays_get_setting('active_camp'); |
| 587 |
$active_camp = json_decode($active_camp_res, true); |
| 588 |
$active_camp_url = isset($active_camp['url']) ? $active_camp['url'] : ''; |
| 589 |
$active_camp_api_key = isset($active_camp['apiKey']) ? $active_camp['apiKey'] : ''; |
| 590 |
|
| 591 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/activecampaign_logo.png'; |
| 592 |
$title = __( 'ActiveCampaign', "survey-maker" ); |
| 593 |
|
| 594 |
$content = ''; |
| 595 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 596 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 597 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 598 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 599 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 600 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 601 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 602 |
$content .= __("Upgrade" , "survey-maker"); |
| 603 |
$content .= '</div>'; |
| 604 |
$content .= '</a>'; |
| 605 |
$content .= '</div>'; |
| 606 |
$content .= '<div class="form-group row"> |
| 607 |
<div class="col-sm-12"> |
| 608 |
<div class="form-group row" aria-describedby="aaa"> |
| 609 |
<div class="col-sm-3"> |
| 610 |
<label for="ays_active_camp_url">'. __( 'API Access URL', "survey-maker" ) .'</label> |
| 611 |
</div> |
| 612 |
<div class="col-sm-9"> |
| 613 |
<input type="text" |
| 614 |
class="ays-text-input" |
| 615 |
id="ays_active_camp_url" |
| 616 |
name="ays_active_camp_url" |
| 617 |
value="'. $active_camp_url .'" |
| 618 |
/> |
| 619 |
</div> |
| 620 |
</div> |
| 621 |
<hr/> |
| 622 |
<div class="form-group row" aria-describedby="aaa"> |
| 623 |
<div class="col-sm-3"> |
| 624 |
<label for="ays_active_camp_api_key">'. __( 'API Access Key', "survey-maker" ) .'</label> |
| 625 |
</div> |
| 626 |
<div class="col-sm-9"> |
| 627 |
<input type="text" |
| 628 |
class="ays-text-input" |
| 629 |
id="ays_active_camp_api_key" |
| 630 |
name="ays_active_camp_api_key" |
| 631 |
value="'. $active_camp_api_key .'" |
| 632 |
/> |
| 633 |
</div> |
| 634 |
</div> |
| 635 |
<blockquote>'; |
| 636 |
$content .= __( "Your API URL and Key can be found in your account on the My Settings page under the “Developer” tab.", "survey-maker"); |
| 637 |
$content .= '</blockquote> |
| 638 |
</div> |
| 639 |
</div> |
| 640 |
</div> |
| 641 |
</div>'; |
| 642 |
|
| 643 |
$integrations['active_camp'] = array( |
| 644 |
'content' => $content, |
| 645 |
'icon' => $icon, |
| 646 |
'title' => $title |
| 647 |
); |
| 648 |
|
| 649 |
return $integrations; |
| 650 |
} |
| 651 |
|
| 652 |
// ===== Active Campaign end ===== |
| 653 |
|
| 654 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 655 |
//====================================================================================// |
| 656 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 657 |
|
| 658 |
// ===== Slack start ===== |
| 659 |
|
| 660 |
// Slack integration / survey page |
| 661 |
|
| 662 |
// Slack integration in survey page content |
| 663 |
public function ays_survey_page_slack_content($integrations, $args){ |
| 664 |
|
| 665 |
$content = ''; |
| 666 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/slack_logo.png'; |
| 667 |
$title = __('Slack Settings',"survey-maker"); |
| 668 |
$content = ''; |
| 669 |
|
| 670 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 671 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 672 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 673 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 674 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 675 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 676 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 677 |
$content .= __("Upgrade" , "survey-maker"); |
| 678 |
$content .= '</div>'; |
| 679 |
$content .= '</a>'; |
| 680 |
$content .= '</div>'; |
| 681 |
|
| 682 |
$content .= ' |
| 683 |
<hr/> |
| 684 |
<div class="form-group row"> |
| 685 |
<div class="col-sm-4"> |
| 686 |
<label for="ays_enable_slack">'.__("Enable Slack integration", "survey-maker").'</label> |
| 687 |
</div> |
| 688 |
<div class="col-sm-1"> |
| 689 |
<input type="checkbox" checked class="ays-enable-timer1" id="ays_enable_slack" value="on"> |
| 690 |
</div> |
| 691 |
</div> |
| 692 |
<hr> |
| 693 |
<div class="form-group row"> |
| 694 |
<div class="col-sm-4"> |
| 695 |
<label for="ays_slack_conversation">'.__("Slack conversation", "survey-maker").'</label> |
| 696 |
</div> |
| 697 |
<div class="col-sm-8">'; |
| 698 |
$content .= '<select name="ays_slack_conversation" id="ays_slack_conversation"> |
| 699 |
<option value="" disabled selected>'.__("Select Channel", "survey-maker").'</option>'; |
| 700 |
$content .= '</select>'; |
| 701 |
$content .= '</div></div>'; |
| 702 |
$content .= '</div></div>'; |
| 703 |
|
| 704 |
$integrations['slack'] = array( |
| 705 |
'content' => $content, |
| 706 |
'icon' => $icon, |
| 707 |
'title' => $title, |
| 708 |
); |
| 709 |
|
| 710 |
return $integrations; |
| 711 |
} |
| 712 |
|
| 713 |
// Slack integration / settings page |
| 714 |
|
| 715 |
// Slack integration in General settings page content |
| 716 |
public function ays_settings_page_slack_content( $integrations, $args ){ |
| 717 |
$actions = $this->settings_obj; |
| 718 |
|
| 719 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/slack_logo.png'; |
| 720 |
$title = __( 'Slack', "survey-maker" ); |
| 721 |
|
| 722 |
$content = ''; |
| 723 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 724 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 725 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 726 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 727 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 728 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 729 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 730 |
$content .= __("Upgrade" , "survey-maker"); |
| 731 |
$content .= '</div>'; |
| 732 |
$content .= '</a>'; |
| 733 |
$content .= '</div>'; |
| 734 |
$content .= '<div class="form-group row"> |
| 735 |
<div class="col-sm-12">'; |
| 736 |
$content .= '<div class="form-group row" aria-describedby="aaa"> |
| 737 |
<div class="col-sm-3"> |
| 738 |
<label for="ays_slack_client"> |
| 739 |
'.__("App Client ID", "survey-maker").' |
| 740 |
</label> |
| 741 |
</div> |
| 742 |
<div class="col-sm-9"> |
| 743 |
<input type="text" class="ays-text-input" id="ays_slack_client" name="ays_slack_client" value=""> |
| 744 |
</div> |
| 745 |
</div> |
| 746 |
<hr/>'; |
| 747 |
$content .= '<div class="form-group row" aria-describedby="aaa"> |
| 748 |
<div class="col-sm-3"> |
| 749 |
<label for="ays_slack_oauth">'.__("Slack Authorization", "survey-maker").'</label> |
| 750 |
</div> |
| 751 |
<div class="col-sm-9">'; |
| 752 |
$content .= '<button type="button" id="slackOAuth2" class="btn btn-outline-secondary disabled">'.esc_html__("Authorize", "survey-maker").'</button>'; |
| 753 |
|
| 754 |
$content .= '</div> |
| 755 |
</div> |
| 756 |
<hr/>'; |
| 757 |
$content .= '<div class="form-group row" aria-describedby="aaa"> |
| 758 |
<div class="col-sm-3"> |
| 759 |
<label for="ays_slack_secret">'.__('App Client Secret', "survey-maker").'</label> |
| 760 |
</div> |
| 761 |
<div class="col-sm-9"> |
| 762 |
<input type="text" class="ays-text-input" id="ays_slack_secret" name="ays_slack_secret" value=""> |
| 763 |
</div> |
| 764 |
</div> |
| 765 |
<hr/>'; |
| 766 |
$content .= '<div class="form-group row" aria-describedby="aaa"> |
| 767 |
<div class="col-sm-3"> |
| 768 |
<label for="ays_slack_oauth">'.__('App Access Token', "survey-maker").'</label> |
| 769 |
</div> |
| 770 |
<div class="col-sm-9">'; |
| 771 |
$content .= '<button type="button" class="btn btn-outline-secondary disabled">'.__("Need Authorization", "survey-maker").'</button>'; |
| 772 |
$content .= '</div></div>'; |
| 773 |
|
| 774 |
$content .= '<blockquote> |
| 775 |
'.__( "You can get your App Client ID and Client Secret from your App's Basic Information page.", "survey-maker").' |
| 776 |
</blockquote> |
| 777 |
</div> |
| 778 |
</div> |
| 779 |
</div> |
| 780 |
</div>'; |
| 781 |
|
| 782 |
$integrations['slack'] = array( |
| 783 |
'content' => $content, |
| 784 |
'icon' => $icon, |
| 785 |
'title' => $title |
| 786 |
); |
| 787 |
|
| 788 |
return $integrations; |
| 789 |
} |
| 790 |
|
| 791 |
// ===== Slack end ===== |
| 792 |
|
| 793 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 794 |
//====================================================================================// |
| 795 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 796 |
|
| 797 |
// ===== Google start ===== |
| 798 |
|
| 799 |
// Google integration / survey page |
| 800 |
|
| 801 |
// Google integration in survey page content |
| 802 |
public function ays_survey_page_google_sheet_content($integrations, $args){ |
| 803 |
|
| 804 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/sheets_logo.png'; |
| 805 |
$title = __('Google Settings',"survey-maker"); |
| 806 |
$content = ""; |
| 807 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 808 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 809 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 810 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 811 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 812 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 813 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 814 |
$content .= __("Upgrade" , "survey-maker"); |
| 815 |
$content .= '</div>'; |
| 816 |
$content .= '</a>'; |
| 817 |
$content .= '</div>'; |
| 818 |
$content .= '<hr/> |
| 819 |
<div class="form-group row"> |
| 820 |
<div class="col-sm-4"> |
| 821 |
<label for="ays_enable_google"> |
| 822 |
'. __('Enable Google integration', "survey-maker") .' |
| 823 |
</label> |
| 824 |
</div> |
| 825 |
<div class="col-sm-1"> |
| 826 |
<input type="checkbox" class="ays-enable-timer1" value="on"> |
| 827 |
</div> |
| 828 |
</div> |
| 829 |
<hr></div></div>'; |
| 830 |
$integrations['google'] = array( |
| 831 |
'content' => $content, |
| 832 |
'icon' => $icon, |
| 833 |
'title' => $title |
| 834 |
); |
| 835 |
|
| 836 |
return $integrations; |
| 837 |
} |
| 838 |
|
| 839 |
// Google integration / settings page |
| 840 |
|
| 841 |
// Google integration in General settings page content |
| 842 |
public function ays_settings_page_google_content( $integrations, $args ){ |
| 843 |
|
| 844 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/sheets_logo.png'; |
| 845 |
$title = __( 'Google', "survey-maker" ); |
| 846 |
|
| 847 |
$content = ''; |
| 848 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 849 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 850 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 851 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 852 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 853 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 854 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 855 |
$content .= __("Upgrade" , "survey-maker"); |
| 856 |
$content .= '</div>'; |
| 857 |
$content .= '</a>'; |
| 858 |
$content .= '</div>'; |
| 859 |
$content .= '<div class="form-group row"> |
| 860 |
<div class="col-sm-12"> |
| 861 |
<div class="form-group row" aria-describedby="aaa"> |
| 862 |
<div class="col-sm-3"> |
| 863 |
<button id="googleInstructionsPopOver" type="button" class="btn btn-info" data-original-title="Google Integration Setup Instructions" >'. __("Instructions", "survey-maker"). '</button> |
| 864 |
</div> |
| 865 |
</div> |
| 866 |
<div class="form-group row"> |
| 867 |
<div class="col-sm-3"> |
| 868 |
<label for="ays_google_client"> |
| 869 |
'. __("Google Client ID", "survey-maker") .' |
| 870 |
</label> |
| 871 |
</div> |
| 872 |
<div class="col-sm-9"> |
| 873 |
<input type="text" class="ays-text-input"> |
| 874 |
</div> |
| 875 |
</div> |
| 876 |
<hr/> |
| 877 |
<div class="form-group row"> |
| 878 |
<div class="col-sm-3"> |
| 879 |
<label for="ays_google_secret"> |
| 880 |
'. __("Google Client Secret", "survey-maker") .' |
| 881 |
</label> |
| 882 |
</div> |
| 883 |
<div class="col-sm-9"> |
| 884 |
<input type="text" class="ays-text-input"> |
| 885 |
<input type="hidden"> |
| 886 |
</div> |
| 887 |
</div> |
| 888 |
<hr/> |
| 889 |
<div class="form-group row"> |
| 890 |
<div class="col-sm-3"></div> |
| 891 |
<div class="col-sm-9"> |
| 892 |
<button type="submit" class="btn btn-outline-info"> |
| 893 |
'. __("Connect", "survey-maker") .' |
| 894 |
</button> |
| 895 |
</div> |
| 896 |
</div> |
| 897 |
</div> |
| 898 |
</div>'; |
| 899 |
|
| 900 |
$integrations['google'] = array( |
| 901 |
'content' => $content, |
| 902 |
'icon' => $icon, |
| 903 |
'title' => $title |
| 904 |
); |
| 905 |
|
| 906 |
return $integrations; |
| 907 |
} |
| 908 |
|
| 909 |
// ===== Google end ===== |
| 910 |
|
| 911 |
|
| 912 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 913 |
//====================================================================================// |
| 914 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 915 |
|
| 916 |
// ===== GamiPress start ===== |
| 917 |
|
| 918 |
// GamiPress integration / survey page | GamiPress Nooo :D | Aro | Start |
| 919 |
|
| 920 |
// GamiPress integration / settings page |
| 921 |
|
| 922 |
// GamiPress integration in Gengeral settings page content |
| 923 |
public function ays_settings_page_gamipress_content( $integrations, $args ){ |
| 924 |
|
| 925 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/gamipress_logo.png'; |
| 926 |
$title = __( 'GamiPress', "survey-maker" ); |
| 927 |
|
| 928 |
$content = ''; |
| 929 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 930 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 931 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 932 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 933 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 934 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 935 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 936 |
$content .= __("Upgrade" , "survey-maker"); |
| 937 |
$content .= '</div>'; |
| 938 |
$content .= '</a>'; |
| 939 |
$content .= '</div>'; |
| 940 |
$content .= ' |
| 941 |
<div class="form-group row"> |
| 942 |
<div class="col-sm-12"> |
| 943 |
<blockquote>' . |
| 944 |
__( "Install the GamiPress plugin to use the integration. Configure the settings from the Automatic Points Awards section from the GamiPres plugin.", "survey-maker" ) . ' |
| 945 |
<br>' . |
| 946 |
__( "After enabling the integration, the Survey Maker will automatically be added to the event list.", "survey-maker" ) . ' |
| 947 |
</blockquote>'; |
| 948 |
$content .= ' |
| 949 |
</div> |
| 950 |
</div>'; |
| 951 |
$content .= ' |
| 952 |
</div> |
| 953 |
</div>'; |
| 954 |
|
| 955 |
$integrations['gamipress'] = array( |
| 956 |
'content' => $content, |
| 957 |
'icon' => $icon, |
| 958 |
'title' => $title |
| 959 |
); |
| 960 |
|
| 961 |
return $integrations; |
| 962 |
} |
| 963 |
|
| 964 |
// GamiPress | Aro | End |
| 965 |
|
| 966 |
// ===== GamiPress end ===== |
| 967 |
|
| 968 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 969 |
//====================================================================================// |
| 970 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 971 |
|
| 972 |
// ===== SendGrid start ===== |
| 973 |
|
| 974 |
// SendGrid integration / settings page |
| 975 |
|
| 976 |
// SendGrid integration in Gengeral settings page content |
| 977 |
public function ays_settings_page_sendgrid_content( $integrations, $args ){ |
| 978 |
$actions = $this->settings_obj; |
| 979 |
|
| 980 |
$sendgrid_res = ($actions->ays_get_setting('sendgrid') === false) ? json_encode(array()) : $actions->ays_get_setting('sendgrid'); |
| 981 |
$sendgrid = json_decode($sendgrid_res, true); |
| 982 |
$sendgrid_api_key = isset($sendgrid['apiKey']) ? $sendgrid['apiKey'] : ''; |
| 983 |
|
| 984 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/sendgrid_logo.png'; |
| 985 |
$title = __( 'SendGrid', "survey-maker" ); |
| 986 |
|
| 987 |
$content = ''; |
| 988 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 989 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 990 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 991 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 992 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 993 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 994 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 995 |
$content .= __("Upgrade" , "survey-maker"); |
| 996 |
$content .= '</div>'; |
| 997 |
$content .= '</a>'; |
| 998 |
$content .= '</div>'; |
| 999 |
$content .= ' |
| 1000 |
<div class="form-group row"> |
| 1001 |
<div class="col-sm-12"> |
| 1002 |
<div class="form-group row" aria-describedby="aaa"> |
| 1003 |
<div class="col-sm-3"> |
| 1004 |
<label for="ays_sendgrid_username">'. __('SendGrid API Key',"survey-maker") .'</label> |
| 1005 |
</div> |
| 1006 |
<div class="col-sm-9"> |
| 1007 |
<input type="text" class="ays-text-input" id="ays_sendgrid_api_key"/> |
| 1008 |
</div> |
| 1009 |
</div> |
| 1010 |
<hr/> |
| 1011 |
<blockquote>'; |
| 1012 |
$content .= sprintf( __( "You can get your API key from", "survey-maker" ) . " <a href='%s' target='_blank'> %s.</a>", "https://app.sendgrid.com/settings/api_keys", "sendgrid.com" ); |
| 1013 |
$content .= ' |
| 1014 |
</blockquote> |
| 1015 |
</div> |
| 1016 |
</div>'; |
| 1017 |
$content .= ' |
| 1018 |
</div> |
| 1019 |
</div>'; |
| 1020 |
|
| 1021 |
$integrations['sendgrid'] = array( |
| 1022 |
'content' => $content, |
| 1023 |
'icon' => $icon, |
| 1024 |
'title' => $title |
| 1025 |
); |
| 1026 |
|
| 1027 |
return $integrations; |
| 1028 |
} |
| 1029 |
|
| 1030 |
// ===== SendGrid end ===== |
| 1031 |
|
| 1032 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1033 |
//====================================================================================// |
| 1034 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1035 |
|
| 1036 |
// ===== Madmimi start ===== |
| 1037 |
|
| 1038 |
// Madmimi integration / settings page |
| 1039 |
|
| 1040 |
// Mad mimi integration in General settings page content |
| 1041 |
public function ays_settings_page_mad_mimi_content( $integrations, $args ){ |
| 1042 |
|
| 1043 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/mad-mimi-logo.png'; |
| 1044 |
$title = __( 'Mad Mimi', "survey-maker" ); |
| 1045 |
|
| 1046 |
$content = ''; |
| 1047 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1048 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1049 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1050 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1051 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1052 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1053 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1054 |
$content .= __("Upgrade" , "survey-maker"); |
| 1055 |
$content .= '</div>'; |
| 1056 |
$content .= '</a>'; |
| 1057 |
$content .= '</div>'; |
| 1058 |
$content .= '<div class="form-group row"> |
| 1059 |
<div class="col-sm-12"> |
| 1060 |
<div class="form-group row"> |
| 1061 |
<div class="col-sm-3"> |
| 1062 |
<label>'. __('Username', "survey-maker") .'</label> |
| 1063 |
</div> |
| 1064 |
<div class="col-sm-9"> |
| 1065 |
<input type="text" class="ays-text-input"> |
| 1066 |
</div> |
| 1067 |
</div> |
| 1068 |
<hr/> |
| 1069 |
<div class="form-group row"> |
| 1070 |
<div class="col-sm-3"> |
| 1071 |
<label for="ays_survey_mad_mimi_api_key">'. __('API Key', "survey-maker") .'</label> |
| 1072 |
</div> |
| 1073 |
<div class="col-sm-9"> |
| 1074 |
<input type="text" class="ays-text-input"> |
| 1075 |
</div> |
| 1076 |
</div>'; |
| 1077 |
$content .= '<blockquote>'; |
| 1078 |
$content .= sprintf( __( "You can get your API key from your ", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://madmimi.com/user/edit?account_info_tabs=account_info_personal", "Account" ); |
| 1079 |
$content .= '</blockquote>'; |
| 1080 |
$content .= ' |
| 1081 |
</div> |
| 1082 |
</div>'; |
| 1083 |
$content .= ' |
| 1084 |
</div> |
| 1085 |
</div>'; |
| 1086 |
|
| 1087 |
$integrations['mad_mimi'] = array( |
| 1088 |
'content' => $content, |
| 1089 |
'icon' => $icon, |
| 1090 |
'title' => $title, |
| 1091 |
); |
| 1092 |
|
| 1093 |
return $integrations; |
| 1094 |
} |
| 1095 |
|
| 1096 |
// Mad mimi integration in survey page content |
| 1097 |
public function ays_survey_page_mad_mimi_content( $integrations, $args ){ |
| 1098 |
|
| 1099 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/mad-mimi-logo.png'; |
| 1100 |
$title = __('Mad Mimi Settings',"survey-maker"); |
| 1101 |
|
| 1102 |
$content = ''; |
| 1103 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1104 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1105 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1106 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1107 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1108 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1109 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1110 |
$content .= __("Upgrade" , "survey-maker"); |
| 1111 |
$content .= '</div>'; |
| 1112 |
$content .= '</a>'; |
| 1113 |
$content .= '</div>'; |
| 1114 |
$content .= '<hr/>'; |
| 1115 |
$content .= '<div class="form-group row"> |
| 1116 |
<div class="col-sm-4"> |
| 1117 |
<label for="ays_survey_enable_mad_mimi">'. __('Enable Mad Mimi', "survey-maker") .'</label> |
| 1118 |
</div> |
| 1119 |
<div class="col-sm-1"> |
| 1120 |
<input type="checkbox" checked class="ays-enable-timer1"> |
| 1121 |
</div> |
| 1122 |
</div> |
| 1123 |
<hr> |
| 1124 |
<div class="form-group row"> |
| 1125 |
<div class="col-sm-4"> |
| 1126 |
<label >'. __('Select List', "survey-maker") .'</label> |
| 1127 |
</div> |
| 1128 |
<div class="col-sm-8"> |
| 1129 |
<select> |
| 1130 |
<option disabled selected>Select list</option> |
| 1131 |
</select> |
| 1132 |
</div> |
| 1133 |
</div> |
| 1134 |
<hr> |
| 1135 |
</div> |
| 1136 |
</div>'; |
| 1137 |
|
| 1138 |
$integrations['mad_mimi'] = array( |
| 1139 |
'content' => $content, |
| 1140 |
'icon' => $icon, |
| 1141 |
'title' => $title, |
| 1142 |
); |
| 1143 |
|
| 1144 |
return $integrations; |
| 1145 |
} |
| 1146 |
|
| 1147 |
// ===== Madmimi end ===== |
| 1148 |
|
| 1149 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1150 |
//====================================================================================// |
| 1151 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1152 |
|
| 1153 |
// ===== GetResponse start ===== |
| 1154 |
|
| 1155 |
// GetResponse integration / settings page |
| 1156 |
|
| 1157 |
// GetResponse integration in General settings page content |
| 1158 |
public function ays_settings_page_get_response_content( $integrations, $args ){ |
| 1159 |
|
| 1160 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/get_response.png'; |
| 1161 |
$title = __( 'GetResponse', "survey-maker" ); |
| 1162 |
|
| 1163 |
$content = ''; |
| 1164 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1165 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1166 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1167 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1168 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1169 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1170 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1171 |
$content .= __("Upgrade" , "survey-maker"); |
| 1172 |
$content .= '</div>'; |
| 1173 |
$content .= '</a>'; |
| 1174 |
$content .= '</div>'; |
| 1175 |
$content .= '<div class="form-group row"> |
| 1176 |
<div class="col-sm-12"> |
| 1177 |
<div class="form-group row"> |
| 1178 |
<div class="col-sm-3"> |
| 1179 |
<label for="ays_survey_getresponse_api_key">'. __('GetResponse API Key', "survey-maker") .'</label> |
| 1180 |
</div> |
| 1181 |
<div class="col-sm-9"> |
| 1182 |
<input type="text" class="ays-text-input"> |
| 1183 |
</div> |
| 1184 |
</div>'; |
| 1185 |
$content .= '<blockquote>'; |
| 1186 |
$content .= sprintf( __( "You can get your API key from your ", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://app.getresponse.com/api", "account" ); |
| 1187 |
$content .= '</blockquote>'; |
| 1188 |
$content .= '<blockquote>'; |
| 1189 |
$content .= __( "For security reasons, unused API keys expire after 90 days. When that happens, you'll need to generate a new key.", "survey-maker" ); |
| 1190 |
$content .= '</blockquote>'; |
| 1191 |
$content .= ' |
| 1192 |
</div> |
| 1193 |
</div>'; |
| 1194 |
$content .= ' |
| 1195 |
</div> |
| 1196 |
</div>'; |
| 1197 |
|
| 1198 |
$integrations['get_response'] = array( |
| 1199 |
'content' => $content, |
| 1200 |
'icon' => $icon, |
| 1201 |
'title' => $title, |
| 1202 |
); |
| 1203 |
|
| 1204 |
return $integrations; |
| 1205 |
} |
| 1206 |
|
| 1207 |
// GetResponse integration in survey page content |
| 1208 |
public function ays_survey_page_get_response_content( $integrations, $args ){ |
| 1209 |
|
| 1210 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/get_response.png'; |
| 1211 |
$title = __('GetResponse Settings',"survey-maker"); |
| 1212 |
$content = ''; |
| 1213 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1214 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1215 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1216 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1217 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1218 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1219 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1220 |
$content .= __("Upgrade" , "survey-maker"); |
| 1221 |
$content .= '</div>'; |
| 1222 |
$content .= '</a>'; |
| 1223 |
$content .= '</div>'; |
| 1224 |
$content .= '<hr/>'; |
| 1225 |
$content .= '<div class="form-group row"> |
| 1226 |
<div class="col-sm-4"> |
| 1227 |
<label for="ays_survey_enable_getResponse">'. __('Enable GetResponse', "survey-maker") .'</label> |
| 1228 |
</div> |
| 1229 |
<div class="col-sm-1"> |
| 1230 |
<input type="checkbox" checked class="ays-enable-timer1"> |
| 1231 |
</div> |
| 1232 |
</div> |
| 1233 |
<hr> |
| 1234 |
<div class="form-group row"> |
| 1235 |
<div class="col-sm-4"> |
| 1236 |
<label>'. __('GetResponse List', "survey-maker") .'</label> |
| 1237 |
</div> |
| 1238 |
<div class="col-sm-8"> |
| 1239 |
<select > |
| 1240 |
<option selected disabled>Select list</option> |
| 1241 |
</select> |
| 1242 |
</div> |
| 1243 |
</div> |
| 1244 |
</div> |
| 1245 |
</div>'; |
| 1246 |
|
| 1247 |
$integrations['get_response'] = array( |
| 1248 |
'content' => $content, |
| 1249 |
'icon' => $icon, |
| 1250 |
'title' => $title, |
| 1251 |
); |
| 1252 |
|
| 1253 |
return $integrations; |
| 1254 |
} |
| 1255 |
|
| 1256 |
// ===== GetResponse end ===== |
| 1257 |
|
| 1258 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1259 |
//====================================================================================// |
| 1260 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1261 |
|
| 1262 |
// ===== ConvertKit start ===== |
| 1263 |
|
| 1264 |
// ConvertKit integration / settings page |
| 1265 |
|
| 1266 |
// ConvertKit Settings integration in General settings page content |
| 1267 |
public function ays_settings_page_convert_kit_content( $integrations, $args ){ |
| 1268 |
|
| 1269 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/convertkit_logo.png'; |
| 1270 |
$title = __( 'ConvertKit', "survey-maker" ); |
| 1271 |
|
| 1272 |
$content = ''; |
| 1273 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1274 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1275 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1276 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1277 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1278 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1279 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1280 |
$content .= __("Upgrade" , "survey-maker"); |
| 1281 |
$content .= '</div>'; |
| 1282 |
$content .= '</a>'; |
| 1283 |
$content .= '</div>'; |
| 1284 |
$content .= '<div class="form-group row"> |
| 1285 |
<div class="col-sm-12"> |
| 1286 |
<div class="form-group row"> |
| 1287 |
<div class="col-sm-3"> |
| 1288 |
<label for="ays_survey_convert_kit">'. __('API Key', "survey-maker") .'</label> |
| 1289 |
</div> |
| 1290 |
<div class="col-sm-9"> |
| 1291 |
<input type="text" class="ays-text-input"> |
| 1292 |
</div> |
| 1293 |
</div>'; |
| 1294 |
$content .= '<blockquote>'; |
| 1295 |
$content .= sprintf( __( "You can get your API key from your ", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://app.convertkit.com/account/edit", "Account" ); |
| 1296 |
$content .= '</blockquote>'; |
| 1297 |
$content .= ' |
| 1298 |
</div> |
| 1299 |
</div>'; |
| 1300 |
$content .= ' |
| 1301 |
</div> |
| 1302 |
</div>'; |
| 1303 |
|
| 1304 |
$integrations['convertKit'] = array( |
| 1305 |
'content' => $content, |
| 1306 |
'icon' => $icon, |
| 1307 |
'title' => $title, |
| 1308 |
); |
| 1309 |
|
| 1310 |
return $integrations; |
| 1311 |
} |
| 1312 |
|
| 1313 |
// ConvertKit Settings integration in survey page content |
| 1314 |
public function ays_survey_page_convert_kit_content( $integrations, $args ){ |
| 1315 |
|
| 1316 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/convertkit_logo.png'; |
| 1317 |
$title = __('ConvertKit Settings',"survey-maker"); |
| 1318 |
|
| 1319 |
$content = ''; |
| 1320 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1321 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1322 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1323 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1324 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1325 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1326 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1327 |
$content .= __("Upgrade" , "survey-maker"); |
| 1328 |
$content .= '</div>'; |
| 1329 |
$content .= '</a>'; |
| 1330 |
$content .= '</div>'; |
| 1331 |
$content .= '<hr/>'; |
| 1332 |
$content .= '<div class="form-group row"> |
| 1333 |
<div class="col-sm-4"> |
| 1334 |
<label for="ays_survey_enable_convertkit">'. __('Enable ConvertKit', "survey-maker") .'</label> |
| 1335 |
</div> |
| 1336 |
<div class="col-sm-1"> |
| 1337 |
<input type="checkbox" checked class="ays-enable-timer1"> |
| 1338 |
</div> |
| 1339 |
</div> |
| 1340 |
<hr> |
| 1341 |
<div class="form-group row"> |
| 1342 |
<div class="col-sm-4"> |
| 1343 |
<label for="ays_survey_convertKit_list">'. __('ConvertKit List', "survey-maker") .'</label> |
| 1344 |
</div> |
| 1345 |
<div class="col-sm-8"> |
| 1346 |
<select> |
| 1347 |
<option selected disabled>Select list</option> |
| 1348 |
</select> |
| 1349 |
</div> |
| 1350 |
</div> |
| 1351 |
</div> |
| 1352 |
</div>'; |
| 1353 |
|
| 1354 |
$integrations['convertKit'] = array( |
| 1355 |
'content' => $content, |
| 1356 |
'icon' => $icon, |
| 1357 |
'title' => $title, |
| 1358 |
); |
| 1359 |
|
| 1360 |
return $integrations; |
| 1361 |
} |
| 1362 |
|
| 1363 |
// ===== ConvertKit end ===== |
| 1364 |
|
| 1365 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1366 |
//====================================================================================// |
| 1367 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1368 |
|
| 1369 |
// ===== Sendinblue Settings start ===== |
| 1370 |
|
| 1371 |
// Sendinblue Settings integration |
| 1372 |
|
| 1373 |
// Sendinblue Settings integration in survey page content |
| 1374 |
public function ays_survey_page_sendinblue_content( $integrations, $args ){ |
| 1375 |
|
| 1376 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/brevo-logo.png'; |
| 1377 |
$title = __('Brevo Settings',"survey-maker"); |
| 1378 |
|
| 1379 |
$content = ''; |
| 1380 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1381 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1382 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1383 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1384 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1385 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1386 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1387 |
$content .= __("Upgrade" , "survey-maker"); |
| 1388 |
$content .= '</div>'; |
| 1389 |
$content .= '</a>'; |
| 1390 |
$content .= '</div>'; |
| 1391 |
$content .= '<hr/>'; |
| 1392 |
$content .= '<div class="form-group row"> |
| 1393 |
<div class="col-sm-4"> |
| 1394 |
<label for="ays_survey_enable_sendinblue">'. __('Enable Brevo', "survey-maker") .'</label> |
| 1395 |
</div> |
| 1396 |
<div class="col-sm-1"> |
| 1397 |
<input type="checkbox" class="ays-enable-timer1" /> |
| 1398 |
</div> |
| 1399 |
</div> |
| 1400 |
<hr> |
| 1401 |
<div class="form-group row"> |
| 1402 |
<div class="col-sm-4"> |
| 1403 |
<label for="ays_survey_sendinblue_list_id">'. __('Brevo Lists', "survey-maker") .'</label> |
| 1404 |
</div> |
| 1405 |
<div class="col-sm-8"> |
| 1406 |
<select> |
| 1407 |
<option>Select list</option> |
| 1408 |
</select> |
| 1409 |
</div> |
| 1410 |
</div> |
| 1411 |
</div> |
| 1412 |
</div>'; |
| 1413 |
|
| 1414 |
|
| 1415 |
$integrations['sendinblue'] = array( |
| 1416 |
'content' => $content, |
| 1417 |
'icon' => $icon, |
| 1418 |
'title' => $title |
| 1419 |
); |
| 1420 |
|
| 1421 |
return $integrations; |
| 1422 |
} |
| 1423 |
|
| 1424 |
// Sendinblue Settings integration / settings page |
| 1425 |
|
| 1426 |
// Sendinblue Settings integration in General settings page content |
| 1427 |
public function ays_settings_page_sendinblue_content( $integrations, $args ){ |
| 1428 |
|
| 1429 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/brevo-logo.png'; |
| 1430 |
$title = __( 'Brevo', "survey-maker" ); |
| 1431 |
|
| 1432 |
$content = ''; |
| 1433 |
$content .= '<div class="form-group row" style="margin:0px;">'; |
| 1434 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1435 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1436 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1437 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1438 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1439 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1440 |
$content .= __("Upgrade" , "survey-maker"); |
| 1441 |
$content .= '</div>'; |
| 1442 |
$content .= '</a>'; |
| 1443 |
$content .= '</div>'; |
| 1444 |
$content .= '<div class="form-group row"> |
| 1445 |
<div class="col-sm-12"> |
| 1446 |
<div class="form-group row"> |
| 1447 |
<div class="col-sm-3"> |
| 1448 |
<label for="ays_survey_sendinblue">'. __('API Key', "survey-maker") .'</label> |
| 1449 |
</div> |
| 1450 |
<div class="col-sm-9"> |
| 1451 |
<input type="text" class="ays-text-input"> |
| 1452 |
</div> |
| 1453 |
</div>'; |
| 1454 |
$content .= '<blockquote>'; |
| 1455 |
$content .= sprintf( __( "You can get your API key from your ", "survey-maker" ) . "<a href='%s' target='_blank'> %s.</a>", "https://account.sendinblue.com/advanced/api", "Account" ); |
| 1456 |
$content .= '</blockquote>'; |
| 1457 |
$content .= '</div> |
| 1458 |
</div> |
| 1459 |
</div> |
| 1460 |
</div>'; |
| 1461 |
|
| 1462 |
$integrations['sendinblue'] = array( |
| 1463 |
'content' => $content, |
| 1464 |
'icon' => $icon, |
| 1465 |
'title' => $title |
| 1466 |
); |
| 1467 |
|
| 1468 |
return $integrations; |
| 1469 |
} |
| 1470 |
|
| 1471 |
// ===== Sendinblue Settings end ===== |
| 1472 |
|
| 1473 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1474 |
//====================================================================================// |
| 1475 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1476 |
|
| 1477 |
|
| 1478 |
// ===== Paypal Settings start ===== |
| 1479 |
|
| 1480 |
// PayPal Settings integration |
| 1481 |
|
| 1482 |
// PayPal Settings integration in survey page content |
| 1483 |
public function ays_survey_page_PayPal_content( $integrations, $args ){ |
| 1484 |
$editor_id = 'ays_survey_paypal_message'; |
| 1485 |
$settings = array( |
| 1486 |
'editor_height' => 150, |
| 1487 |
'textarea_name' => 'ays_survey_paypal_message', |
| 1488 |
'editor_class' => 'ays-textarea', |
| 1489 |
'media_elements' => false, |
| 1490 |
|
| 1491 |
); |
| 1492 |
|
| 1493 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/paypal_logo.png'; |
| 1494 |
$title = __('PayPal Settings',"survey-maker"); |
| 1495 |
ob_start(); |
| 1496 |
$content = ''; |
| 1497 |
wp_editor("", $editor_id, $settings); |
| 1498 |
$content .= '<div class="form-group row" style="padding: 10px;"> |
| 1499 |
<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small"> |
| 1500 |
<div class="ays-pro-features-v2-big-buttons-box"> |
| 1501 |
<div class="ays-pro-features-v2-video-button"></div> |
| 1502 |
<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 1503 |
<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div> |
| 1504 |
<div class="ays-pro-features-v2-upgrade-text"> |
| 1505 |
'.__("Upgrade" , "survey-maker").' |
| 1506 |
</div> |
| 1507 |
</a> |
| 1508 |
</div> |
| 1509 |
<div class="ays-pro-features-v2-small-buttons-box"> |
| 1510 |
<div class="ays-pro-features-v2-video-button"></div> |
| 1511 |
<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 1512 |
<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div> |
| 1513 |
<div class="ays-pro-features-v2-upgrade-text"> |
| 1514 |
'.__("Upgrade" , "survey-maker").' |
| 1515 |
</div> |
| 1516 |
</a> |
| 1517 |
</div> |
| 1518 |
<hr> |
| 1519 |
<div class="form-group row"> |
| 1520 |
<div class="col-sm-4"> |
| 1521 |
<label for="ays_survey_paypal_amount"> |
| 1522 |
'.__('Amount',"survey-maker").' |
| 1523 |
</label> |
| 1524 |
</div> |
| 1525 |
<div class="col-sm-8"> |
| 1526 |
<input type="text" class="ays-text-input ays-text-input-short"> |
| 1527 |
</div> |
| 1528 |
</div> |
| 1529 |
<hr> |
| 1530 |
<div class="form-group row"> |
| 1531 |
<div class="col-sm-4"> |
| 1532 |
<label for="ays_survey_paypal_currency"> |
| 1533 |
'.__('Currency',"survey-maker").' |
| 1534 |
</label> |
| 1535 |
</div> |
| 1536 |
<div class="col-sm-8"> |
| 1537 |
<select class="ays-text-input ays-text-input-short">'; |
| 1538 |
$content .= '<option selected >-Currency-</option>'; |
| 1539 |
$content .= '</select> |
| 1540 |
</div> |
| 1541 |
</div> |
| 1542 |
<hr> |
| 1543 |
<div class="form-group row"> |
| 1544 |
<div class="col-sm-4"> |
| 1545 |
<label for="ays_paypal_currency"> |
| 1546 |
'.__('Payment details',"survey-maker").' |
| 1547 |
</label> |
| 1548 |
</div> |
| 1549 |
<div class="col-sm-8">'; |
| 1550 |
$editor_contents = ob_get_clean(); |
| 1551 |
$content .= $editor_contents; |
| 1552 |
$content .= '</div> |
| 1553 |
</div> |
| 1554 |
</div> |
| 1555 |
</div>'; |
| 1556 |
|
| 1557 |
|
| 1558 |
$integrations['PayPal'] = array( |
| 1559 |
'content' => $content, |
| 1560 |
'icon' => $icon, |
| 1561 |
'title' => $title, |
| 1562 |
); |
| 1563 |
|
| 1564 |
return $integrations; |
| 1565 |
} |
| 1566 |
|
| 1567 |
// PayPal Settings integration in General settings page content |
| 1568 |
public function ays_settings_page_PayPal_content( $integrations, $args ){ |
| 1569 |
|
| 1570 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/paypal_logo.png'; |
| 1571 |
$title = __( 'PayPal', "survey-maker" ); |
| 1572 |
$blockquote_content = sprintf( __( "You can get your Client ID from %s", "survey-maker" ), "<a href='https://developer.paypal.com/developer/applications' target='_blank'> Developer Paypal.</a>"); |
| 1573 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 1574 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1575 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1576 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1577 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1578 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1579 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1580 |
$content .= __("Upgrade" , "survey-maker"); |
| 1581 |
$content .= '</div>'; |
| 1582 |
$content .= '</a>'; |
| 1583 |
$content .= '</div>'; |
| 1584 |
$content .= '<div class="form-group row">'; |
| 1585 |
$content .= '<div class="col-sm-12">'; |
| 1586 |
$content .= '<div class="form-group row"> |
| 1587 |
<div class="col-sm-3"> |
| 1588 |
<label for="ays_survey_paypal_client_id">'.__('PayPal Client ID',"survey-maker").'</label> |
| 1589 |
</div> |
| 1590 |
<div class="col-sm-9"> |
| 1591 |
<input type="text" class="ays-text-input" > |
| 1592 |
</div> |
| 1593 |
</div> |
| 1594 |
<hr> |
| 1595 |
<div class="form-group row"> |
| 1596 |
<div class="col-sm-3"> |
| 1597 |
<label>'.__('Payment terms',"survey-maker").'</label> |
| 1598 |
</div> |
| 1599 |
<div class="col-sm-9"> |
| 1600 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1601 |
<input type="radio" value="lifetime" checked/> |
| 1602 |
<span>'.__('Lifetime payment',"survey-maker").'</span> |
| 1603 |
</label> |
| 1604 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1605 |
<input type="radio" value="onetime" /> |
| 1606 |
<span>'.__('Onetime payment',"survey-maker").'</span> |
| 1607 |
</label> |
| 1608 |
</div> |
| 1609 |
</div> |
| 1610 |
<blockquote> |
| 1611 |
'.$blockquote_content.' |
| 1612 |
</blockquote> |
| 1613 |
</div> |
| 1614 |
</div> |
| 1615 |
</div> |
| 1616 |
</div>'; |
| 1617 |
|
| 1618 |
$integrations['PayPal'] = array( |
| 1619 |
'content' => $content, |
| 1620 |
'icon' => $icon, |
| 1621 |
'title' => $title |
| 1622 |
); |
| 1623 |
|
| 1624 |
return $integrations; |
| 1625 |
} |
| 1626 |
|
| 1627 |
// ===== Paypal Settings end ===== |
| 1628 |
|
| 1629 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1630 |
//====================================================================================// |
| 1631 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1632 |
|
| 1633 |
// ===== Stripe Settings start ===== |
| 1634 |
|
| 1635 |
// Stripe Settings integration |
| 1636 |
|
| 1637 |
// Stripe Settings integration in survey page content |
| 1638 |
public function ays_survey_page_Stripe_content( $integrations, $args ){ |
| 1639 |
// WP editor settings |
| 1640 |
$editor_id = 'ays_survey_stripe_message'; |
| 1641 |
$settings = array( |
| 1642 |
'editor_height' => 150, |
| 1643 |
'textarea_name' => 'ays_survey_stripe_message', |
| 1644 |
'editor_class' => 'ays-textarea', |
| 1645 |
'media_elements' => false, |
| 1646 |
|
| 1647 |
); |
| 1648 |
|
| 1649 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/stripe_logo.png'; |
| 1650 |
$title = __('Stripe Settings',"survey-maker"); |
| 1651 |
ob_start(); |
| 1652 |
$content = ''; |
| 1653 |
wp_editor("", $editor_id, $settings); |
| 1654 |
$content .= '<div class="form-group row" style="padding: 10px;"> |
| 1655 |
<div class="col-sm-12 ays-pro-features-v2-main-box"> |
| 1656 |
<div class="ays-pro-features-v2-big-buttons-box"> |
| 1657 |
<div class="ays-pro-features-v2-video-button"></div> |
| 1658 |
<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 1659 |
<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div> |
| 1660 |
<div class="ays-pro-features-v2-upgrade-text"> |
| 1661 |
'.__("Upgrade" , "survey-maker").' |
| 1662 |
</div> |
| 1663 |
</a> |
| 1664 |
</div> |
| 1665 |
<div class="ays-pro-features-v2-small-buttons-box"> |
| 1666 |
<div class="ays-pro-features-v2-video-button"></div> |
| 1667 |
<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 1668 |
<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div> |
| 1669 |
<div class="ays-pro-features-v2-upgrade-text"> |
| 1670 |
'.__("Upgrade" , "survey-maker").' |
| 1671 |
</div> |
| 1672 |
</a> |
| 1673 |
</div> |
| 1674 |
<hr> |
| 1675 |
<div class="form-group row"> |
| 1676 |
<div class="col-sm-4"> |
| 1677 |
<label for="ays_survey_stripe_amount"> |
| 1678 |
'.__('Amount',"survey-maker").' |
| 1679 |
</label> |
| 1680 |
</div> |
| 1681 |
<div class="col-sm-8"> |
| 1682 |
<input type="text" |
| 1683 |
class="ays-text-input ays-text-input-short"> |
| 1684 |
<span class="ays_option_description">'. __( "Specify the amount of the payment.", "survey-maker" ) .'</span> |
| 1685 |
<span class="ays_option_description">'. __( "This field doesn't accept an empty value or a value less than 1.", "survey-maker" ).'</span> |
| 1686 |
</div> |
| 1687 |
</div> |
| 1688 |
<hr> |
| 1689 |
<div class="form-group row"> |
| 1690 |
<div class="col-sm-4"> |
| 1691 |
<label for="ays_survey_stripe_currency"> |
| 1692 |
'.__('Currency',"survey-maker").' |
| 1693 |
</label> |
| 1694 |
</div> |
| 1695 |
<div class="col-sm-8"> |
| 1696 |
<select class="ays-text-input ays-text-input-short">'; |
| 1697 |
$content .= '<option seleted value="" >-Currency-</option>'; |
| 1698 |
$content .= '</select> |
| 1699 |
</div> |
| 1700 |
</div> |
| 1701 |
<hr> |
| 1702 |
<div class="form-group row"> |
| 1703 |
<div class="col-sm-4"> |
| 1704 |
<label for="ays_stripe_currency"> |
| 1705 |
'.__('Payment details',"survey-maker").' |
| 1706 |
</label> |
| 1707 |
</div> |
| 1708 |
<div class="col-sm-8">'; |
| 1709 |
$editor_contents = ob_get_clean(); |
| 1710 |
$content .= $editor_contents; |
| 1711 |
$content .= '</div> |
| 1712 |
</div> |
| 1713 |
</div> |
| 1714 |
</div>'; |
| 1715 |
|
| 1716 |
|
| 1717 |
$integrations['stripe'] = array( |
| 1718 |
'content' => $content, |
| 1719 |
'icon' => $icon, |
| 1720 |
'title' => $title, |
| 1721 |
); |
| 1722 |
|
| 1723 |
return $integrations; |
| 1724 |
} |
| 1725 |
// Stripe Settings integration / settings page |
| 1726 |
|
| 1727 |
// Stripe Settings integration in General settings page content |
| 1728 |
public function ays_settings_page_Stripe_content( $integrations, $args ){ |
| 1729 |
|
| 1730 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/stripe_logo.png'; |
| 1731 |
$title = __( 'Stripe', "survey-maker" ); |
| 1732 |
$blockquote_content = __( "You can get your Publishable and Secret keys on API Keys page on your Stripe dashboard.", "survey-maker" ); |
| 1733 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 1734 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1735 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1736 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1737 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1738 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1739 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1740 |
$content .= __("Upgrade" , "survey-maker"); |
| 1741 |
$content .= '</div>'; |
| 1742 |
$content .= '</a>'; |
| 1743 |
$content .= '</div>'; |
| 1744 |
$content .= '<div class="form-group row">'; |
| 1745 |
$content .= '<div class="col-sm-12">'; |
| 1746 |
$content .= '<div class="form-group row"> |
| 1747 |
<div class="col-sm-3"> |
| 1748 |
<label for="ays_survey_stripe_api_key">'.__('Stripe Publishable Key',"survey-maker").'</label> |
| 1749 |
</div> |
| 1750 |
<div class="col-sm-9"> |
| 1751 |
<input type="text" |
| 1752 |
class="ays-text-input"> |
| 1753 |
</div> |
| 1754 |
</div> |
| 1755 |
<hr> |
| 1756 |
<div class="form-group row"> |
| 1757 |
<div class="col-sm-3"> |
| 1758 |
<label for="ays_survey_stripe_secret_key">'.__('Stripe Secret Key',"survey-maker").'</label> |
| 1759 |
</div> |
| 1760 |
<div class="col-sm-9"> |
| 1761 |
<input type="text" |
| 1762 |
class="ays-text-input" |
| 1763 |
value=""> |
| 1764 |
</div> |
| 1765 |
</div> |
| 1766 |
<hr> |
| 1767 |
<div class="form-group row"> |
| 1768 |
<div class="col-sm-3"> |
| 1769 |
<label>'.__('Payment terms',"survey-maker").'</label> |
| 1770 |
</div> |
| 1771 |
<div class="col-sm-9"> |
| 1772 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1773 |
<input type="radio" value="lifetime" checked/> |
| 1774 |
<span>'.__('Lifetime payment',"survey-maker").'</span> |
| 1775 |
</label> |
| 1776 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1777 |
<input type="radio" value="onetime" /> |
| 1778 |
<span>'.__('Onetime payment',"survey-maker").'</span> |
| 1779 |
</label> |
| 1780 |
</div> |
| 1781 |
</div> |
| 1782 |
<blockquote> |
| 1783 |
'.$blockquote_content.' |
| 1784 |
</blockquote> |
| 1785 |
</div> |
| 1786 |
</div> |
| 1787 |
</div> |
| 1788 |
</div>'; |
| 1789 |
|
| 1790 |
$integrations['stripe'] = array( |
| 1791 |
'content' => $content, |
| 1792 |
'icon' => $icon, |
| 1793 |
'title' => $title |
| 1794 |
); |
| 1795 |
|
| 1796 |
return $integrations; |
| 1797 |
} |
| 1798 |
|
| 1799 |
// ===== Stripe Settings end ===== |
| 1800 |
|
| 1801 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1802 |
//====================================================================================// |
| 1803 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1804 |
|
| 1805 |
// ===== reCAPTCHA start ===== |
| 1806 |
|
| 1807 |
// reCAPTCHA integration |
| 1808 |
|
| 1809 |
// reCAPTCHA integration in survey page content |
| 1810 |
public function ays_survey_page_recaptcha_content( $integrations, $args ){ |
| 1811 |
|
| 1812 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/recaptcha_logo.png'; |
| 1813 |
$title = __('reCAPTCHA Settings',"survey-maker"); |
| 1814 |
|
| 1815 |
$content = ''; |
| 1816 |
$disabled = "disabled"; |
| 1817 |
$checked = ''; |
| 1818 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 1819 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1820 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1821 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1822 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1823 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1824 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1825 |
$content .= __("Upgrade" , "survey-maker"); |
| 1826 |
$content .= '</div>'; |
| 1827 |
$content .= '</a>'; |
| 1828 |
$content .= '</div>'; |
| 1829 |
$content .= '<hr/>'; |
| 1830 |
$content .= '<div class="form-group row"> |
| 1831 |
<div class="col-sm-4"> |
| 1832 |
<label for="ays_survey_enable_recaptcha">'. __('Enable reCAPTCHA', "survey-maker") .'</label> |
| 1833 |
</div> |
| 1834 |
<div class="col-sm-1"> |
| 1835 |
<input type="checkbox" class="ays-enable-timer1"/> |
| 1836 |
</div> |
| 1837 |
</div> |
| 1838 |
</div> |
| 1839 |
</div>'; |
| 1840 |
|
| 1841 |
|
| 1842 |
|
| 1843 |
$integrations['recaptcha'] = array( |
| 1844 |
'content' => $content, |
| 1845 |
'icon' => $icon, |
| 1846 |
'title' => $title, |
| 1847 |
); |
| 1848 |
|
| 1849 |
return $integrations; |
| 1850 |
} |
| 1851 |
|
| 1852 |
// reCAPTCHA integration / settings page |
| 1853 |
|
| 1854 |
// reCAPTCHA integration in General settings page content |
| 1855 |
public function ays_settings_page_recaptcha_content( $integrations, $args ){ |
| 1856 |
|
| 1857 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/recaptcha_logo.png'; |
| 1858 |
$title = __( 'reCAPTCHA', "survey-maker" ); |
| 1859 |
|
| 1860 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 1861 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1862 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1863 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1864 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1865 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1866 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1867 |
$content .= __("Upgrade" , "survey-maker"); |
| 1868 |
$content .= '</div>'; |
| 1869 |
$content .= '</a>'; |
| 1870 |
$content .= '</div>'; |
| 1871 |
$content .= '<div class="form-group row"> |
| 1872 |
<div class="col-sm-12"> |
| 1873 |
<div class="form-group row"> |
| 1874 |
<div class="col-sm-3"> |
| 1875 |
<label for="ays_survey_recaptcha_version">'. __('reCAPTCHA Version', "survey-maker") .'</label> |
| 1876 |
</div> |
| 1877 |
<div class="col-sm-9"> |
| 1878 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1879 |
<input type="radio" /> v2 |
| 1880 |
</label> |
| 1881 |
<label class="ays_survey_loader" style="display:inline-block;"> |
| 1882 |
<input type="radio" /> v3 |
| 1883 |
</label> |
| 1884 |
</div> |
| 1885 |
</div> |
| 1886 |
<hr/> |
| 1887 |
<div class="form-group row"> |
| 1888 |
<div class="col-sm-3"> |
| 1889 |
<label for="ays_survey_recaptcha_site_key">'. __('reCAPTCHA v2 Site Key', "survey-maker") .'</label> |
| 1890 |
</div> |
| 1891 |
<div class="col-sm-9"> |
| 1892 |
<input type="text" class="ays-text-input"> |
| 1893 |
</div> |
| 1894 |
</div> |
| 1895 |
<hr/> |
| 1896 |
<div class="form-group row"> |
| 1897 |
<div class="col-sm-3"> |
| 1898 |
<label for="ays_survey_recaptcha_secret_key">'. __('reCAPTCHA v2 Secret Key', "survey-maker") .'</label> |
| 1899 |
</div> |
| 1900 |
<div class="col-sm-9"> |
| 1901 |
<input type="text" class="ays-text-input" > |
| 1902 |
</div> |
| 1903 |
</div> |
| 1904 |
<hr/> |
| 1905 |
<div class="form-group row"> |
| 1906 |
<div class="col-sm-3"> |
| 1907 |
<label for="ays_survey_recaptcha_language">'. __('reCAPTCHA Language', "survey-maker") .'</label> |
| 1908 |
</div> |
| 1909 |
<div class="col-sm-9"> |
| 1910 |
<input type="text" class="ays-text-input" > |
| 1911 |
<span class="ays_survey_small_hint_text"> |
| 1912 |
<span>' . sprintf( |
| 1913 |
__( "e.g. en, de - Language used by reCAPTCHA. To get the code for your language click %s here %s", "survey-maker" ), |
| 1914 |
'<a href="https://developers.google.com/recaptcha/docs/language" target="_blank">', |
| 1915 |
"</a>" |
| 1916 |
) . '</span> |
| 1917 |
</span> |
| 1918 |
</div> |
| 1919 |
</div> |
| 1920 |
<hr/> |
| 1921 |
<div class="form-group row"> |
| 1922 |
<div class="col-sm-3"> |
| 1923 |
<label for="ays_survey_recaptcha_theme">'. __('reCAPTCHA Theme', "survey-maker") .'</label> |
| 1924 |
</div> |
| 1925 |
<div class="col-sm-9"> |
| 1926 |
<select class="ays-text-input" id="ays_survey_recaptcha_theme" name="ays_survey_recaptcha_theme" > |
| 1927 |
<option value="light" selected>'. __('Light', "survey-maker") .'</option> |
| 1928 |
</select> |
| 1929 |
</div> |
| 1930 |
</div> |
| 1931 |
'; |
| 1932 |
$content .= '<blockquote>'; |
| 1933 |
$content .= sprintf( __( "You need to set up reCAPTCHA in your Google account to generate the required keys and get them by %s Google's reCAPTCHA admin console %s.", "survey-maker" ), "<a href='https://www.google.com/recaptcha/admin/create' target='_blank'>", "</a>"); |
| 1934 |
$content .= '</blockquote>'; |
| 1935 |
$content .= ' |
| 1936 |
</div> |
| 1937 |
</div> |
| 1938 |
</div> |
| 1939 |
</div>'; |
| 1940 |
|
| 1941 |
$integrations['recaptcha'] = array( |
| 1942 |
'content' => $content, |
| 1943 |
'icon' => $icon, |
| 1944 |
'title' => $title, |
| 1945 |
); |
| 1946 |
|
| 1947 |
return $integrations; |
| 1948 |
} |
| 1949 |
|
| 1950 |
// ===== reCAPTCHA end ===== |
| 1951 |
|
| 1952 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1953 |
//====================================================================================// |
| 1954 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 1955 |
|
| 1956 |
// ===== Aweber start ===== |
| 1957 |
|
| 1958 |
// Aweber integration |
| 1959 |
|
| 1960 |
// Aweber integration in survey page content |
| 1961 |
public function ays_survey_page_aweber_content( $integrations, $args ){ |
| 1962 |
|
| 1963 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/aweber-logo.png'; |
| 1964 |
$title = __('Aweber Settings',"survey-maker"); |
| 1965 |
|
| 1966 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 1967 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 1968 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 1969 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 1970 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 1971 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 1972 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 1973 |
$content .= __("Upgrade" , "survey-maker"); |
| 1974 |
$content .= '</div>'; |
| 1975 |
$content .= '</a>'; |
| 1976 |
$content .= '</div>'; |
| 1977 |
$content .= '<hr/>'; |
| 1978 |
// Content part reaplce here start |
| 1979 |
$content .= '<div class="form-group row">'; |
| 1980 |
$content .= '<div class="col-sm-4">'; |
| 1981 |
$content .= '<label for="ays_survey_enable_aweber">'. __('Enable Aweber', "survey-maker") .'</label>'; |
| 1982 |
$content .= '</div>'; |
| 1983 |
$content .='<div class="col-sm-1">'; |
| 1984 |
$content .= '<input type="checkbox" checked class="ays-enable-timer1" />'; |
| 1985 |
$content .= '</div>'; |
| 1986 |
$content .= '</div>'; |
| 1987 |
$content .= '<hr>'; |
| 1988 |
$content .= '<div class="form-group row">'; |
| 1989 |
$content .= '<div class="col-sm-4">'; |
| 1990 |
$content .= '<label for="ays_survey_aweber_list_id">'. __('Aweber Lists', "survey-maker") .'</label>'; |
| 1991 |
$content .= '</div>'; |
| 1992 |
$content .= '<div class="col-sm-8">'; |
| 1993 |
$content .= '<select class="ays-text-input">'; |
| 1994 |
$content .= '<option value="" >Select list</option>'; |
| 1995 |
$content .= '</select>'; |
| 1996 |
$content .= '</div>'; |
| 1997 |
$content .= '</div>'; |
| 1998 |
// Content part reaplce here end |
| 1999 |
$content .= '</div>'; |
| 2000 |
$content .= '</div>'; |
| 2001 |
|
| 2002 |
$integrations['aweber'] = array( |
| 2003 |
'content' => $content, |
| 2004 |
'icon' => $icon, |
| 2005 |
'title' => $title, |
| 2006 |
); |
| 2007 |
|
| 2008 |
return $integrations; |
| 2009 |
} |
| 2010 |
|
| 2011 |
// Aweber integration / settings page |
| 2012 |
|
| 2013 |
// Aweber integration in General settings page content |
| 2014 |
public function ays_aweber_settings_page_content( $integrations, $args ){ |
| 2015 |
|
| 2016 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/aweber-logo.png'; |
| 2017 |
$title = __( 'Aweber', "survey-maker" ); |
| 2018 |
|
| 2019 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2020 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2021 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2022 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2023 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2024 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2025 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2026 |
$content .= __("Upgrade" , "survey-maker"); |
| 2027 |
$content .= '</div>'; |
| 2028 |
$content .= '</a>'; |
| 2029 |
$content .= '</div>'; |
| 2030 |
// Content part reaplce here start |
| 2031 |
$content .= '<div class="form-group row">'; |
| 2032 |
$content .= '<div class="col-sm-12">'; |
| 2033 |
$content .= '<div class="form-group row"> |
| 2034 |
<div class="col-sm-3"> |
| 2035 |
<button id="aweberInstructionsPopOver" type="button" class="btn btn-info" data-original-title="Aweber Integration Setup Instructions" >'.__('Instructions', "survey-maker").'</button> |
| 2036 |
</div> |
| 2037 |
</div>'; |
| 2038 |
$content .= '<div class="form-group row">'; |
| 2039 |
$content .= '<div class="col-sm-3">'; |
| 2040 |
$content .= '<label for="ays_survey_aweber_client_id">'. __('Client ID', "survey-maker") .'</label>'; |
| 2041 |
$content .= '</div>'; |
| 2042 |
$content .= '<div class="col-sm-9">'; |
| 2043 |
$content .= '<input type="text" class="ays-text-input">'; |
| 2044 |
$content .= '</div>'; |
| 2045 |
$content .= '</div>'; |
| 2046 |
$content .= '<hr>'; |
| 2047 |
$content .= '<div class="form-group row">'; |
| 2048 |
$content .= '<div class="col-sm-3">'; |
| 2049 |
$content .= '<label for="ays_survey_aweber_client_secret">'. __('Client Secret', "survey-maker") .'</label>'; |
| 2050 |
$content .= '</div>'; |
| 2051 |
$content .= '<div class="col-sm-9">'; |
| 2052 |
$content .= '<input type="text" class="ays-text-input">'; |
| 2053 |
$content .= '</div>'; |
| 2054 |
$content .= '</div>'; |
| 2055 |
$content .= '<hr>'; |
| 2056 |
$content .= '<div class="form-group row">'; |
| 2057 |
$content .= '<div class="col-sm-3"></div>'; |
| 2058 |
$content .= '<div class="col-sm-9">'; |
| 2059 |
$content .= '<button type="submit" class="btn btn-outline-info">'.__("Connect", "survey-maker").'</button>'; |
| 2060 |
$content .= '</div>'; |
| 2061 |
$content .= '</div>'; |
| 2062 |
$content .= '</div>'; |
| 2063 |
$content .= '</div>'; |
| 2064 |
// Content part reaplce here end |
| 2065 |
$content .= '</div>'; |
| 2066 |
$content .= '</div>'; |
| 2067 |
|
| 2068 |
$integrations['aweber'] = array( |
| 2069 |
'content' => $content, |
| 2070 |
'icon' => $icon, |
| 2071 |
'title' => $title, |
| 2072 |
); |
| 2073 |
|
| 2074 |
return $integrations; |
| 2075 |
} |
| 2076 |
|
| 2077 |
// ===== Aweber end ===== |
| 2078 |
|
| 2079 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2080 |
//====================================================================================// |
| 2081 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2082 |
|
| 2083 |
// ===== MailPoet start ===== |
| 2084 |
|
| 2085 |
// MailPoet integration |
| 2086 |
|
| 2087 |
// MailPoet integration in survey page content |
| 2088 |
public function ays_survey_page_mailpoet_content( $integrations, $args ){ |
| 2089 |
|
| 2090 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/mail_poet.png'; |
| 2091 |
$title = __('MailPoet Settings',"survey-maker"); |
| 2092 |
|
| 2093 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2094 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2095 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2096 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2097 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2098 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2099 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2100 |
$content .= __("Upgrade" , "survey-maker"); |
| 2101 |
$content .= '</div>'; |
| 2102 |
$content .= '</a>'; |
| 2103 |
$content .= '</div>'; |
| 2104 |
$content .= '<hr/>'; |
| 2105 |
// Content part reaplce here start |
| 2106 |
$content .= '<div class="form-group row"> |
| 2107 |
<div class="col-sm-4"> |
| 2108 |
<label for="ays_enable_mailpoet">'. __('Enable MailPoet',"survey-maker") .'</label> |
| 2109 |
</div> |
| 2110 |
<div class="col-sm-1"> |
| 2111 |
<input type="checkbox" checked class="ays-enable-timer1">'; |
| 2112 |
$content .= ' |
| 2113 |
</div> |
| 2114 |
</div> |
| 2115 |
<hr> |
| 2116 |
<div class="form-group row"> |
| 2117 |
<div class="col-sm-4"> |
| 2118 |
<label for="ays_mailpoet_list">'. __('MailPoet list',"survey-maker") .'</label> |
| 2119 |
</div> |
| 2120 |
<div class="col-sm-8">'; |
| 2121 |
$content .= '<select class="ays-text-input">'; |
| 2122 |
$content .= '<option value="" >'. __( "Select list", "survey-maker" ) .'</option>'; |
| 2123 |
$content .= '</select>'; |
| 2124 |
$content .= '</div> |
| 2125 |
</div>'; |
| 2126 |
// Content part reaplce here end |
| 2127 |
$content .= '</div>'; |
| 2128 |
$content .= '</div>'; |
| 2129 |
|
| 2130 |
$integrations['mailpoet'] = array( |
| 2131 |
'content' => $content, |
| 2132 |
'icon' => $icon, |
| 2133 |
'title' => $title, |
| 2134 |
); |
| 2135 |
|
| 2136 |
return $integrations; |
| 2137 |
} |
| 2138 |
|
| 2139 |
// MailPoet integration / settings page |
| 2140 |
|
| 2141 |
// MailPoet integration in General settings page content |
| 2142 |
public function ays_settings_page_mailpoet_content( $integrations, $args ){ |
| 2143 |
|
| 2144 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/mail_poet.png'; |
| 2145 |
$title = __( 'MailPoet', "survey-maker" ); |
| 2146 |
|
| 2147 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2148 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2149 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2150 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2151 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2152 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2153 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2154 |
$content .= __("Upgrade" , "survey-maker"); |
| 2155 |
$content .= '</div>'; |
| 2156 |
$content .= '</a>'; |
| 2157 |
$content .= '</div>'; |
| 2158 |
// Content part reaplce here start |
| 2159 |
$content .= '<blockquote style="width: 50%; margin: initial;">'.__('To choose a list, please go to the <strong>Integration</strong> tab of the given survey.' , "survey-maker").'</blockquote>'; |
| 2160 |
// Content part reaplce here end |
| 2161 |
$content .= '</div>'; |
| 2162 |
$content .= '</div>'; |
| 2163 |
|
| 2164 |
$integrations['mailpoet'] = array( |
| 2165 |
'content' => $content, |
| 2166 |
'icon' => $icon, |
| 2167 |
'title' => $title, |
| 2168 |
); |
| 2169 |
|
| 2170 |
return $integrations; |
| 2171 |
} |
| 2172 |
|
| 2173 |
// ===== MailPoet end ===== |
| 2174 |
|
| 2175 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2176 |
//====================================================================================// |
| 2177 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2178 |
|
| 2179 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2180 |
//====================================================================================// |
| 2181 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2182 |
|
| 2183 |
// ===== MyCred start ===== |
| 2184 |
|
| 2185 |
// MyCred integration / settings page |
| 2186 |
|
| 2187 |
// MyCred integration in General settings page content |
| 2188 |
public function ays_mycred_settings_page_content( $integrations, $args ){ |
| 2189 |
|
| 2190 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/mycred_icon.png'; |
| 2191 |
$title = __( 'MyCred', "survey-maker" ); |
| 2192 |
|
| 2193 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2194 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2195 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2196 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2197 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2198 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2199 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2200 |
$content .= __("Upgrade" , "survey-maker"); |
| 2201 |
$content .= '</div>'; |
| 2202 |
$content .= '</a>'; |
| 2203 |
$content .= '</div>'; |
| 2204 |
// Content part reaplce here start |
| 2205 |
$content .= '<blockquote style="width: 50%; margin: initial;">'; |
| 2206 |
$content .= __( "Setup your first point type and go to the Hook page. Choose Survey Maker from the Available Hooks list.", "survey-maker" ); |
| 2207 |
$content .= '<br>'; |
| 2208 |
$content .= __( " Configure the settings and save the hook.", "survey-maker" ); |
| 2209 |
$content .= '</blockquote>'; |
| 2210 |
// Content part reaplce here end |
| 2211 |
$content .= '</div>'; |
| 2212 |
$content .= '</div>'; |
| 2213 |
|
| 2214 |
$integrations['mycred'] = array( |
| 2215 |
'content' => $content, |
| 2216 |
'icon' => $icon, |
| 2217 |
'title' => $title, |
| 2218 |
); |
| 2219 |
|
| 2220 |
return $integrations; |
| 2221 |
} |
| 2222 |
|
| 2223 |
// ===== MyCred end ===== |
| 2224 |
|
| 2225 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2226 |
//====================================================================================// |
| 2227 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2228 |
|
| 2229 |
// ===== Klaviyo start ===== |
| 2230 |
|
| 2231 |
// Klaviyo integration |
| 2232 |
|
| 2233 |
// Klaviyo integration in survey page content |
| 2234 |
public function ays_survey_page_klaviyo_content( $integrations, $args ){ |
| 2235 |
|
| 2236 |
$icon = SURVEY_MAKER_ADMIN_URL .'/images/integrations/klaviyo-logo.png'; |
| 2237 |
$title = __('Klaviyo Settings',"survey-maker"); |
| 2238 |
|
| 2239 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2240 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2241 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2242 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2243 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker#ays-pro-sm-plans-box-sg" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2244 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2245 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2246 |
$content .= __("Upgrade" , "survey-maker"); |
| 2247 |
$content .= '</div>'; |
| 2248 |
$content .= '</a>'; |
| 2249 |
$content .= '</div>'; |
| 2250 |
$content .= '<hr/>'; |
| 2251 |
// Content part reaplce here start |
| 2252 |
$content .= '<div class="form-group row"> |
| 2253 |
<div class="col-sm-4"> |
| 2254 |
<label for="ays_survey_enable_klaviyo">'. __('Enable Klaviyo', "survey-maker") .'</label> |
| 2255 |
</div> |
| 2256 |
<div class="col-sm-1"> |
| 2257 |
<input type="checkbox" checked class="ays-enable-timer1" /> |
| 2258 |
</div> |
| 2259 |
</div> |
| 2260 |
<hr> |
| 2261 |
<div class="form-group row"> |
| 2262 |
<div class="col-sm-4"> |
| 2263 |
<label for="ays_survey_klaviyo_list">'. __('Select List', "survey-maker") .'</label> |
| 2264 |
</div> |
| 2265 |
<div class="col-sm-8"> |
| 2266 |
<select class="ays-text-input"> |
| 2267 |
<option>Select list</option> |
| 2268 |
</select> |
| 2269 |
</div>'; |
| 2270 |
$content .= '</div>'; |
| 2271 |
// Content part reaplce here end |
| 2272 |
$content .= '</div>'; |
| 2273 |
$content .= '</div>'; |
| 2274 |
|
| 2275 |
$integrations['klaviyo'] = array( |
| 2276 |
'content' => $content, |
| 2277 |
'icon' => $icon, |
| 2278 |
'title' => $title, |
| 2279 |
); |
| 2280 |
|
| 2281 |
return $integrations; |
| 2282 |
} |
| 2283 |
|
| 2284 |
// Klaviyo integration / settings page |
| 2285 |
|
| 2286 |
// Klaviyo integration in General settings page content |
| 2287 |
public function ays_settings_page_klaviyo_content( $integrations, $args ){ |
| 2288 |
|
| 2289 |
$icon = SURVEY_MAKER_ADMIN_URL . '/images/integrations/klaviyo-logo.png'; |
| 2290 |
$title = __( 'Klaviyo', "survey-maker" ); |
| 2291 |
|
| 2292 |
$content = '<div class="form-group row" style="margin:0px;">'; |
| 2293 |
$content .= '<div class="col-sm-12 ays-pro-features-v2-main-box ays-pro-features-v2-main-box-small">'; |
| 2294 |
$content .= '<div class="ays-pro-features-v2-small-buttons-box">'; |
| 2295 |
$content .= '<div class="ays-pro-features-v2-video-button"></div>'; |
| 2296 |
$content .= '<a href="https://ays-pro.com/wordpress/survey-maker" target="_blank" class="ays-pro-features-v2-upgrade-button">'; |
| 2297 |
$content .= '<div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg);" data-img-src="'.esc_attr(SURVEY_MAKER_ADMIN_URL).'/images/icons/pro-features-icons/Locked_24x24.svg"></div>'; |
| 2298 |
$content .= '<div class="ays-pro-features-v2-upgrade-text">'; |
| 2299 |
$content .= __("Upgrade" , "survey-maker"); |
| 2300 |
$content .= '</div>'; |
| 2301 |
$content .= '</a>'; |
| 2302 |
$content .= '</div>'; |
| 2303 |
// Content part reaplce here start |
| 2304 |
$content .= '<div class="form-group row"> |
| 2305 |
<div class="col-sm-12"> |
| 2306 |
<div class="form-group row"> |
| 2307 |
<div class="col-sm-3"> |
| 2308 |
<label for="ays_survey_Klaviyo_api_key">'. __('API Key', "survey-maker") .'</label> |
| 2309 |
</div> |
| 2310 |
<div class="col-sm-9"> |
| 2311 |
<input type="text" class="ays-text-input"> |
| 2312 |
</div> |
| 2313 |
</div>'; |
| 2314 |
$content .= '<blockquote>'; |
| 2315 |
$content .= __( "You can get your API key from your Account.", "survey-maker" ); |
| 2316 |
$content .= '</blockquote>'; |
| 2317 |
$content .= ' |
| 2318 |
</div> |
| 2319 |
</div>'; |
| 2320 |
// Content part reaplce here end |
| 2321 |
$content .= '</div>'; |
| 2322 |
$content .= '</div>'; |
| 2323 |
|
| 2324 |
$integrations['klaviyo'] = array( |
| 2325 |
'content' => $content, |
| 2326 |
'icon' => $icon, |
| 2327 |
'title' => $title, |
| 2328 |
); |
| 2329 |
|
| 2330 |
return $integrations; |
| 2331 |
} |
| 2332 |
|
| 2333 |
// ===== Klaviyo end ===== |
| 2334 |
|
| 2335 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2336 |
//====================================================================================// |
| 2337 |
//////////////////////////////////////////////////////////////////////////////////////// |
| 2338 |
} |
| 2339 |
|