Changeset 3290106
- Timestamp:
- 05/08/2025 06:36:51 PM (10 months ago)
- Location:
- peqiapp
- Files:
-
- 6 added
- 22 edited
- 1 copied
-
tags/2.0.21 (copied) (copied from peqiapp/trunk)
-
tags/2.0.21/assets/css/style.css (modified) (4 diffs)
-
tags/2.0.21/assets/css/styleguide-cloudez.css (added)
-
tags/2.0.21/assets/images/icon-cloudez.svg (added)
-
tags/2.0.21/assets/images/logo-cloudez.svg (added)
-
tags/2.0.21/includes/functions.php (modified) (42 diffs)
-
tags/2.0.21/includes/pages.php (modified) (4 diffs)
-
tags/2.0.21/pages/account.php (modified) (2 diffs)
-
tags/2.0.21/pages/awaiting.php (modified) (1 diff)
-
tags/2.0.21/pages/header.php (modified) (1 diff)
-
tags/2.0.21/pages/no_website.php (modified) (1 diff)
-
tags/2.0.21/pages/register.php (modified) (1 diff)
-
tags/2.0.21/pages/signin.php (modified) (1 diff)
-
tags/2.0.21/peqiapp.php (modified) (7 diffs)
-
tags/2.0.21/readme.txt (modified) (1 diff)
-
trunk/assets/css/style.css (modified) (4 diffs)
-
trunk/assets/css/styleguide-cloudez.css (added)
-
trunk/assets/images/icon-cloudez.svg (added)
-
trunk/assets/images/logo-cloudez.svg (added)
-
trunk/includes/functions.php (modified) (42 diffs)
-
trunk/includes/pages.php (modified) (4 diffs)
-
trunk/pages/account.php (modified) (2 diffs)
-
trunk/pages/awaiting.php (modified) (1 diff)
-
trunk/pages/header.php (modified) (1 diff)
-
trunk/pages/no_website.php (modified) (1 diff)
-
trunk/pages/register.php (modified) (1 diff)
-
trunk/pages/signin.php (modified) (1 diff)
-
trunk/peqiapp.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
peqiapp/tags/2.0.21/assets/css/style.css
r3128874 r3290106 89 89 .primary-button { 90 90 appearance: none; 91 background-color: var(--color-neutral-primary-150 , #fee400);91 background-color: var(--color-neutral-primary-150); 92 92 border: 2px solid var(--color-neutral-grayscale-250); 93 93 border-radius: 32px; 94 94 box-sizing: border-box; 95 color: var(--color-typeface-grayscale-400 , #000814);95 color: var(--color-typeface-grayscale-400); 96 96 cursor: pointer; 97 97 display: inline-block; … … 407 407 #header-page .logo { 408 408 flex-shrink: 0; 409 width: 100px; 409 height: 32px; 410 position: relative; 411 } 412 413 #header-page .cloudez-logo { 410 414 height: 32px; 411 415 position: relative; … … 2962 2966 justify-content: center; 2963 2967 align-items: center; 2964 line-height: 2px;2965 2968 margin-bottom: 10px; 2966 2969 } … … 2977 2980 display: flex; 2978 2981 flex-direction: row; 2979 flex-wrap: nowrap;2980 justify-content: flex-start;2982 flex-wrap: wrap; 2983 justify-content: center; 2981 2984 align-items: center; 2982 2985 gap: 20px; -
peqiapp/tags/2.0.21/includes/functions.php
r3205092 r3290106 143 143 $error_login_mail = "E-mail cannot be blank."; 144 144 set_transient('peqi_error_login_mail', $error_login_mail, 1); 145 wp_redirect(admin_url('admin.php?page= peqiapp-login'));145 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 146 146 exit(); 147 147 } … … 149 149 $error_login_password = "Password cannot be blank."; 150 150 set_transient('peqi_error_login_password', $error_login_password, 1); 151 wp_redirect(admin_url('admin.php?page= peqiapp-login'));151 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 152 152 exit(); 153 153 } … … 184 184 update_option('peqi_domain_key', $response_domain_body['results'][0]['key']); 185 185 186 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));186 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 187 187 exit(); 188 188 } elseif ($response_domain_code === 200 && empty($response_domain_body['results'])) { … … 192 192 PeqiApp_Functions::send_event('plugin-account', get_option('peqi_user_email')); 193 193 PeqiApp_Functions::send_stage_gchat(2); 194 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));194 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 195 195 exit(); 196 196 } else { … … 198 198 $error_login = 'Your session has expired. Please log in again.'; 199 199 set_transient('peqi_error_login', $error_login, 1); 200 wp_redirect(admin_url('admin.php?page= peqiapp-login'));200 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 201 201 exit(); 202 202 } … … 205 205 $error_login = 'Your session has expired. Please log in again.'; 206 206 set_transient('peqi_error_login', $error_login, 1); 207 wp_redirect(admin_url('admin.php?page= peqiapp-login'));207 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 208 208 exit(); 209 209 } else { … … 211 211 $error_login = 'Your session has expired. Please log in again.'; 212 212 set_transient('peqi_error_login', $error_login, 1); 213 wp_redirect(admin_url('admin.php?page= peqiapp-login'));213 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 214 214 exit(); 215 215 } … … 218 218 $error_login = 'E-mail or password is incorrect. Please try again.'; 219 219 set_transient('peqi_error_login', $error_login, 1); 220 wp_redirect(admin_url('admin.php?page= peqiapp-login'));220 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 221 221 exit(); 222 222 } else { … … 224 224 $error_login = 'Login failed. Please try again.'; 225 225 set_transient('peqi_error_login', $error_login, 1); 226 wp_redirect(admin_url('admin.php?page= peqiapp-login'));226 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 227 227 exit(); 228 228 } … … 230 230 $error_login = $e->getMessage(); 231 231 set_transient('peqi_error_login', $error_login, 1); 232 wp_redirect(admin_url('admin.php?page= peqiapp-login'));232 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 233 233 exit; 234 234 } … … 250 250 $error_register_mail = 'E-mail cannot be blank.'; 251 251 set_transient('peqi_error_register_mail', $error_register_mail, 1); 252 wp_redirect(admin_url('admin.php?page= peqiapp-register'));252 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 253 253 exit(); 254 254 } … … 257 257 $error_register_name = 'Full Name cannot be blank.'; 258 258 set_transient('peqi_error_register_name', $error_register_name, 1); 259 wp_redirect(admin_url('admin.php?page= peqiapp-register'));259 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 260 260 exit(); 261 261 } … … 264 264 $error_register_phone = 'Phone number cannot be blank.'; 265 265 set_transient('peqi_error_register_phone', $error_register_phone, 1); 266 wp_redirect(admin_url('admin.php?page= peqiapp-register'));266 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 267 267 exit(); 268 268 } … … 271 271 $error_register_password = 'Password cannot be blank.'; 272 272 set_transient('peqi_error_register_password', $error_register_password, 1); 273 wp_redirect(admin_url('admin.php?page= peqiapp-register'));273 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 274 274 exit(); 275 275 } … … 307 307 PeqiApp_Functions::send_stage_gchat(2); 308 308 // Redireciona para a página de validação de domínio 309 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));309 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 310 310 } else { 311 311 $success_message = true; 312 312 set_transient('peqi_success_register', $success_message, 1); 313 wp_redirect(admin_url('admin.php?page= peqiapp-login'));313 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 314 314 exit(); 315 315 } … … 317 317 $success_message = true; 318 318 set_transient('peqi_success_register', $success_message, 1); 319 wp_redirect(admin_url('admin.php?page= peqiapp-login'));319 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 320 320 exit(); 321 321 } … … 324 324 $error_register_mail = "This e-mail is already in use. Please try another one."; 325 325 set_transient('peqi_error_register_mail', $error_register_mail, 1); 326 wp_redirect(admin_url('admin.php?page= peqiapp-register'));326 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 327 327 exit(); 328 328 } else { … … 330 330 $error_register = 'Registration failed. Please try again.'; 331 331 set_transient('peqi_error_register', $error_register, 1); 332 wp_redirect(admin_url('admin.php?page= peqiapp-register'));332 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 333 333 exit(); 334 334 } … … 336 336 $error_register = $e->getMessage(); 337 337 set_transient('peqi_error_register', $error_register, 1); 338 wp_redirect(admin_url('admin.php?page= peqiapp-register'));338 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 339 339 exit; 340 340 } … … 355 355 $success_clear_cache = 'Cache cleared successfully.'; 356 356 set_transient('peqi_success_clear_cache', $success_clear_cache, 1); 357 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));357 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 358 358 exit(); 359 359 } else { … … 361 361 $error_clear_cache = 'Failed to clear cache. Please try again.'; 362 362 set_transient('peqi_error_clear_cache', $error_clear_cache, 1); 363 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));363 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 364 364 exit(); 365 365 } … … 367 367 $error_clear_cache = $e->getMessage(); 368 368 set_transient('peqi_error_clear_cache', $error_clear_cache, 1); 369 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));369 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 370 370 exit; 371 371 } … … 384 384 $error_check_website = 'Website URL cannot be blank.'; 385 385 set_transient('peqi_error_check_website', $error_check_website, 1); 386 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));386 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 387 387 exit(); 388 388 } … … 400 400 PeqiApp_Functions::send_event('plugin-validate', PEQI_WEBSITE); 401 401 PeqiApp_Functions::send_stage_gchat(3); 402 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));402 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 403 403 exit(); 404 404 } else { … … 406 406 $error_message = 'Failed to validate website. Please try again.'; 407 407 set_transient('peqi_error_check_website', $error_message, 1); 408 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));408 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 409 409 exit(); 410 410 } … … 412 412 $error_check_website = $e->getMessage(); 413 413 set_transient('peqi_error_check_website', $error_check_website, 1); 414 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));414 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 415 415 exit; 416 416 } … … 436 436 $success_change_level = 'Optimization level updated successfully.'; 437 437 set_transient('peqi_success_change_level', $success_change_level, 1); 438 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));438 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 439 439 exit(); 440 440 } else { … … 442 442 $error_change_level = 'Failed to update optimization level. Please try again.'; 443 443 set_transient('peqi_error_change_level', $error_change_level, 1); 444 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));444 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 445 445 exit(); 446 446 } … … 448 448 $error_change_level = $e->getMessage(); 449 449 set_transient('peqi_error_change_level', $error_change_level, 1); 450 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));450 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 451 451 exit; 452 452 } … … 459 459 { 460 460 if (defined('PEQI_DEBUG') && PEQI_DEBUG === true) { 461 $plan_trial = "price_1 OZdPuJUpNS565Y8EpmNx5fN";461 $plan_trial = "price_1RDrjtDj2BLuJgJWHfE0QxWj"; 462 462 } else { 463 $plan_trial = "price_1 OoXpcJUpNS565Y8337IJIDk";463 $plan_trial = "price_1QqxFMDj2BLuJgJWu3Iwso03"; 464 464 } 465 465 … … 481 481 PeqiApp_Functions::send_event('plugin-awaiting', PEQI_WEBSITE); 482 482 PeqiApp_Functions::send_stage_gchat(7); 483 wp_redirect(admin_url('admin.php?page= peqiapp-awaiting'));483 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-awaiting')); 484 484 exit(); 485 485 } else { … … 487 487 $error_activate_plan = 'Failed to activate plan. Please try again.'; 488 488 set_transient('peqi_error_activate_plan', $error_activate_plan, 1); 489 wp_redirect(admin_url('admin.php?page= peqiapp-results'));489 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 490 490 exit(); 491 491 } … … 493 493 $error_activate_plan = $e->getMessage(); 494 494 set_transient('peqi_error_activate_plan', $error_activate_plan, 1); 495 wp_redirect(admin_url('admin.php?page= peqiapp-results'));495 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 496 496 exit; 497 497 } … … 528 528 PeqiApp_Functions::send_event('plugin-preview', PEQI_WEBSITE); 529 529 PeqiApp_Functions::send_stage_gchat(5); 530 wp_redirect(admin_url('admin.php?page= peqiapp-results'));530 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 531 531 exit(); 532 532 } elseif ($http_code === 400 && !empty($response_body['fqdn']) && $response_body['fqdn'][0] === 'Domain FQDN already being used.') { … … 534 534 $error_create_domain = 'This domain is already in use. Please try another one.'; 535 535 set_transient('peqi_error_create_domain', $error_create_domain, 1); 536 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));536 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 537 537 exit(); 538 538 } elseif ($http_code === 400 && !empty($response_body['ipaddr']) && $response_body['ipaddr'][0] === 'Invalid IP Address') { … … 540 540 $error_create_domain = 'This IP Address is invalid. Please try another one.'; 541 541 set_transient('peqi_error_create_domain', $error_create_domain, 1); 542 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));542 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 543 543 exit(); 544 544 } else { … … 546 546 $error_create_domain = 'Failed to create domain. Please try again.'; 547 547 set_transient('peqi_error_create_domain', $error_create_domain, 1); 548 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));548 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 549 549 exit(); 550 550 } … … 552 552 $error_create_domain = $e->getMessage(); 553 553 set_transient('peqi_error_create_domain', $error_create_domain, 1); 554 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));554 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 555 555 exit; 556 556 } … … 573 573 PeqiApp_Functions::send_event('plugin-dns', PEQI_WEBSITE); 574 574 PeqiApp_Functions::send_stage_gchat(9); 575 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));575 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 576 576 } elseif ($http_code === 200 && $response_body['status'] === 'error') { 577 577 // Se o domínio não estiver apontado, exibir um erro 578 578 $error_pointed_domain = 'Domain not pointing to Peqi. Await ammount of time and try again.'; 579 579 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 580 wp_redirect(admin_url('admin.php?page= peqiapp-success'));580 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 581 581 exit(); 582 582 } else { … … 584 584 $error_pointed_domain = 'Failed to check domain. Please try again.'; 585 585 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 586 wp_redirect(admin_url('admin.php?page= peqiapp-success'));586 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 587 587 exit(); 588 588 } … … 590 590 $error_pointed_domain = $e->getMessage(); 591 591 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 592 wp_redirect(admin_url('admin.php?page= peqiapp-success'));592 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 593 593 exit; 594 594 } … … 608 608 update_option('peqi_checkpoint', ''); 609 609 610 wp_redirect(admin_url('admin.php?page= peqiapp-login'));610 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 611 611 exit(); 612 612 } -
peqiapp/tags/2.0.21/includes/pages.php
r3205092 r3290106 39 39 public static function add_plugin_pages() 40 40 { 41 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { 42 return; 41 add_menu_page(PEQI_BRAND_NAME, PEQI_BRAND_NAME, 'manage_options', PEQI_SLUG_PREFIX, [__CLASS__, 'peqi_init_page'], PEQI_BRAND_ICON); 42 add_submenu_page(null, PEQI_BRAND_NAME, 'Dashboard', 'manage_options', PEQI_SLUG_PREFIX . '-dashboard', [__CLASS__, 'peqi_dashboard_page']); 43 add_submenu_page(null, PEQI_BRAND_NAME, 'No Website', 'manage_options', PEQI_SLUG_PREFIX . '-nowebsite', [__CLASS__, 'peqi_nowebsite_page']); 44 45 46 if (PEQI_SLUG_PREFIX === 'peqiapp') { 47 add_submenu_page(null, PEQI_BRAND_NAME, 'Sign-In', 'manage_options', PEQI_SLUG_PREFIX . '-login', [__CLASS__, 'peqi_login_page']); 48 add_submenu_page(null, PEQI_BRAND_NAME, 'Register', 'manage_options', PEQI_SLUG_PREFIX . '-register', [__CLASS__, 'peqi_register_page']); 49 add_submenu_page(null, PEQI_BRAND_NAME, 'Survey', 'manage_options', PEQI_SLUG_PREFIX . '-survey', [__CLASS__, 'peqi_survey_page']); 50 add_submenu_page(null, PEQI_BRAND_NAME, 'Check Domain', 'manage_options', PEQI_SLUG_PREFIX . '-check-domain', [__CLASS__, 'peqi_check_domain_page']); 51 add_submenu_page(null, PEQI_BRAND_NAME, 'Results Preview', 'manage_options', PEQI_SLUG_PREFIX . '-results', [__CLASS__, 'peqi_results_page']); 52 add_submenu_page(null, PEQI_BRAND_NAME, 'Awaiting Payment', 'manage_options', PEQI_SLUG_PREFIX . '-awaiting', [__CLASS__, 'peqi_awaiting_page']); 53 add_submenu_page(null, PEQI_BRAND_NAME, 'Payment Successful', 'manage_options', PEQI_SLUG_PREFIX . '-success', [__CLASS__, 'peqi_success_page']); 43 54 } 44 add_menu_page('PeqiApp', 'PeqiApp', 'manage_options', 'peqiapp', array(__CLASS__, 'peqi_init_page'), PEQIAPP_URL . 'assets/images/icon.svg');45 46 add_submenu_page(null, 'PeqiApp', 'Dashboard', 'manage_options', 'peqiapp-dashboard', array(__CLASS__, 'peqi_dashboard_page'));47 add_submenu_page(null, 'PeqiApp', 'Sign-In', 'manage_options', 'peqiapp-login', array(__CLASS__, 'peqi_login_page'));48 add_submenu_page(null, 'PeqiApp', 'Register', 'manage_options', 'peqiapp-register', array(__CLASS__, 'peqi_register_page'));49 add_submenu_page(null, 'PeqiApp', 'Survey', 'manage_options', 'peqiapp-survey', array(__CLASS__, 'peqi_survey_page'));50 add_submenu_page(null, 'PeqiApp', 'Check Domain', 'manage_options', 'peqiapp-check-domain', array(__CLASS__, 'peqi_check_domain_page'));51 add_submenu_page(null, 'PeqiApp', 'Results Preview', 'manage_options', 'peqiapp-results', array(__CLASS__, 'peqi_results_page'));52 add_submenu_page(null, 'PeqiApp', 'No Website', 'manage_options', 'peqiapp-nowebsite', array(__CLASS__, 'peqi_nowebsite_page'));53 add_submenu_page(null, 'PeqiApp', 'Awaiting Payment', 'manage_options', 'peqiapp-awaiting', array(__CLASS__, 'peqi_awaiting_page'));54 add_submenu_page(null, 'PeqiApp', 'Payment Successful', 'manage_options', 'peqiapp-success', array(__CLASS__, 'peqi_success_page'));55 55 } 56 56 … … 88 88 { 89 89 if (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'check-domain') { 90 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-check-domain') . '";</script>';90 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain') . '";</script>'; 91 91 exit; 92 92 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'results-preview') { 93 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-results') . '";</script>';93 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results') . '";</script>'; 94 94 exit; 95 95 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'awaiting-payment') { 96 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-awaiting') . '";</script>';96 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-awaiting') . '";</script>'; 97 97 exit; 98 98 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'payment-success') { 99 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-success') . '";</script>';99 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success') . '";</script>'; 100 100 exit; 101 101 } … … 103 103 104 104 if (!self::is_user_authenticated()) { 105 echo '<script>window.location.href = "' . admin_url('admin.php?page=peqiapp-login') . '";</script>'; 105 if (PEQI_SLUG_PREFIX === 'peqiapp') { 106 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login') . '";</script>'; 107 } else { 108 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-nowebsite') . '";</script>'; 109 } 106 110 exit; 107 111 } … … 193 197 new Peqiapp_Pages(); 194 198 } 195 ?> -
peqiapp/tags/2.0.21/pages/account.php
r3116615 r3290106 14 14 <div class="title-container"> 15 15 <h3>Status: <span class="status">Active</span></h3> 16 <p style="line-height: 2px">You're connected as <span class="user-info"><?php echo esc_html(PEQI_USER_NAME); ?> (<?php echo esc_html(PEQI_USER_EMAIL); ?>)</span>.</p> 16 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 17 <p>You're connected as <span class="user-info"><?php echo esc_html(PEQI_USER_NAME); ?> (<?php echo esc_html(PEQI_USER_EMAIL); ?>)</span>.</p> 18 <?php } ?> 17 19 <?php if (PEQI_WEBSITE) { ?> 18 20 <p style="line-height: 2px">Your website is <span class="user-domain"><?php echo esc_html(PEQI_WEBSITE); ?>.</span> </p> … … 22 24 <input type="hidden" name="action" value="peqi_switch_account_form"> 23 25 <div class="button-home"> 24 <button name="switch_account" class="primary-button">SWITCH ACCOUNT</button> 26 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 27 <button name="switch_account" class="primary-button">SWITCH ACCOUNT</button> 28 <?php } ?> 25 29 </div> 26 30 </form> -
peqiapp/tags/2.0.21/pages/awaiting.php
r3116615 r3290106 15 15 16 16 if (empty($payment_url)) { 17 $plan_trial = "price_1 OZdPuJUpNS565Y8EpmNx5fN";17 $plan_trial = "price_1RDrjtDj2BLuJgJWHfE0QxWj"; 18 18 $response = PeqiApp_API::create_checkout($plan_trial); 19 19 $payment_url = json_decode(wp_remote_retrieve_body($response), true)['url']; -
peqiapp/tags/2.0.21/pages/header.php
r3116615 r3290106 11 11 <div id="header-page"> 12 12 <div class="logo"> 13 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-dark.svg'); ?>" alt="peqi-logo" class="peqi-logo"> 13 <?php if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { ?> 14 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-cloudez.svg'); ?>" alt="cloudez-logo" class="cloudez-logo" style="height: 32px;"> 15 <?php } else { ?> 16 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-dark.svg'); ?>" alt="peqi-logo" class="peqi-logo"> 17 <?php } ?> 14 18 </div> 15 19 </div> -
peqiapp/tags/2.0.21/pages/no_website.php
r3116615 r3290106 16 16 <div class="heading-1-xl">Website not found!</div> 17 17 <div class="typography"> 18 <p class="paragraph-2-m">Oops! This domain is not registered or is not registered to this user.</p> 19 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 18 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 19 <p class="paragraph-2-m">Oops! This domain is not registered or is not registered to this user.</p> 20 <?php } else { ?> 21 <p class="paragraph-2-m">Oops! This website is not registered.</p> 22 <?php } ?> 23 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 24 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 25 <?php } else { ?> 26 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 27 <?php } ?> 20 28 </div> 21 29 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>"> 22 30 <input type="hidden" name="action" value="peqi_switch_account_form"> 23 31 <div class="body-container"> 24 <button name="switch_account" class="primary-button" style="width: 184px;">SWITCH ACCOUNT</button> 32 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 33 <button name="switch_account" class="primary-button" style="width: 184px;">SWITCH ACCOUNT</button> 34 <?php } ?> 25 35 </div> 26 36 </form> -
peqiapp/tags/2.0.21/pages/register.php
r3116615 r3290106 100 100 </div> 101 101 </form> 102 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page= peqiapp-login'); ?>">102 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login'); ?>"> 103 103 <div class="container-not-registered"> 104 104 <button class="not-registered" type="submit" name="go_to_register">Already have an account?</button> -
peqiapp/tags/2.0.21/pages/signin.php
r3116615 r3290106 70 70 </form> 71 71 72 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page= peqiapp-register'); ?>">72 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register'); ?>"> 73 73 <div class="container-2-not-registered"> 74 74 <button class="not-registered" type="submit" name="create_account">First time here? Click to create your account.</button> -
peqiapp/tags/2.0.21/peqiapp.php
r3205092 r3290106 3 3 /** 4 4 * @package Peqi App 5 * @version 2.0.2 05 * @version 2.0.21 6 6 * Plugin Name: Peqi App 7 7 * Plugin URI: http://wordpress.org/plugins/peqiapp/ 8 8 * Description: You can manage your application settings, perform cache cleaning, adjust optimization levels, and view performance metrics. 9 * Version: 2.0.2 09 * Version: 2.0.21 10 10 * Requires at least: 4.7 11 11 * Author: Peqi … … 59 59 add_action('admin_enqueue_scripts', array($this, 'enqueue_intl_tel_input'), 999); 60 60 add_action('admin_enqueue_scripts', array($this, 'javascript_variables'), 999); 61 add_action('activated_plugin', array($this, 'peqiapp_activation_redirect')); 61 if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { 62 add_action('activated_plugin', array($this, 'peqiapp_activation_redirect')); 63 } 62 64 } 63 65 … … 85 87 define('PEQIAPP_PATH', plugin_dir_path(__FILE__)); 86 88 define('PEQIAPP_URL', plugin_dir_url(__FILE__)); 87 define('PEQIAPP_VERSION', '2.0.20'); 88 89 define('PEQIAPP_VERSION', '2.0.21'); 90 91 // Define o URL da API 89 92 if (defined('PEQI_DEBUG') && PEQI_DEBUG === true) { 90 93 define('PEQI_API_URL', 'https://dev-api.peqi.app'); … … 92 95 define('PEQI_API_URL', 'https://api.peqi.app'); 93 96 } 94 97 98 // Define o tema do plugin 99 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ === true) { 100 define('PEQI_SLUG_PREFIX', 'cloudez'); 101 define('PEQI_BRAND_NAME', 'Cloudez'); 102 define('PEQI_BRAND_ICON', PEQIAPP_URL . 'assets/images/icon-cloudez.svg'); 103 } else { 104 define('PEQI_SLUG_PREFIX', 'peqiapp'); 105 define('PEQI_BRAND_NAME', 'PeqiApp'); 106 define('PEQI_BRAND_ICON', PEQIAPP_URL . 'assets/images/icon.svg'); 107 } 108 95 109 define('PEQI_ENDPOINT_AUTH', '/v0/auth/token/'); 96 110 define('PEQI_ENDPOINT_TOKEN', '/v0/tokens/'); … … 151 165 { 152 166 if ($plugin == plugin_basename(__FILE__)) { 153 exit(wp_redirect(admin_url('admin.php?page= peqiapp-register')));167 exit(wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register'))); 154 168 } 155 169 } … … 161 175 { 162 176 // Impedir que os assets sejam carregados em outras páginas 163 if (!isset($_GET['page']) || strpos($_GET['page'], 'peqiapp') !== 0) { 177 if ( 178 !isset($_GET['page']) || 179 ( 180 strpos($_GET['page'], 'peqiapp') !== 0 && 181 strpos($_GET['page'], 'cloudez') !== 0 182 ) 183 ) { 164 184 return; 165 185 } 166 186 wp_enqueue_style('peqiapp-style', PEQIAPP_URL . 'assets/css/style.css', array(), PEQIAPP_VERSION, 'all'); 167 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide.css', array(), PEQIAPP_VERSION, 'all'); 187 188 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { 189 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide-cloudez.css', array(), PEQIAPP_VERSION, 'all'); 190 } else { 191 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide.css', array(), PEQIAPP_VERSION, 'all'); 192 } 193 168 194 wp_enqueue_style('peqiapp-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap', array(), PEQIAPP_VERSION, 'all'); 169 195 wp_enqueue_script('peqiapp-script', PEQIAPP_URL . 'assets/js/script.js', … … 180 206 { 181 207 // Impedir que os assets sejam carregados em outras páginas 182 if (!isset($_GET['page']) || $_GET['page'] !== 'peqiapp-register') {208 if (!isset($_GET['page']) || $_GET['page'] !== PEQI_SLUG_PREFIX . '-register') { 183 209 return; 184 210 } -
peqiapp/tags/2.0.21/readme.txt
r3205092 r3290106 4 4 Requires at least: 4.7 5 5 Tested up to: 6.6 6 Stable tag: 2.0.2 06 Stable tag: 2.0.21 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later -
peqiapp/trunk/assets/css/style.css
r3128874 r3290106 89 89 .primary-button { 90 90 appearance: none; 91 background-color: var(--color-neutral-primary-150 , #fee400);91 background-color: var(--color-neutral-primary-150); 92 92 border: 2px solid var(--color-neutral-grayscale-250); 93 93 border-radius: 32px; 94 94 box-sizing: border-box; 95 color: var(--color-typeface-grayscale-400 , #000814);95 color: var(--color-typeface-grayscale-400); 96 96 cursor: pointer; 97 97 display: inline-block; … … 407 407 #header-page .logo { 408 408 flex-shrink: 0; 409 width: 100px; 409 height: 32px; 410 position: relative; 411 } 412 413 #header-page .cloudez-logo { 410 414 height: 32px; 411 415 position: relative; … … 2962 2966 justify-content: center; 2963 2967 align-items: center; 2964 line-height: 2px;2965 2968 margin-bottom: 10px; 2966 2969 } … … 2977 2980 display: flex; 2978 2981 flex-direction: row; 2979 flex-wrap: nowrap;2980 justify-content: flex-start;2982 flex-wrap: wrap; 2983 justify-content: center; 2981 2984 align-items: center; 2982 2985 gap: 20px; -
peqiapp/trunk/includes/functions.php
r3205092 r3290106 143 143 $error_login_mail = "E-mail cannot be blank."; 144 144 set_transient('peqi_error_login_mail', $error_login_mail, 1); 145 wp_redirect(admin_url('admin.php?page= peqiapp-login'));145 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 146 146 exit(); 147 147 } … … 149 149 $error_login_password = "Password cannot be blank."; 150 150 set_transient('peqi_error_login_password', $error_login_password, 1); 151 wp_redirect(admin_url('admin.php?page= peqiapp-login'));151 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 152 152 exit(); 153 153 } … … 184 184 update_option('peqi_domain_key', $response_domain_body['results'][0]['key']); 185 185 186 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));186 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 187 187 exit(); 188 188 } elseif ($response_domain_code === 200 && empty($response_domain_body['results'])) { … … 192 192 PeqiApp_Functions::send_event('plugin-account', get_option('peqi_user_email')); 193 193 PeqiApp_Functions::send_stage_gchat(2); 194 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));194 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 195 195 exit(); 196 196 } else { … … 198 198 $error_login = 'Your session has expired. Please log in again.'; 199 199 set_transient('peqi_error_login', $error_login, 1); 200 wp_redirect(admin_url('admin.php?page= peqiapp-login'));200 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 201 201 exit(); 202 202 } … … 205 205 $error_login = 'Your session has expired. Please log in again.'; 206 206 set_transient('peqi_error_login', $error_login, 1); 207 wp_redirect(admin_url('admin.php?page= peqiapp-login'));207 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 208 208 exit(); 209 209 } else { … … 211 211 $error_login = 'Your session has expired. Please log in again.'; 212 212 set_transient('peqi_error_login', $error_login, 1); 213 wp_redirect(admin_url('admin.php?page= peqiapp-login'));213 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 214 214 exit(); 215 215 } … … 218 218 $error_login = 'E-mail or password is incorrect. Please try again.'; 219 219 set_transient('peqi_error_login', $error_login, 1); 220 wp_redirect(admin_url('admin.php?page= peqiapp-login'));220 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 221 221 exit(); 222 222 } else { … … 224 224 $error_login = 'Login failed. Please try again.'; 225 225 set_transient('peqi_error_login', $error_login, 1); 226 wp_redirect(admin_url('admin.php?page= peqiapp-login'));226 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 227 227 exit(); 228 228 } … … 230 230 $error_login = $e->getMessage(); 231 231 set_transient('peqi_error_login', $error_login, 1); 232 wp_redirect(admin_url('admin.php?page= peqiapp-login'));232 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 233 233 exit; 234 234 } … … 250 250 $error_register_mail = 'E-mail cannot be blank.'; 251 251 set_transient('peqi_error_register_mail', $error_register_mail, 1); 252 wp_redirect(admin_url('admin.php?page= peqiapp-register'));252 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 253 253 exit(); 254 254 } … … 257 257 $error_register_name = 'Full Name cannot be blank.'; 258 258 set_transient('peqi_error_register_name', $error_register_name, 1); 259 wp_redirect(admin_url('admin.php?page= peqiapp-register'));259 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 260 260 exit(); 261 261 } … … 264 264 $error_register_phone = 'Phone number cannot be blank.'; 265 265 set_transient('peqi_error_register_phone', $error_register_phone, 1); 266 wp_redirect(admin_url('admin.php?page= peqiapp-register'));266 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 267 267 exit(); 268 268 } … … 271 271 $error_register_password = 'Password cannot be blank.'; 272 272 set_transient('peqi_error_register_password', $error_register_password, 1); 273 wp_redirect(admin_url('admin.php?page= peqiapp-register'));273 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 274 274 exit(); 275 275 } … … 307 307 PeqiApp_Functions::send_stage_gchat(2); 308 308 // Redireciona para a página de validação de domínio 309 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));309 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 310 310 } else { 311 311 $success_message = true; 312 312 set_transient('peqi_success_register', $success_message, 1); 313 wp_redirect(admin_url('admin.php?page= peqiapp-login'));313 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 314 314 exit(); 315 315 } … … 317 317 $success_message = true; 318 318 set_transient('peqi_success_register', $success_message, 1); 319 wp_redirect(admin_url('admin.php?page= peqiapp-login'));319 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 320 320 exit(); 321 321 } … … 324 324 $error_register_mail = "This e-mail is already in use. Please try another one."; 325 325 set_transient('peqi_error_register_mail', $error_register_mail, 1); 326 wp_redirect(admin_url('admin.php?page= peqiapp-register'));326 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 327 327 exit(); 328 328 } else { … … 330 330 $error_register = 'Registration failed. Please try again.'; 331 331 set_transient('peqi_error_register', $error_register, 1); 332 wp_redirect(admin_url('admin.php?page= peqiapp-register'));332 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 333 333 exit(); 334 334 } … … 336 336 $error_register = $e->getMessage(); 337 337 set_transient('peqi_error_register', $error_register, 1); 338 wp_redirect(admin_url('admin.php?page= peqiapp-register'));338 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register')); 339 339 exit; 340 340 } … … 355 355 $success_clear_cache = 'Cache cleared successfully.'; 356 356 set_transient('peqi_success_clear_cache', $success_clear_cache, 1); 357 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));357 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 358 358 exit(); 359 359 } else { … … 361 361 $error_clear_cache = 'Failed to clear cache. Please try again.'; 362 362 set_transient('peqi_error_clear_cache', $error_clear_cache, 1); 363 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));363 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 364 364 exit(); 365 365 } … … 367 367 $error_clear_cache = $e->getMessage(); 368 368 set_transient('peqi_error_clear_cache', $error_clear_cache, 1); 369 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));369 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 370 370 exit; 371 371 } … … 384 384 $error_check_website = 'Website URL cannot be blank.'; 385 385 set_transient('peqi_error_check_website', $error_check_website, 1); 386 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));386 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 387 387 exit(); 388 388 } … … 400 400 PeqiApp_Functions::send_event('plugin-validate', PEQI_WEBSITE); 401 401 PeqiApp_Functions::send_stage_gchat(3); 402 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));402 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 403 403 exit(); 404 404 } else { … … 406 406 $error_message = 'Failed to validate website. Please try again.'; 407 407 set_transient('peqi_error_check_website', $error_message, 1); 408 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));408 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 409 409 exit(); 410 410 } … … 412 412 $error_check_website = $e->getMessage(); 413 413 set_transient('peqi_error_check_website', $error_check_website, 1); 414 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));414 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 415 415 exit; 416 416 } … … 436 436 $success_change_level = 'Optimization level updated successfully.'; 437 437 set_transient('peqi_success_change_level', $success_change_level, 1); 438 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));438 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 439 439 exit(); 440 440 } else { … … 442 442 $error_change_level = 'Failed to update optimization level. Please try again.'; 443 443 set_transient('peqi_error_change_level', $error_change_level, 1); 444 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));444 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 445 445 exit(); 446 446 } … … 448 448 $error_change_level = $e->getMessage(); 449 449 set_transient('peqi_error_change_level', $error_change_level, 1); 450 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));450 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 451 451 exit; 452 452 } … … 459 459 { 460 460 if (defined('PEQI_DEBUG') && PEQI_DEBUG === true) { 461 $plan_trial = "price_1 OZdPuJUpNS565Y8EpmNx5fN";461 $plan_trial = "price_1RDrjtDj2BLuJgJWHfE0QxWj"; 462 462 } else { 463 $plan_trial = "price_1 OoXpcJUpNS565Y8337IJIDk";463 $plan_trial = "price_1QqxFMDj2BLuJgJWu3Iwso03"; 464 464 } 465 465 … … 481 481 PeqiApp_Functions::send_event('plugin-awaiting', PEQI_WEBSITE); 482 482 PeqiApp_Functions::send_stage_gchat(7); 483 wp_redirect(admin_url('admin.php?page= peqiapp-awaiting'));483 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-awaiting')); 484 484 exit(); 485 485 } else { … … 487 487 $error_activate_plan = 'Failed to activate plan. Please try again.'; 488 488 set_transient('peqi_error_activate_plan', $error_activate_plan, 1); 489 wp_redirect(admin_url('admin.php?page= peqiapp-results'));489 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 490 490 exit(); 491 491 } … … 493 493 $error_activate_plan = $e->getMessage(); 494 494 set_transient('peqi_error_activate_plan', $error_activate_plan, 1); 495 wp_redirect(admin_url('admin.php?page= peqiapp-results'));495 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 496 496 exit; 497 497 } … … 528 528 PeqiApp_Functions::send_event('plugin-preview', PEQI_WEBSITE); 529 529 PeqiApp_Functions::send_stage_gchat(5); 530 wp_redirect(admin_url('admin.php?page= peqiapp-results'));530 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results')); 531 531 exit(); 532 532 } elseif ($http_code === 400 && !empty($response_body['fqdn']) && $response_body['fqdn'][0] === 'Domain FQDN already being used.') { … … 534 534 $error_create_domain = 'This domain is already in use. Please try another one.'; 535 535 set_transient('peqi_error_create_domain', $error_create_domain, 1); 536 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));536 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 537 537 exit(); 538 538 } elseif ($http_code === 400 && !empty($response_body['ipaddr']) && $response_body['ipaddr'][0] === 'Invalid IP Address') { … … 540 540 $error_create_domain = 'This IP Address is invalid. Please try another one.'; 541 541 set_transient('peqi_error_create_domain', $error_create_domain, 1); 542 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));542 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 543 543 exit(); 544 544 } else { … … 546 546 $error_create_domain = 'Failed to create domain. Please try again.'; 547 547 set_transient('peqi_error_create_domain', $error_create_domain, 1); 548 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));548 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 549 549 exit(); 550 550 } … … 552 552 $error_create_domain = $e->getMessage(); 553 553 set_transient('peqi_error_create_domain', $error_create_domain, 1); 554 wp_redirect(admin_url('admin.php?page= peqiapp-check-domain'));554 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain')); 555 555 exit; 556 556 } … … 573 573 PeqiApp_Functions::send_event('plugin-dns', PEQI_WEBSITE); 574 574 PeqiApp_Functions::send_stage_gchat(9); 575 wp_redirect(admin_url('admin.php?page= peqiapp-dashboard'));575 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-dashboard')); 576 576 } elseif ($http_code === 200 && $response_body['status'] === 'error') { 577 577 // Se o domínio não estiver apontado, exibir um erro 578 578 $error_pointed_domain = 'Domain not pointing to Peqi. Await ammount of time and try again.'; 579 579 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 580 wp_redirect(admin_url('admin.php?page= peqiapp-success'));580 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 581 581 exit(); 582 582 } else { … … 584 584 $error_pointed_domain = 'Failed to check domain. Please try again.'; 585 585 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 586 wp_redirect(admin_url('admin.php?page= peqiapp-success'));586 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 587 587 exit(); 588 588 } … … 590 590 $error_pointed_domain = $e->getMessage(); 591 591 set_transient('peqi_error_pointed_domain', $error_pointed_domain, 1); 592 wp_redirect(admin_url('admin.php?page= peqiapp-success'));592 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success')); 593 593 exit; 594 594 } … … 608 608 update_option('peqi_checkpoint', ''); 609 609 610 wp_redirect(admin_url('admin.php?page= peqiapp-login'));610 wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login')); 611 611 exit(); 612 612 } -
peqiapp/trunk/includes/pages.php
r3205092 r3290106 39 39 public static function add_plugin_pages() 40 40 { 41 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { 42 return; 41 add_menu_page(PEQI_BRAND_NAME, PEQI_BRAND_NAME, 'manage_options', PEQI_SLUG_PREFIX, [__CLASS__, 'peqi_init_page'], PEQI_BRAND_ICON); 42 add_submenu_page(null, PEQI_BRAND_NAME, 'Dashboard', 'manage_options', PEQI_SLUG_PREFIX . '-dashboard', [__CLASS__, 'peqi_dashboard_page']); 43 add_submenu_page(null, PEQI_BRAND_NAME, 'No Website', 'manage_options', PEQI_SLUG_PREFIX . '-nowebsite', [__CLASS__, 'peqi_nowebsite_page']); 44 45 46 if (PEQI_SLUG_PREFIX === 'peqiapp') { 47 add_submenu_page(null, PEQI_BRAND_NAME, 'Sign-In', 'manage_options', PEQI_SLUG_PREFIX . '-login', [__CLASS__, 'peqi_login_page']); 48 add_submenu_page(null, PEQI_BRAND_NAME, 'Register', 'manage_options', PEQI_SLUG_PREFIX . '-register', [__CLASS__, 'peqi_register_page']); 49 add_submenu_page(null, PEQI_BRAND_NAME, 'Survey', 'manage_options', PEQI_SLUG_PREFIX . '-survey', [__CLASS__, 'peqi_survey_page']); 50 add_submenu_page(null, PEQI_BRAND_NAME, 'Check Domain', 'manage_options', PEQI_SLUG_PREFIX . '-check-domain', [__CLASS__, 'peqi_check_domain_page']); 51 add_submenu_page(null, PEQI_BRAND_NAME, 'Results Preview', 'manage_options', PEQI_SLUG_PREFIX . '-results', [__CLASS__, 'peqi_results_page']); 52 add_submenu_page(null, PEQI_BRAND_NAME, 'Awaiting Payment', 'manage_options', PEQI_SLUG_PREFIX . '-awaiting', [__CLASS__, 'peqi_awaiting_page']); 53 add_submenu_page(null, PEQI_BRAND_NAME, 'Payment Successful', 'manage_options', PEQI_SLUG_PREFIX . '-success', [__CLASS__, 'peqi_success_page']); 43 54 } 44 add_menu_page('PeqiApp', 'PeqiApp', 'manage_options', 'peqiapp', array(__CLASS__, 'peqi_init_page'), PEQIAPP_URL . 'assets/images/icon.svg');45 46 add_submenu_page(null, 'PeqiApp', 'Dashboard', 'manage_options', 'peqiapp-dashboard', array(__CLASS__, 'peqi_dashboard_page'));47 add_submenu_page(null, 'PeqiApp', 'Sign-In', 'manage_options', 'peqiapp-login', array(__CLASS__, 'peqi_login_page'));48 add_submenu_page(null, 'PeqiApp', 'Register', 'manage_options', 'peqiapp-register', array(__CLASS__, 'peqi_register_page'));49 add_submenu_page(null, 'PeqiApp', 'Survey', 'manage_options', 'peqiapp-survey', array(__CLASS__, 'peqi_survey_page'));50 add_submenu_page(null, 'PeqiApp', 'Check Domain', 'manage_options', 'peqiapp-check-domain', array(__CLASS__, 'peqi_check_domain_page'));51 add_submenu_page(null, 'PeqiApp', 'Results Preview', 'manage_options', 'peqiapp-results', array(__CLASS__, 'peqi_results_page'));52 add_submenu_page(null, 'PeqiApp', 'No Website', 'manage_options', 'peqiapp-nowebsite', array(__CLASS__, 'peqi_nowebsite_page'));53 add_submenu_page(null, 'PeqiApp', 'Awaiting Payment', 'manage_options', 'peqiapp-awaiting', array(__CLASS__, 'peqi_awaiting_page'));54 add_submenu_page(null, 'PeqiApp', 'Payment Successful', 'manage_options', 'peqiapp-success', array(__CLASS__, 'peqi_success_page'));55 55 } 56 56 … … 88 88 { 89 89 if (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'check-domain') { 90 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-check-domain') . '";</script>';90 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-check-domain') . '";</script>'; 91 91 exit; 92 92 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'results-preview') { 93 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-results') . '";</script>';93 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-results') . '";</script>'; 94 94 exit; 95 95 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'awaiting-payment') { 96 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-awaiting') . '";</script>';96 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-awaiting') . '";</script>'; 97 97 exit; 98 98 } elseif (defined('PEQI_CHECKPOINT') && PEQI_CHECKPOINT === 'payment-success') { 99 echo '<script>window.location.href = "' . admin_url('admin.php?page= peqiapp-success') . '";</script>';99 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-success') . '";</script>'; 100 100 exit; 101 101 } … … 103 103 104 104 if (!self::is_user_authenticated()) { 105 echo '<script>window.location.href = "' . admin_url('admin.php?page=peqiapp-login') . '";</script>'; 105 if (PEQI_SLUG_PREFIX === 'peqiapp') { 106 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login') . '";</script>'; 107 } else { 108 echo '<script>window.location.href = "' . admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-nowebsite') . '";</script>'; 109 } 106 110 exit; 107 111 } … … 193 197 new Peqiapp_Pages(); 194 198 } 195 ?> -
peqiapp/trunk/pages/account.php
r3116615 r3290106 14 14 <div class="title-container"> 15 15 <h3>Status: <span class="status">Active</span></h3> 16 <p style="line-height: 2px">You're connected as <span class="user-info"><?php echo esc_html(PEQI_USER_NAME); ?> (<?php echo esc_html(PEQI_USER_EMAIL); ?>)</span>.</p> 16 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 17 <p>You're connected as <span class="user-info"><?php echo esc_html(PEQI_USER_NAME); ?> (<?php echo esc_html(PEQI_USER_EMAIL); ?>)</span>.</p> 18 <?php } ?> 17 19 <?php if (PEQI_WEBSITE) { ?> 18 20 <p style="line-height: 2px">Your website is <span class="user-domain"><?php echo esc_html(PEQI_WEBSITE); ?>.</span> </p> … … 22 24 <input type="hidden" name="action" value="peqi_switch_account_form"> 23 25 <div class="button-home"> 24 <button name="switch_account" class="primary-button">SWITCH ACCOUNT</button> 26 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 27 <button name="switch_account" class="primary-button">SWITCH ACCOUNT</button> 28 <?php } ?> 25 29 </div> 26 30 </form> -
peqiapp/trunk/pages/awaiting.php
r3116615 r3290106 15 15 16 16 if (empty($payment_url)) { 17 $plan_trial = "price_1 OZdPuJUpNS565Y8EpmNx5fN";17 $plan_trial = "price_1RDrjtDj2BLuJgJWHfE0QxWj"; 18 18 $response = PeqiApp_API::create_checkout($plan_trial); 19 19 $payment_url = json_decode(wp_remote_retrieve_body($response), true)['url']; -
peqiapp/trunk/pages/header.php
r3116615 r3290106 11 11 <div id="header-page"> 12 12 <div class="logo"> 13 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-dark.svg'); ?>" alt="peqi-logo" class="peqi-logo"> 13 <?php if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { ?> 14 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-cloudez.svg'); ?>" alt="cloudez-logo" class="cloudez-logo" style="height: 32px;"> 15 <?php } else { ?> 16 <img src="<?php echo esc_url(PEQIAPP_URL . 'assets/images/logo-dark.svg'); ?>" alt="peqi-logo" class="peqi-logo"> 17 <?php } ?> 14 18 </div> 15 19 </div> -
peqiapp/trunk/pages/no_website.php
r3116615 r3290106 16 16 <div class="heading-1-xl">Website not found!</div> 17 17 <div class="typography"> 18 <p class="paragraph-2-m">Oops! This domain is not registered or is not registered to this user.</p> 19 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 18 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 19 <p class="paragraph-2-m">Oops! This domain is not registered or is not registered to this user.</p> 20 <?php } else { ?> 21 <p class="paragraph-2-m">Oops! This website is not registered.</p> 22 <?php } ?> 23 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 24 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 25 <?php } else { ?> 26 <p class="paragraph-2-m">Please contact support at <a href="mailto:[email protected]">[email protected]</a> for assistance.</p> 27 <?php } ?> 20 28 </div> 21 29 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>"> 22 30 <input type="hidden" name="action" value="peqi_switch_account_form"> 23 31 <div class="body-container"> 24 <button name="switch_account" class="primary-button" style="width: 184px;">SWITCH ACCOUNT</button> 32 <?php if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { ?> 33 <button name="switch_account" class="primary-button" style="width: 184px;">SWITCH ACCOUNT</button> 34 <?php } ?> 25 35 </div> 26 36 </form> -
peqiapp/trunk/pages/register.php
r3116615 r3290106 100 100 </div> 101 101 </form> 102 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page= peqiapp-login'); ?>">102 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-login'); ?>"> 103 103 <div class="container-not-registered"> 104 104 <button class="not-registered" type="submit" name="go_to_register">Already have an account?</button> -
peqiapp/trunk/pages/signin.php
r3116615 r3290106 70 70 </form> 71 71 72 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page= peqiapp-register'); ?>">72 <form method="post" class="form-inputs" action="<?php echo admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register'); ?>"> 73 73 <div class="container-2-not-registered"> 74 74 <button class="not-registered" type="submit" name="create_account">First time here? Click to create your account.</button> -
peqiapp/trunk/peqiapp.php
r3205092 r3290106 3 3 /** 4 4 * @package Peqi App 5 * @version 2.0.2 05 * @version 2.0.21 6 6 * Plugin Name: Peqi App 7 7 * Plugin URI: http://wordpress.org/plugins/peqiapp/ 8 8 * Description: You can manage your application settings, perform cache cleaning, adjust optimization levels, and view performance metrics. 9 * Version: 2.0.2 09 * Version: 2.0.21 10 10 * Requires at least: 4.7 11 11 * Author: Peqi … … 59 59 add_action('admin_enqueue_scripts', array($this, 'enqueue_intl_tel_input'), 999); 60 60 add_action('admin_enqueue_scripts', array($this, 'javascript_variables'), 999); 61 add_action('activated_plugin', array($this, 'peqiapp_activation_redirect')); 61 if (!defined('PEQI_CLOUDEZ') || !PEQI_CLOUDEZ) { 62 add_action('activated_plugin', array($this, 'peqiapp_activation_redirect')); 63 } 62 64 } 63 65 … … 85 87 define('PEQIAPP_PATH', plugin_dir_path(__FILE__)); 86 88 define('PEQIAPP_URL', plugin_dir_url(__FILE__)); 87 define('PEQIAPP_VERSION', '2.0.20'); 88 89 define('PEQIAPP_VERSION', '2.0.21'); 90 91 // Define o URL da API 89 92 if (defined('PEQI_DEBUG') && PEQI_DEBUG === true) { 90 93 define('PEQI_API_URL', 'https://dev-api.peqi.app'); … … 92 95 define('PEQI_API_URL', 'https://api.peqi.app'); 93 96 } 94 97 98 // Define o tema do plugin 99 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ === true) { 100 define('PEQI_SLUG_PREFIX', 'cloudez'); 101 define('PEQI_BRAND_NAME', 'Cloudez'); 102 define('PEQI_BRAND_ICON', PEQIAPP_URL . 'assets/images/icon-cloudez.svg'); 103 } else { 104 define('PEQI_SLUG_PREFIX', 'peqiapp'); 105 define('PEQI_BRAND_NAME', 'PeqiApp'); 106 define('PEQI_BRAND_ICON', PEQIAPP_URL . 'assets/images/icon.svg'); 107 } 108 95 109 define('PEQI_ENDPOINT_AUTH', '/v0/auth/token/'); 96 110 define('PEQI_ENDPOINT_TOKEN', '/v0/tokens/'); … … 151 165 { 152 166 if ($plugin == plugin_basename(__FILE__)) { 153 exit(wp_redirect(admin_url('admin.php?page= peqiapp-register')));167 exit(wp_redirect(admin_url('admin.php?page=' . PEQI_SLUG_PREFIX . '-register'))); 154 168 } 155 169 } … … 161 175 { 162 176 // Impedir que os assets sejam carregados em outras páginas 163 if (!isset($_GET['page']) || strpos($_GET['page'], 'peqiapp') !== 0) { 177 if ( 178 !isset($_GET['page']) || 179 ( 180 strpos($_GET['page'], 'peqiapp') !== 0 && 181 strpos($_GET['page'], 'cloudez') !== 0 182 ) 183 ) { 164 184 return; 165 185 } 166 186 wp_enqueue_style('peqiapp-style', PEQIAPP_URL . 'assets/css/style.css', array(), PEQIAPP_VERSION, 'all'); 167 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide.css', array(), PEQIAPP_VERSION, 'all'); 187 188 if (defined('PEQI_CLOUDEZ') && PEQI_CLOUDEZ) { 189 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide-cloudez.css', array(), PEQIAPP_VERSION, 'all'); 190 } else { 191 wp_enqueue_style('peqiapp-styleguide', PEQIAPP_URL . 'assets/css/styleguide.css', array(), PEQIAPP_VERSION, 'all'); 192 } 193 168 194 wp_enqueue_style('peqiapp-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap', array(), PEQIAPP_VERSION, 'all'); 169 195 wp_enqueue_script('peqiapp-script', PEQIAPP_URL . 'assets/js/script.js', … … 180 206 { 181 207 // Impedir que os assets sejam carregados em outras páginas 182 if (!isset($_GET['page']) || $_GET['page'] !== 'peqiapp-register') {208 if (!isset($_GET['page']) || $_GET['page'] !== PEQI_SLUG_PREFIX . '-register') { 183 209 return; 184 210 } -
peqiapp/trunk/readme.txt
r3205092 r3290106 4 4 Requires at least: 4.7 5 5 Tested up to: 6.6 6 Stable tag: 2.0.2 06 Stable tag: 2.0.21 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.