';
{{{get_template_test_button_html "Rackspace Cloud Files"}}}
show_double_warning(
''.__('Warning', 'updraftplus').': '.
/* translators: %s: Missing PHP module */
sprintf(__('Your web server\'s PHP installation does not include a required module (%s).', 'updraftplus'), 'mbstring').' '.
__('Please contact your web hosting provider\'s support.', 'updraftplus').' '.
/* translators: 1: Module description, 2: Required module */
sprintf(__('UpdraftPlus\'s %1$s module requires %2$s.', 'updraftplus'), $this->desc, 'mbstring').' '.
__('Please do not file any support requests; there is no alternative.', 'updraftplus'),
$this->method,
false
),
$this->allowed_html_for_content_sanitisation()
);
}
if (!apply_filters('updraftplus_rackspace_jsonlasterror_exists', function_exists('json_last_error'))) {
$json_last_error_existence_label = wp_kses(
$updraftplus_admin->show_double_warning(
''.__('Warning', 'updraftplus').': '.
/* translators: %s: Module description */
sprintf(__('Your web server\'s PHP installation does not include a required module (%s).', 'updraftplus'), 'json').' '.
__('Please contact your web hosting provider\'s support.', 'updraftplus').' '.
/* translators: 1: Module description, 2: Required module */
sprintf(__('UpdraftPlus\'s %1$s module requires %2$s.', 'updraftplus'), 'Cloud Files', 'json').' '.
__('Please do not file any support requests; there is no alternative.', 'updraftplus'),
'cloudfiles',
false
),
$this->allowed_html_for_content_sanitisation()
);
}
$properties = array(
'storage_image_url' => !empty($this->img_url) ? UPDRAFTPLUS_URL.$this->img_url : '',
'storage_long_description' => $this->long_desc,
'api_key_setting_default_label' => __('To create a new Rackspace API sub-user and API key that has access only to this Rackspace container, use Premium.', 'updraftplus'),
'mb_substr_existence_label' => $mb_substr_existence_label,
'json_last_error_existence_label' => $json_last_error_existence_label,
'curl_existence_label' => wp_kses($updraftplus_admin->curl_check($this->long_desc, false, $this->method.' hidden-in-updraftcentral', false), $this->allowed_html_for_content_sanitisation()),
'rackspace_text_description' => wp_kses(
sprintf(
/* translators: 1: API key URL, 2: instructions URL */
__('Get your API key from your Rackspace Cloud console (read instructions here), then pick a container name to use for storage.', 'updraftplus'),
'https://mycloud.rackspace.com/',
'https://docs.rackspace.com/support/how-to/set-up-an-api-key-cloud-office-control-panel'
).' '.__('This container will be created for you if it does not already exist.', 'updraftplus'),
$this->allowed_html_for_content_sanitisation()
),
'faq_link_text' => __('Also, you should read this important FAQ.', 'updraftplus'),
'faq_link_url' => esc_url(apply_filters("updraftplus_com_link", "https://teamupdraft.com/documentation/updraftplus/topics/cloud-storage/rackspace/there-are-extra-files-in-my-rackspace-cloud-files-container?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=read-important-faq&utm_creative_format=text")),
'input_account_label' => __('US or UK-based Rackspace Account', 'updraftplus'),
'input_account_title' => __('Accounts created at rackspacecloud.com are US accounts; accounts created at rackspace.co.uk are UK accounts.', 'updraftplus'),
'input_account_option_labels' => array(
'https://auth.api.rackspacecloud.com' => __('US (default)', 'updraftplus'),
'https://lon.auth.api.rackspacecloud.com' => __('UK', 'updraftplus'),
),
'input_region_label' => __('Cloud Files Storage Region', 'updraftplus'),
'input_region_option_labels' => $this->regions,
'input_username_label' => __('Cloud Files Username', 'updraftplus'),
'input_username_placeholder' => __('Enter your username', 'updraftplus'),
'input_apikey_label' => __('Cloud Files API Key', 'updraftplus'),
'input_apikey_type' => apply_filters('updraftplus_admin_secret_field_type', 'password'),
'input_apikey_placeholder' => __('Paste your key here', 'updraftplus'),
'input_container_label' => wp_kses(apply_filters('updraftplus_cloudfiles_location_description', __('Cloud Files Container', 'updraftplus')), $this->allowed_html_for_content_sanitisation()),
'input_container_placeholder' => __('Enter your container name', 'updraftplus'),
/* translators: %s: Backup method */
'input_test_label' => sprintf(__('Test %s Settings', 'updraftplus'), $updraftplus->backup_methods[$this->get_id()]),
'updraftplus_premium_url' => $updraftplus->get_url('premium'),
);
return wp_parse_args(apply_filters('updraft_'.$this->get_id().'_template_properties', array()), wp_parse_args($properties, $this->get_persistent_variables_and_methods()));
}
/**
* Customize generated field data using legacy mapping values.
*
* Used by transform_template_properties_to_fields_structure()
* to allow child classes to adjust the generated field structure
* based on legacy data and field mapping requirements.
*
* @param array $field Field data.
* @param array $template_properties Template properties.
* @param string $field_name Field name.
* @param array $option Field mapping option.
*
* @return array
*/
public function configure_field_from_legacy($field, $template_properties, $field_name, $option) {
$prefix = 'input_'.$option['template_property_input_mapping'].'_';
if (empty($field['tooltip']) && isset($template_properties[$prefix.'title'])) $field['tooltip'] = array('text' => $template_properties[$prefix.'title']);
return $field;
}
}