options = get_option( 'amber_options' ); ?>
Amber can store snapshots locally, in your website's storage space. If you prefer, you can store snapshots in an alternative backend. At this time, Amber is compatible with the following services: Perma.cc, the Internet Archive, and Amazon S3.
options['amber_alternate_backends']) ? $this->options['amber_alternate_backends'] : 0; ?>Preserve snapshots in multiple storage locations by selecting one or more alternates above. Amber will show your visitors only the storage location selected in the dropdown menu.
options['amber_post_types']) ? $this->options['amber_post_types'] : "post,page"; $all_post_types = get_post_types( array(), 'objects', 'and' ); $crawled_post_types = explode( ',', $options ); $ignored_post_types = array( 'revision', 'attachment', 'nav_menu_item'); printf('Preserve snapshots from particular post types, including custom post types.
'); } public function amber_max_file_callback() { printf( ' ' . 'Amber will store snapshots up to a specified size. Links to pages that exceed this size will not be preserved.
', isset( $this->options['amber_max_file'] ) ? esc_attr( $this->options['amber_max_file']) : '' ); } public function amber_max_disk_callback() { printf( '' . 'The maximum amount of disk space to be used for all preserved content. If this disk space usage is exceeded, old snapshots will be removed.
', isset( $this->options['amber_max_disk'] ) ? esc_attr( $this->options['amber_max_disk']) : '' ); } public function amber_storage_location_callback() { printf( '' . 'Path to the location where snapshots are stored on disk, relative to the uploads directory.
', isset( $this->options['amber_storage_location'] ) ? esc_attr( $this->options['amber_storage_location']) : '' ); } public function amber_update_strategy_callback() { $option = $this->options['amber_update_strategy']; ?>Select "Do not update" if you want to preserve links at the time the content is published. Otherwise, link storage will be periodically updated.
%s' . 'A list of URL patterns, separated by commas. Amber will not preserve any link that matches one of these patterns. Regular expressions may be used.
', isset( $this->options['amber_excluded_sites'] ) ? esc_textarea( $this->options['amber_excluded_sites']) : '' ); } public function amber_excluded_formats_callback() { printf( '' . 'A list of of MIME types, separated by commas. Amber will not preserve any link containing an excluded MIME type.
', isset( $this->options['amber_excluded_formats'] ) ? esc_textarea( $this->options['amber_excluded_formats']) : '' ); } public function amber_perma_api_key_callback() { printf( '' . 'Generate an API key in your Perma.cc Dashboard under Settings > Tools
', isset( $this->options['amber_perma_api_key'] ) ? esc_attr( $this->options['amber_perma_api_key']) : '' ); } public function amber_perma_server_url_callback() { printf( '' . 'This should not need to be changed
', isset( $this->options['amber_perma_server_url'] ) ? esc_attr( $this->options['amber_perma_server_url']) : '' ); } public function amber_perma_api_server_url_callback() { printf( '' . 'This should not need to be changed
', isset( $this->options['amber_perma_api_server_url'] ) ? esc_attr( $this->options['amber_perma_api_server_url']) : '' ); } public function amber_aws_access_key_callback() { printf( '' . 'Visit Managing Access Keys for your AWS Account for instructions to generate an access key.
', isset( $this->options['amber_aws_access_key'] ) ? esc_attr( $this->options['amber_aws_access_key']) : '' ); } public function amber_aws_secret_key_callback() { printf( '' . 'Visit Managing Access Keys for your AWS Account for instructions to generate a secret access key.
', isset( $this->options['amber_aws_secret_key'] ) ? esc_attr( $this->options['amber_aws_secret_key']) : '' ); } public function amber_aws_bucket_callback() { printf( '' . 'Name of the Bucket where snapshots will be stored
', isset( $this->options['amber_aws_bucket'] ) ? esc_attr( $this->options['amber_aws_bucket']) : '' ); } public function amber_aws_region_callback() { printf( '' . 'Your snapshots will be stored in this S3 region. Unless you are an advanced user, do not modify this setting.
', isset( $this->options['amber_aws_region'] ) ? esc_attr( $this->options['amber_aws_region']) : '' ); } public function amber_available_action_callback() { $option = isset($this->options['amber_available_action']) ? $this->options['amber_available_action'] : AMBER_ACTION_NONE; ?>How a visitor to your site will experience links to pages that are currently available.
options['amber_unavailable_action']) ? $this->options['amber_unavailable_action'] : AMBER_ACTION_NONE; ?>How a visitor to your site will experience links to pages that are currently unavailable.
' . 'Delay before "Site Available" notification appears to a visitor on your site.
', isset( $this->options['amber_available_action_hover'] ) ? esc_attr( $this->options['amber_available_action_hover']) : '' ); } public function amber_unavailable_action_hover_callback() { printf( '' . 'Delay before "Site Unavailable" notification appears to a visitor on your site.
', isset( $this->options['amber_unavailable_action_hover'] ) ? esc_attr( $this->options['amber_unavailable_action_hover']) : '' ); } public function amber_external_availability_callback() { $option = isset($this->options['amber_external_availability']) ? $this->options['amber_external_availability'] : AMBER_EXTERNAL_AVAILABILITY_NONE; ?>Optional: Use site accessibility data from the Berkman Center for Internet & Society at Harvard University
options['amber_report_availability']) ? $this->options['amber_report_availability'] : AMBER_REPORT_AVAILABILITY_NONE; ?>Optional: Contribute site accessibility data for research as part of the Berkman Center for Internet & Society at Harvard University
' . 'Optional: Request additional snapshots from the Internet Archive, the Library of Congress web archive, archive.today, and more.
', isset( $this->options['amber_timegate'] ) ? esc_attr( $this->options['amber_timegate']) : '' ); } public function amber_country_id_callback() { $option = isset($this->options['amber_country_id']) ? $this->options['amber_country_id'] : ""; ?>Visitors to your website with browser IP addresses originating in this country will experience specified behavior.
options['amber_country_available_action']) ? $this->options['amber_country_available_action'] : AMBER_ACTION_NONE; ?>How a visitor to your site will experience links to pages that are currently available.
options['amber_country_unavailable_action']) ? $this->options['amber_country_unavailable_action'] : AMBER_ACTION_NONE; ?>How a visitor to your site will experience links to pages that are currently unavailable.
' . 'Delay before "Site Available" notification appears to a visitor on your site.
', isset( $this->options['amber_country_available_action_hover'] ) ? esc_attr( $this->options['amber_country_available_action_hover']) : '' ); } public function amber_country_unavailable_action_hover_callback() { printf( '' . 'Delay before "Site Unavailable" notification appears to a visitor on your site.
', isset( $this->options['amber_country_unavailable_action_hover'] ) ? esc_attr( $this->options['amber_country_unavailable_action_hover']) : '' ); } private function get_countries() { $countries = array( 'AD' => 'Andorra', 'AE' => 'United Arab Emirates', 'AF' => 'Afghanistan', 'AG' => 'Antigua and Barbuda', 'AI' => 'Anguilla', 'AL' => 'Albania', 'AM' => 'Armenia', 'AN' => 'Netherlands Antilles', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AR' => 'Argentina', 'AS' => 'American Samoa', 'AT' => 'Austria', 'AU' => 'Australia', 'AW' => 'Aruba', 'AX' => 'Aland Islands', 'AZ' => 'Azerbaijan', 'BA' => 'Bosnia and Herzegovina', 'BB' => 'Barbados', 'BD' => 'Bangladesh', 'BE' => 'Belgium', 'BF' => 'Burkina Faso', 'BG' => 'Bulgaria', 'BH' => 'Bahrain', 'BI' => 'Burundi', 'BJ' => 'Benin', 'BL' => 'Saint Barthélemy', 'BM' => 'Bermuda', 'BN' => 'Brunei', 'BO' => 'Bolivia', 'BR' => 'Brazil', 'BS' => 'Bahamas', 'BT' => 'Bhutan', 'BV' => 'Bouvet Island', 'BW' => 'Botswana', 'BY' => 'Belarus', 'BZ' => 'Belize', 'CA' => 'Canada', 'CC' => 'Cocos (Keeling) Islands', 'CD' => 'Congo (Kinshasa)', 'CF' => 'Central African Republic', 'CG' => 'Congo (Brazzaville)', 'CH' => 'Switzerland', 'CI' => 'Ivory Coast', 'CK' => 'Cook Islands', 'CL' => 'Chile', 'CM' => 'Cameroon', 'CN' => 'China', 'CO' => 'Colombia', 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CW' => 'Curaçao', 'CV' => 'Cape Verde', 'CX' => 'Christmas Island', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DE' => 'Germany', 'DJ' => 'Djibouti', 'DK' => 'Denmark', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'DZ' => 'Algeria', 'EC' => 'Ecuador', 'EE' => 'Estonia', 'EG' => 'Egypt', 'EH' => 'Western Sahara', 'ER' => 'Eritrea', 'ES' => 'Spain', 'ET' => 'Ethiopia', 'FI' => 'Finland', 'FJ' => 'Fiji', 'FK' => 'Falkland Islands', 'FM' => 'Micronesia', 'FO' => 'Faroe Islands', 'FR' => 'France', 'GA' => 'Gabon', 'GB' => 'United Kingdom', 'GD' => 'Grenada', 'GE' => 'Georgia', 'GF' => 'French Guiana', 'GG' => 'Guernsey', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GL' => 'Greenland', 'GM' => 'Gambia', 'GN' => 'Guinea', 'GP' => 'Guadeloupe', 'GQ' => 'Equatorial Guinea', 'GR' => 'Greece', 'GS' => 'South Georgia and the South Sandwich Islands', 'GT' => 'Guatemala', 'GU' => 'Guam', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HK' => 'Hong Kong S.A.R., China', 'HM' => 'Heard Island and McDonald Islands', 'HN' => 'Honduras', 'HR' => 'Croatia', 'HT' => 'Haiti', 'HU' => 'Hungary', 'ID' => 'Indonesia', 'IE' => 'Ireland', 'IL' => 'Israel', 'IM' => 'Isle of Man', 'IN' => 'India', 'IO' => 'British Indian Ocean Territory', 'IQ' => 'Iraq', 'IR' => 'Iran', 'IS' => 'Iceland', 'IT' => 'Italy', 'JE' => 'Jersey', 'JM' => 'Jamaica', 'JO' => 'Jordan', 'JP' => 'Japan', 'KE' => 'Kenya', 'KG' => 'Kyrgyzstan', 'KH' => 'Cambodia', 'KI' => 'Kiribati', 'KM' => 'Comoros', 'KN' => 'Saint Kitts and Nevis', 'KP' => 'North Korea', 'KR' => 'South Korea', 'KW' => 'Kuwait', 'KY' => 'Cayman Islands', 'KZ' => 'Kazakhstan', 'LA' => 'Laos', 'LB' => 'Lebanon', 'LC' => 'Saint Lucia', 'LI' => 'Liechtenstein', 'LK' => 'Sri Lanka', 'LR' => 'Liberia', 'LS' => 'Lesotho', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'LV' => 'Latvia', 'LY' => 'Libya', 'MA' => 'Morocco', 'MC' => 'Monaco', 'MD' => 'Moldova', 'ME' => 'Montenegro', 'MF' => 'Saint Martin (French part)', 'MG' => 'Madagascar', 'MH' => 'Marshall Islands', 'MK' => 'Macedonia', 'ML' => 'Mali', 'MM' => 'Myanmar', 'MN' => 'Mongolia', 'MO' => 'Macao S.A.R., China', 'MP' => 'Northern Mariana Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MS' => 'Montserrat', 'MT' => 'Malta', 'MU' => 'Mauritius', 'MV' => 'Maldives', 'MW' => 'Malawi', 'MX' => 'Mexico', 'MY' => 'Malaysia', 'MZ' => 'Mozambique', 'NA' => 'Namibia', 'NC' => 'New Caledonia', 'NE' => 'Niger', 'NF' => 'Norfolk Island', 'NG' => 'Nigeria', 'NI' => 'Nicaragua', 'NL' => 'Netherlands', 'NO' => 'Norway', 'NP' => 'Nepal', 'NR' => 'Nauru', 'NU' => 'Niue', 'NZ' => 'New Zealand', 'OM' => 'Oman', 'PA' => 'Panama', 'PE' => 'Peru', 'PF' => 'French Polynesia', 'PG' => 'Papua New Guinea', 'PH' => 'Philippines', 'PK' => 'Pakistan', 'PL' => 'Poland', 'PM' => 'Saint Pierre and Miquelon', 'PN' => 'Pitcairn', 'PR' => 'Puerto Rico', 'PS' => 'Palestinian Territory', 'PT' => 'Portugal', 'PW' => 'Palau', 'PY' => 'Paraguay', 'QA' => 'Qatar', 'RE' => 'Reunion', 'RO' => 'Romania', 'RS' => 'Serbia', 'RU' => 'Russia', 'RW' => 'Rwanda', 'SA' => 'Saudi Arabia', 'SB' => 'Solomon Islands', 'SC' => 'Seychelles', 'SD' => 'Sudan', 'SE' => 'Sweden', 'SG' => 'Singapore', 'SH' => 'Saint Helena', 'SI' => 'Slovenia', 'SJ' => 'Svalbard and Jan Mayen', 'SK' => 'Slovakia', 'SL' => 'Sierra Leone', 'SM' => 'San Marino', 'SN' => 'Senegal', 'SO' => 'Somalia', 'SR' => 'Suriname', 'ST' => 'Sao Tome and Principe', 'SV' => 'El Salvador', 'SY' => 'Syria', 'SZ' => 'Swaziland', 'TC' => 'Turks and Caicos Islands', 'TD' => 'Chad', 'TF' => 'French Southern Territories', 'TG' => 'Togo', 'TH' => 'Thailand', 'TJ' => 'Tajikistan', 'TK' => 'Tokelau', 'TL' => 'Timor-Leste', 'TM' => 'Turkmenistan', 'TN' => 'Tunisia', 'TO' => 'Tonga', 'TR' => 'Turkey', 'TT' => 'Trinidad and Tobago', 'TV' => 'Tuvalu', 'TW' => 'Taiwan', 'TZ' => 'Tanzania', 'UA' => 'Ukraine', 'UG' => 'Uganda', 'UM' => 'United States Minor Outlying Islands', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VA' => 'Vatican', 'VC' => 'Saint Vincent and the Grenadines', 'VE' => 'Venezuela', 'VG' => 'British Virgin Islands', 'VI' => 'U.S. Virgin Islands', 'VN' => 'Vietnam', 'VU' => 'Vanuatu', 'WF' => 'Wallis and Futuna', 'WS' => 'Samoa', 'YE' => 'Yemen', 'YT' => 'Mayotte', 'ZA' => 'South Africa', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe', ); natcasesort($countries); return $countries; } } include_once dirname( __FILE__ ) . '/amber.php'; if( is_admin() ) $my_settings_page = new AmberSettingsPage();