Changeset 3373797 for updraftplus/trunk/methods/updraftvault.php
- Timestamp:
- 10/06/2025 03:23:19 PM (4 months ago)
- File:
-
- 1 edited
-
updraftplus/trunk/methods/updraftvault.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
updraftplus/trunk/methods/updraftvault.php
r3275614 r3373797 492 492 // Used to decide whether we can afford HTTP calls or not, or would prefer to rely on cached data 493 493 $this->vault_in_config_print = true; 494 495 $simplexmlelement_existence_label = ''; 496 if (!apply_filters('updraftplus_vault_simplexmlelement_exists', class_exists('SimpleXMLElement'))) { 497 $simplexmlelement_existence_label = wp_kses( 498 $updraftplus_admin->show_double_warning( 499 '<strong>'.__('Warning', 'updraftplus').':</strong> '. 500 /* translators: 1: Remote storage name, 2: Required module name */ 501 sprintf(__('Your web server\'s PHP installation does not include a <strong>required</strong> (for %1$s) module %2$s.', 'updraftplus'), 'UpdraftVault', 'SimpleXMLElement').' '. 502 __("Please contact your web hosting provider's support and ask for them to enable it.", 'updraftplus'), 503 $this->get_id(), 504 false 505 ), 506 $this->allowed_html_for_content_sanitisation() 507 ); 508 } 509 494 510 $properties = array( 495 'simplexmlelement_existence_label' => !apply_filters('updraftplus_vault_simplexmlelement_exists', class_exists('SimpleXMLElement')) ? wp_kses($updraftplus_admin->show_double_warning('<strong>'.__('Warning', 'updraftplus').':</strong> '.sprintf(__("Your web server's PHP installation does not include a <strong>required</strong> (for %s) module (%s).", 'updraftplus'), 'UpdraftVault', 'SimpleXMLElement').' '.__("Please contact your web hosting provider's support and ask for them to enable it.", 'updraftplus'), $this->get_id(), false), $this->allowed_html_for_content_sanitisation()) : '',511 'simplexmlelement_existence_label' => $simplexmlelement_existence_label, 496 512 'curl_existence_label' => wp_kses($updraftplus_admin->curl_check($updraftplus->backup_methods[$this->get_id()], false, $this->get_id().' hidden-in-updraftcentral', false), $this->allowed_html_for_content_sanitisation()), 497 /* translators: %1$s: anchor opening tag <a>, %2$s: UpdraftVault product name, %3$s: anchor closing tag </a>*/498 'storage_long_description' => wp_kses(sprintf(__('%1$s %2$s %3$s gives you encrypted storage integrated into UpdraftPlus so you don’t need to set up third party storage systems.', 'updraftplus'), '<a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=updraf vault&utm_creative_format=text" target="_blank">', 'UpdraftVault', '</a>'), $this->allowed_html_for_content_sanitisation()),513 /* translators: 1: Anchor opening tag <a>, 2: UpdraftVault product name, 3: Anchor closing tag </a>*/ 514 'storage_long_description' => wp_kses(sprintf(__('%1$s %2$s %3$s gives you encrypted storage integrated into UpdraftPlus so you don’t need to set up third party storage systems.', 'updraftplus'), '<a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=updraftvault&utm_creative_format=text" target="_blank">', 'UpdraftVault', '</a>'), $this->allowed_html_for_content_sanitisation()), 499 515 'storage_package_options_label1' => __('Need to get space?', 'updraftplus'), 500 516 'storage_package_options_label2' => __('Show the options', 'updraftplus'), 501 517 'storage_already_registered_label1' => __('Already got space?', 'updraftplus'), 518 /* translators: %s: Storage provider name */ 502 519 'storage_already_registered_label2' => sprintf(__('Connect to your %s account', 'updraftplus'), $updraftplus->backup_methods[$this->get_id()]), 503 520 'storage_already_registered_label3' => __('Connect', 'updraftplus'), 504 521 'storage_long_description2' => __("UpdraftVault is built on top of Amazon's world-leading data-centres, with redundant data storage to achieve 99.999999999% reliability.", 'updraftplus'), 522 /* translators: %s: Storage provider name */ 505 523 'storage_readmore_label' => sprintf(__('Read more about %s here.', 'updraftplus'), $updraftplus->backup_methods[$this->get_id()]), 524 /* translators: %s: Storage provider name */ 506 525 'storage_read_faq_label' => sprintf(__('Read %s documentation here.', 'updraftplus'), 'UpdraftVault'), 507 526 'more_vault_info_landing_url' => $this->get_url('more_vault_info_landing'), 508 527 'more_vault_info_faqs_url' => $this->get_url('more_vault_info_faqs'), 509 /* translators: %1$s: anchor opening tag <a>, %2$s: UpdraftVault product name, %3$s: anchor closing tag </a>*/510 'storage_package_options_label3' => wp_kses(sprintf(__('%1$s %2$s %3$s gives you encrypted storage integrated into UpdraftPlus so you don\'t need to set up third party storage systems.', 'updraftplus'), '<a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=updraf vault&utm_creative_format=text" target="_blank">', 'UpdraftVault', '</a>'), $this->allowed_html_for_content_sanitisation()),528 /* translators: 1: Anchor opening tag <a>, 2: UpdraftVault product name, 3: Anchor closing tag </a>*/ 529 'storage_package_options_label3' => wp_kses(sprintf(__('%1$s %2$s %3$s gives you encrypted storage integrated into UpdraftPlus so you don\'t need to set up third party storage systems.', 'updraftplus'), '<a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=updraftvault&utm_creative_format=text" target="_blank">', 'UpdraftVault', '</a>'), $this->allowed_html_for_content_sanitisation()), 511 530 'start_subscription_button_label' => __('Start Subscription', 'updraftplus'), 531 /* translators: %s: Subscription size */ 512 532 'start_15gb_subscription_button_title' => sprintf(__('Start %s Subscription', 'updraftplus'), '15GB'), 533 /* translators: %s: Subscription size */ 513 534 'start_50gb_subscription_button_title' => sprintf(__('Start %s Subscription', 'updraftplus'), '50GB'), 535 /* translators: %s: Subscription size */ 514 536 'start_250gb_subscription_button_title' => sprintf(__('Start %s Subscription', 'updraftplus'), '250GB'), 515 537 'start_trial_button_label' => __('Start Trial', 'updraftplus'), 538 /* translators: %s: Trial size */ 516 539 'start_trial_button_title' => sprintf(__('Start %s Trial', 'updraftplus'), '5GB'), 517 540 'discount_period_label' => __('or (annual discount)', 'updraftplus'), 518 541 'start_trial_option_label' => __('with the option of', 'updraftplus'), 542 /* translators: %s: Price */ 519 543 'price_5gb_package_label' => sprintf(__('%s per year', 'updraftplus'), '$35'), 544 /* translators: %s: Price */ 520 545 'price_15gb_package_label' => sprintf(__('%s per quarter', 'updraftplus'), '$20'), 546 /* translators: %s: Price */ 521 547 'price_50gb_package_label' => sprintf(__('%s per quarter', 'updraftplus'), '$50'), 548 /* translators: %s: Price */ 522 549 'price_250gb_package_label' => sprintf(__('%s per quarter', 'updraftplus'), '$125'), 523 'discounted_price_5gb_package_label' => sprintf(__('%s month %s trial', 'updraftplus'), '1', '$1'), 550 /* translators: 1: Trial duration, 2: Price */ 551 'discounted_price_5gb_package_label' => sprintf(__('%1$s month %2$s trial', 'updraftplus'), '1', '$1'), 552 /* translators: %s: Price */ 524 553 'discounted_price_15gb_package_label' => sprintf(__('%s per year', 'updraftplus'), '$70'), 554 /* translators: %s: Price */ 525 555 'discounted_price_50gb_package_label' => sprintf(__('%s per year', 'updraftplus'), '$175'), 556 /* translators: %s: Price */ 526 557 'discounted_price_250gb_package_label' => sprintf(__('%s per year', 'updraftplus'), '$450'), 558 /* translators: %s: Subscription size */ 527 559 'start_5gb_package_subscription_title' => sprintf(__('Start a %s UpdraftVault Subscription', 'updraftplus'), '5GB'), 560 /* translators: %s: Subscription size */ 528 561 'start_15gb_package_subscription_title' => sprintf(__('Start a %s UpdraftVault Subscription', 'updraftplus'), '15GB'), 562 /* translators: %s: Subscription size */ 529 563 'start_50gb_package_subscription_title' => sprintf(__('Start a %s UpdraftVault Subscription', 'updraftplus'), '50GB'), 564 /* translators: %s: Subscription size */ 530 565 'start_250gb_package_subscription_title' => sprintf(__('Start a %s UpdraftVault Subscription', 'updraftplus'), '250GB'), 531 566 'start_5gb_package_subscription_link' => apply_filters('updraftplus_com_link', $updraftplus->get_url('shop_vault_5')), … … 534 569 'start_250gb_package_subscription_link' => apply_filters('updraftplus_com_link', $updraftplus->get_url('shop_vault_250')), 535 570 'go_back_link_text' => __('Back...', 'updraftplus'), 536 'go_back_link_label' => sprintf(__('Back to other %s options'), 'Vault'), 571 /* translators: %s: Storage provider name */ 572 'go_back_link_label' => sprintf(__('Back to other %s options', 'updraftplus'), 'Vault'), 537 573 'current_clean_url' => UpdraftPlus::get_current_clean_url(), 538 'subscription_payment_details_label' => wp_kses(__("<strong>About the '1 month $1 trial':</strong> Pay just $1 for the first month of an annual subscription.", 'updraftplus').' '.__('Cancel at any time.', 'updraftplus').' '.__('After 1 month, your subscription will renew at a cost of $35 and every 12 months thereafter until you cancel.', 'updraftplus').' <a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=about-updraf vault&utm_creative_format=text" target="_blank">'.__('More about UpdraftVault', 'updraftplus').'</a>', $this->allowed_html_for_content_sanitisation()),574 'subscription_payment_details_label' => wp_kses(__("<strong>About the '1 month $1 trial':</strong> Pay just $1 for the first month of an annual subscription.", 'updraftplus').' '.__('Cancel at any time.', 'updraftplus').' '.__('After 1 month, your subscription will renew at a cost of $35 and every 12 months thereafter until you cancel.', 'updraftplus').' <a href="https://teamupdraft.com/updraftplus/updraftvault/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=about-updraftvault&utm_creative_format=text" target="_blank">'.__('More about UpdraftVault', 'updraftplus').'</a>', $this->allowed_html_for_content_sanitisation()), 539 575 'connect_to_updraftplus_label' => __('Enter your UpdraftPlus.Com email / password here to connect:', 'updraftplus'), 576 /* translators: %s: Website name */ 540 577 'input_email_title' => sprintf(__('Please enter your %s email address', 'updraftplus'), 'UpdraftPlus.com'), 541 578 'input_email_placeholder' => __('Email', 'updraftplus'), 579 /* translators: %s: Website name */ 542 580 'input_password_title' => sprintf(__('Please enter your %s password', 'updraftplus'), 'UpdraftPlus.com'), 543 581 'input_password_placeholder' => __('Password', 'updraftplus'), 544 'button_connect_title' => sprintf(__('Connect to your %s'), 'Vault'), 582 /* translators: %s: Storage provider name */ 583 'button_connect_title' => sprintf(__('Connect to your %s', 'updraftplus'), 'Vault'), 545 584 'button_connect_label' => __('Connect', 'updraftplus'), 546 585 'forgotten_password_label' => __("Don't know your email address, or forgotten your password?", 'updraftplus'), … … 651 690 $quota_transient_used = $this->quota_transient_used ? '(via transient)' : ''; 652 691 $this->log("Error: Quota exhausted (used=$used, total=$total, needed=$needed) $quota_transient_used"); 653 $this->log(sprintf(__('Error: you have insufficient storage quota available (%s) to upload this archive (%s) (%s).', 'updraftplus'), round(($total-$used)/1048576, 2).' MB', round($needed/1048576, 2).' MB', $quota_transient_used).' '.__('You can get more quota here', 'updraftplus').': '.$this->get_url('get_more_quota'), 'error'); 692 $this->log( 693 sprintf( 694 /* translators: 1: Available storage, 2: Required storage, 3: Quota usage */ 695 __('Error: you have insufficient storage quota available (%1$s) to upload this archive (%2$s) (%3$s).', 'updraftplus'), 696 round(($total-$used)/1048576, 2).' MB', 697 round($needed/1048576, 2).' MB', 698 $quota_transient_used 699 ).' '.__('You can get more quota here', 'updraftplus').': '.$this->get_url('get_more_quota'), 700 'error' 701 ); 654 702 // The transient wasn't intended for 100% precision when that matters (e.g. out-of-quota), so we delete it - a fresh calculation will take place on the next operation 655 703 delete_transient('updraftvault_quota_numeric'); … … 914 962 915 963 if (preg_match('/has banned your IP address \(([\.:0-9a-f]+)\)/', $result['body'], $matches)) { 964 /* translators: %s: Blocked IP address */ 916 965 return new WP_Error('banned_ip', sprintf(__("UpdraftPlus.com has responded with 'Access Denied'.", 'updraftplus').'<br>'.__("It appears that your web server's IP Address (%s) is blocked.", 'updraftplus').' '.__('This most likely means that you share a webserver with a hacked website that has been used in previous attacks.', 'updraftplus').'<br> <a href="'.apply_filters("updraftplus_com_link", "https://updraftplus.com/unblock-ip-address/").'" target="_blank">'.__('To remove the block, please go here.', 'updraftplus').'</a> ', $matches[1])); 917 966 } else { 967 /* translators: %s: API response data */ 918 968 return new WP_Error('unknown_response', sprintf(__('UpdraftPlus.Com returned a response which we could not understand (data: %s)', 'updraftplus'), wp_remote_retrieve_body($result))); 919 969 } … … 960 1010 if (!empty($response['authproblem'])) { 961 1011 if ('gettempcreds_exception2' == $response['authproblem'] || 'gettempcreds_exception2' == $response['authproblem']) { 962 $authfail_error = new WP_Error('authfailed', __('An error occurred while fetching your Vault credentials.', 'updraftplus').' '.__('Please try again after a few minutes.' ));1012 $authfail_error = new WP_Error('authfailed', __('An error occurred while fetching your Vault credentials.', 'updraftplus').' '.__('Please try again after a few minutes.', 'updraftplus')); 963 1013 } else { 964 $authfail_error = new WP_Error('authfailed', __('An unknown error occurred while connecting to Vault.', 'updraftplus').' '.__('Please try again.')); 1014 $authfail_error = new WP_Error( 1015 'authfailed', 1016 __('An unknown error occurred while connecting to Vault.', 'updraftplus').' '. 1017 __('Please try again.')// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. 1018 ); 965 1019 } 966 1020 return $authfail_error;
Note: See TracChangeset
for help on using the changeset viewer.