diff --git a/assets/css/aspire-update.css b/assets/css/aspire-update.css index 89be84f..3ba7e93 100644 --- a/assets/css/aspire-update.css +++ b/assets/css/aspire-update.css @@ -1,63 +1,63 @@ -@keyframes glow { - 0% { - background-color: rgba(255, 223, 0, 0.1); - } - - 100% { - background-color: none; - } -} - -.glow-reveal { - animation: glow 0.5s ease-in-out; -} - -.aspireupdate-settings-field-hosts-wrapper .aspireupdate-settings-field-hosts-row { - margin: 0 0 10px; -} - -#aspireupdate-generate-api-key { - display: inline-block; - width: 30px; - height: 30px; - background: url(../images/icon-key.svg) no-repeat center center / 24px 24px; - background-color: #cbcbcb; - border: 1px solid #8c8f94; - border-radius: 3px; - clip-path: inset(0 0 0 0); - color: transparent; - cursor: pointer; - transition: background-color 0.3s ease; -} - -#aspireupdate-generate-api-key:hover { - background-color: #e3e3e3; -} - -.aspireupdate-settings-field-wrapper p.error { - color: #bc3b3b; - display: none; -} - -#voltron { - color: transparent; - font-size: 8px; - line-height: 6px; - display: inline-block; - cursor: default; -} - -#voltron:hover { - animation: blink 1.8s ease-in-out infinite; - animation-delay: 5s; -} - -@keyframes blink { - 0%, - 100% { - color: inherit; - } - 50% { - color: transparent; - } -} +@keyframes glow { + 0% { + background-color: rgba(255, 223, 0, 0.1); + } + + 100% { + background-color: none; + } +} + +.glow-reveal { + animation: glow 0.5s ease-in-out; +} + +.aspireupdate-settings-field-hosts-wrapper .aspireupdate-settings-field-hosts-row { + margin: 0 0 10px; +} + +#aspireupdate-generate-api-key { + display: inline-block; + width: 30px; + height: 30px; + background: url(../images/icon-key.svg) no-repeat center center / 24px 24px; + background-color: #cbcbcb; + border: 1px solid #8c8f94; + border-radius: 3px; + clip-path: inset(0 0 0 0); + color: transparent; + cursor: pointer; + transition: background-color 0.3s ease; +} + +#aspireupdate-generate-api-key:hover { + background-color: #e3e3e3; +} + +.aspireupdate-settings-field-wrapper p.error { + color: #bc3b3b; + display: none; +} + +#voltron { + color: transparent; + font-size: 8px; + line-height: 6px; + display: inline-block; + cursor: default; +} + +#voltron:hover { + animation: blink 1.8s ease-in-out infinite; + animation-delay: 5s; +} + +@keyframes blink { + 0%, + 100% { + color: inherit; + } + 50% { + color: transparent; + } +} diff --git a/assets/js/aspire-update.js b/assets/js/aspire-update.js index fa9b96f..8b450bf 100644 --- a/assets/js/aspire-update.js +++ b/assets/js/aspire-update.js @@ -1,239 +1,239 @@ -jQuery(document).ready(function () { - new ApiRewrites(); - new ApiDebug(); -}); - -class ApiRewrites { - constructor() { - ApiRewrites.host_selector.init(); - ApiRewrites.other_hosts.init(); - ApiRewrites.api_key.init(); - ApiRewrites.enabled_rewrites.init(); - } - - static enabled_rewrites = { - field: jQuery('#aspireupdate-settings-field-enable'), - sub_fields: [], - init() { - ApiRewrites.enabled_rewrites.sub_fields = [ - ApiRewrites.host_selector, - ApiRewrites.api_key - ]; - - ApiRewrites.enabled_rewrites.field.change(function () { - if (jQuery(this).is(':checked')) { - ApiRewrites.enabled_rewrites.show_options(); - } else { - ApiRewrites.enabled_rewrites.hide_options(); - } - }).change(); - }, - show_options() { - Fields.show(ApiRewrites.enabled_rewrites.sub_fields); - }, - hide_options() { - Fields.hide(ApiRewrites.enabled_rewrites.sub_fields); - } - } - - static host_selector = { - field: jQuery('#aspireupdate-settings-field-api_host'), - init() { - ApiRewrites.host_selector.field.change(function () { - let selected_option = ApiRewrites.host_selector.field.find(":selected"); - if ('other' === selected_option.val()) { - ApiRewrites.other_hosts.show(); - } else { - ApiRewrites.other_hosts.hide(); - } - - if (ApiRewrites.host_selector.is_api_key_required()) { - ApiRewrites.api_key.make_required(); - } else { - ApiRewrites.api_key.remove_required(); - } - - if (ApiRewrites.host_selector.has_api_key_url()) { - ApiRewrites.api_key.show_action_button(); - } else { - ApiRewrites.api_key.hide_action_button(); - } - }).change(); - }, - is_api_key_required() { - let is_api_rewrites_enabled = jQuery('#aspireupdate-settings-field-enable').is(':checked'); - let selected_option = ApiRewrites.host_selector.field.find(":selected"); - let require_api_key = selected_option.attr('data-require-api-key'); - if (is_api_rewrites_enabled && 'true' === require_api_key) { - return true; - } - return false; - }, - has_api_key_url() { - let selected_option = ApiRewrites.host_selector.field.find(":selected"); - let api_url = selected_option.attr('data-api-key-url'); - if ('' !== api_url) { - return true; - } - return false; - }, - get_api_key_url() { - let selected_option = ApiRewrites.host_selector.field.find(":selected"); - let api_url = selected_option.attr('data-api-key-url'); - if ('' !== api_url) { - return api_url; - } - return ''; - }, - } - - static other_hosts = { - field: jQuery('#aspireupdate-settings-field-api_host_other'), - init() { - ApiRewrites.other_hosts.field.on("blur", function () { - let value = ApiRewrites.other_hosts.field.val(); - value = ApiRewrites.other_hosts.strip_protocol(value); - value = ApiRewrites.other_hosts.strip_dangerous_characters(value); - ApiRewrites.other_hosts.field.val(value); - }); - }, - show() { - ApiRewrites.other_hosts.field.parent().show(); - ApiRewrites.other_hosts.field.focus(); - ApiRewrites.other_hosts.make_required(); - }, - hide() { - ApiRewrites.other_hosts.field.parent().hide(); - ApiRewrites.other_hosts.remove_required(); - }, - make_required() { - ApiRewrites.other_hosts.field.prop('required', true); - }, - remove_required() { - ApiRewrites.other_hosts.field.prop('required', false); - }, - strip_protocol(value) { - const protocol_regex = /^(https?|ftp|sftp|smtp|ftps|file):\/\/|^www\./i; - return value.replace(protocol_regex, ''); - }, - strip_dangerous_characters(value) { - const dangerous_characters_regex = /[<>/"'&;]/g; - return value.replace(dangerous_characters_regex, ''); - } - } - - static api_key = { - field: jQuery('#aspireupdate-settings-field-api_key'), - action_button: jQuery('#aspireupdate-generate-api-key'), - init() { - ApiRewrites.api_key.action_button.click(function () { - ApiRewrites.api_key.hide_error(); - ApiRewrites.api_key.get_api_key(); - }); - ApiRewrites.api_key.hide_error(); - }, - get_api_key() { - let parameters = { - "url": ApiRewrites.host_selector.get_api_key_url(), - "type": "POST", - "contentType": 'application/json', - "data": JSON.stringify({ - "domain": aspireupdate.domain - }) - }; - jQuery.ajax(parameters) - .done(function (response) { - ApiRewrites.api_key.field.val(response.apikey); - }) - .fail(function (response) { - if ((response.status === 400) || (response.status === 401)) { - ApiRewrites.api_key.show_error(response.responseJSON?.error); - } else { - ApiRewrites.api_key.show_error('Unexpected Error: ' + response.status); - } - }); - }, - show() { - ApiRewrites.api_key.field.parent().parent().parent().show(); - }, - hide() { - ApiRewrites.api_key.field.parent().parent().parent().hide(); - }, - show_action_button() { - ApiRewrites.api_key.action_button.show(); - }, - hide_action_button() { - ApiRewrites.api_key.action_button.hide(); - }, - make_required() { - ApiRewrites.api_key.field.prop('required', true); - }, - remove_required() { - ApiRewrites.api_key.field.prop('required', false); - }, - show_error(message) { - ApiRewrites.api_key.field.parent().find('.error').html(message).show(); - }, - hide_error() { - ApiRewrites.api_key.field.parent().find('.error').html('').hide(); - } - } -} - -class ApiDebug { - constructor() { - ApiDebug.enabled_debug.init(); - } - - static enabled_debug = { - field: jQuery('#aspireupdate-settings-field-enable_debug'), - sub_fields: [], - init() { - ApiDebug.enabled_debug.sub_fields = [ - ApiDebug.debug_type, - ApiDebug.disable_ssl_verification - ]; - - ApiDebug.enabled_debug.field.change(function () { - if (jQuery(this).is(':checked')) { - ApiDebug.enabled_debug.show_options(); - } else { - ApiDebug.enabled_debug.hide_options(); - } - }).change(); - }, - show_options() { - Fields.show(ApiDebug.enabled_debug.sub_fields); - }, - hide_options() { - Fields.hide(ApiDebug.enabled_debug.sub_fields); - } - } - - static debug_type = { - field: jQuery('.aspireupdate-settings-field-wrapper-enable_debug_type'), - } - - static disable_ssl_verification = { - field: jQuery('#aspireupdate-settings-field-disable_ssl_verification'), - } -} - -class Fields { - static show(sub_fields) { - jQuery.each(sub_fields, function (index, sub_field) { - sub_field.field.closest('tr').show().addClass('glow-reveal'); - sub_field.field.change(); - setTimeout(function () { - sub_field.field.closest('tr').removeClass('glow-reveal'); - }, 500); - }); - } - - static hide(sub_fields) { - jQuery.each(sub_fields, function (index, sub_field) { - sub_field.field.closest('tr').hide(); - sub_field.field.change(); - }); - } -} \ No newline at end of file +jQuery(document).ready(function () { + new ApiRewrites(); + new ApiDebug(); +}); + +class ApiRewrites { + constructor() { + ApiRewrites.host_selector.init(); + ApiRewrites.other_hosts.init(); + ApiRewrites.api_key.init(); + ApiRewrites.enabled_rewrites.init(); + } + + static enabled_rewrites = { + field: jQuery('#aspireupdate-settings-field-enable'), + sub_fields: [], + init() { + ApiRewrites.enabled_rewrites.sub_fields = [ + ApiRewrites.host_selector, + ApiRewrites.api_key + ]; + + ApiRewrites.enabled_rewrites.field.change(function () { + if (jQuery(this).is(':checked')) { + ApiRewrites.enabled_rewrites.show_options(); + } else { + ApiRewrites.enabled_rewrites.hide_options(); + } + }).change(); + }, + show_options() { + Fields.show(ApiRewrites.enabled_rewrites.sub_fields); + }, + hide_options() { + Fields.hide(ApiRewrites.enabled_rewrites.sub_fields); + } + } + + static host_selector = { + field: jQuery('#aspireupdate-settings-field-api_host'), + init() { + ApiRewrites.host_selector.field.change(function () { + let selected_option = ApiRewrites.host_selector.field.find(":selected"); + if ('other' === selected_option.val()) { + ApiRewrites.other_hosts.show(); + } else { + ApiRewrites.other_hosts.hide(); + } + + if (ApiRewrites.host_selector.is_api_key_required()) { + ApiRewrites.api_key.make_required(); + } else { + ApiRewrites.api_key.remove_required(); + } + + if (ApiRewrites.host_selector.has_api_key_url()) { + ApiRewrites.api_key.show_action_button(); + } else { + ApiRewrites.api_key.hide_action_button(); + } + }).change(); + }, + is_api_key_required() { + let is_api_rewrites_enabled = jQuery('#aspireupdate-settings-field-enable').is(':checked'); + let selected_option = ApiRewrites.host_selector.field.find(":selected"); + let require_api_key = selected_option.attr('data-require-api-key'); + if (is_api_rewrites_enabled && 'true' === require_api_key) { + return true; + } + return false; + }, + has_api_key_url() { + let selected_option = ApiRewrites.host_selector.field.find(":selected"); + let api_url = selected_option.attr('data-api-key-url'); + if ('' !== api_url) { + return true; + } + return false; + }, + get_api_key_url() { + let selected_option = ApiRewrites.host_selector.field.find(":selected"); + let api_url = selected_option.attr('data-api-key-url'); + if ('' !== api_url) { + return api_url; + } + return ''; + }, + } + + static other_hosts = { + field: jQuery('#aspireupdate-settings-field-api_host_other'), + init() { + ApiRewrites.other_hosts.field.on("blur", function () { + let value = ApiRewrites.other_hosts.field.val(); + value = ApiRewrites.other_hosts.strip_protocol(value); + value = ApiRewrites.other_hosts.strip_dangerous_characters(value); + ApiRewrites.other_hosts.field.val(value); + }); + }, + show() { + ApiRewrites.other_hosts.field.parent().show(); + ApiRewrites.other_hosts.field.focus(); + ApiRewrites.other_hosts.make_required(); + }, + hide() { + ApiRewrites.other_hosts.field.parent().hide(); + ApiRewrites.other_hosts.remove_required(); + }, + make_required() { + ApiRewrites.other_hosts.field.prop('required', true); + }, + remove_required() { + ApiRewrites.other_hosts.field.prop('required', false); + }, + strip_protocol(value) { + const protocol_regex = /^(https?|ftp|sftp|smtp|ftps|file):\/\/|^www\./i; + return value.replace(protocol_regex, ''); + }, + strip_dangerous_characters(value) { + const dangerous_characters_regex = /[<>/"'&;]/g; + return value.replace(dangerous_characters_regex, ''); + } + } + + static api_key = { + field: jQuery('#aspireupdate-settings-field-api_key'), + action_button: jQuery('#aspireupdate-generate-api-key'), + init() { + ApiRewrites.api_key.action_button.click(function () { + ApiRewrites.api_key.hide_error(); + ApiRewrites.api_key.get_api_key(); + }); + ApiRewrites.api_key.hide_error(); + }, + get_api_key() { + let parameters = { + "url": ApiRewrites.host_selector.get_api_key_url(), + "type": "POST", + "contentType": 'application/json', + "data": JSON.stringify({ + "domain": aspireupdate.domain + }) + }; + jQuery.ajax(parameters) + .done(function (response) { + ApiRewrites.api_key.field.val(response.apikey); + }) + .fail(function (response) { + if ((response.status === 400) || (response.status === 401)) { + ApiRewrites.api_key.show_error(response.responseJSON?.error); + } else { + ApiRewrites.api_key.show_error('Unexpected Error: ' + response.status); + } + }); + }, + show() { + ApiRewrites.api_key.field.parent().parent().parent().show(); + }, + hide() { + ApiRewrites.api_key.field.parent().parent().parent().hide(); + }, + show_action_button() { + ApiRewrites.api_key.action_button.show(); + }, + hide_action_button() { + ApiRewrites.api_key.action_button.hide(); + }, + make_required() { + ApiRewrites.api_key.field.prop('required', true); + }, + remove_required() { + ApiRewrites.api_key.field.prop('required', false); + }, + show_error(message) { + ApiRewrites.api_key.field.parent().find('.error').html(message).show(); + }, + hide_error() { + ApiRewrites.api_key.field.parent().find('.error').html('').hide(); + } + } +} + +class ApiDebug { + constructor() { + ApiDebug.enabled_debug.init(); + } + + static enabled_debug = { + field: jQuery('#aspireupdate-settings-field-enable_debug'), + sub_fields: [], + init() { + ApiDebug.enabled_debug.sub_fields = [ + ApiDebug.debug_type, + ApiDebug.disable_ssl_verification + ]; + + ApiDebug.enabled_debug.field.change(function () { + if (jQuery(this).is(':checked')) { + ApiDebug.enabled_debug.show_options(); + } else { + ApiDebug.enabled_debug.hide_options(); + } + }).change(); + }, + show_options() { + Fields.show(ApiDebug.enabled_debug.sub_fields); + }, + hide_options() { + Fields.hide(ApiDebug.enabled_debug.sub_fields); + } + } + + static debug_type = { + field: jQuery('.aspireupdate-settings-field-wrapper-enable_debug_type'), + } + + static disable_ssl_verification = { + field: jQuery('#aspireupdate-settings-field-disable_ssl_verification'), + } +} + +class Fields { + static show(sub_fields) { + jQuery.each(sub_fields, function (index, sub_field) { + sub_field.field.closest('tr').show().addClass('glow-reveal'); + sub_field.field.change(); + setTimeout(function () { + sub_field.field.closest('tr').removeClass('glow-reveal'); + }, 500); + }); + } + + static hide(sub_fields) { + jQuery.each(sub_fields, function (index, sub_field) { + sub_field.field.closest('tr').hide(); + sub_field.field.change(); + }); + } +} diff --git a/assets/playground/blueprint.json b/assets/playground/blueprint.json index 3b89a47..d9e8453 100644 --- a/assets/playground/blueprint.json +++ b/assets/playground/blueprint.json @@ -1,57 +1,57 @@ { - "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "preferredVersions": { - "php": "latest", - "wp": "latest" - }, - "meta": { - "title": "AspirePress AspireUpdate Plugin Demo", - "description": "Load table AspireUpdate plugin into a WordPress Playground site", - "author": "asirota", - "categories": [ - "demo", - "plugin" - ] - }, - "siteOptions": { - "blogname": "AspireUpdate Demo Site" - }, - "plugins": [ - "https://github-proxy.com/proxy/?repo=AspirePress/AspireUpdate&branch=playground-ready", - "error-log-viewer", - "plugin-check" - ], - "features": { - "networking": true - }, - "login": true, - "landingPage": "/wp-admin/admin.php?page=aspireupdate-settings", - "steps": [ - { - "step": "defineWpConfigConsts", - "consts": { - "WP_DISABLE_FATAL_ERROR_HANDLER": false, - "WP_DEBUG": false, - "WP_DEBUG_LOG": false, - "WP_DEBUG_DISPLAY": true - } - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/mu-plugins/rewrite.php", - "data": "set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );" - }, - { - "step": "installTheme", - "themeData": { - "resource": "wordpress.org/themes", - "slug": "twentytwentytwo" - } - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/mu-plugins/bgnightly-notice.php", - "data": "
Welcome to AspireUpdate Demo. Visit AspirePress documentation for more details.
'; });" - } - ] + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "preferredVersions": { + "php": "latest", + "wp": "latest" + }, + "meta": { + "title": "AspirePress AspireUpdate Plugin Demo", + "description": "Load table AspireUpdate plugin into a WordPress Playground site", + "author": "asirota", + "categories": [ + "demo", + "plugin" + ] + }, + "siteOptions": { + "blogname": "AspireUpdate Demo Site" + }, + "plugins": [ + "https://github-proxy.com/proxy/?repo=AspirePress/AspireUpdate&branch=playground-ready", + "error-log-viewer", + "plugin-check" + ], + "features": { + "networking": true + }, + "login": true, + "landingPage": "/wp-admin/admin.php?page=aspireupdate-settings", + "steps": [ + { + "step": "defineWpConfigConsts", + "consts": { + "WP_DISABLE_FATAL_ERROR_HANDLER": false, + "WP_DEBUG": false, + "WP_DEBUG_LOG": false, + "WP_DEBUG_DISPLAY": true + } + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/mu-plugins/rewrite.php", + "data": "set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );" + }, + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "twentytwentytwo" + } + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/mu-plugins/bgnightly-notice.php", + "data": "Welcome to AspireUpdate Demo. Visit AspirePress documentation for more details.
'; });" + } + ] } diff --git a/composer.json b/composer.json index c5a7ae5..98cb325 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,20 @@ { - "name": "aspirepress/aspire-update", - "description": "Update plugins and themes for WordPress.", - "type": "wordpress-plugin", - "license": "GPL-3.0-or-later", - "authors": [ - { - "name": "AspirePress" - } - ], - "require": { - "php": ">=7.4.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "^1.1.0" - }, - "scripts": { - "test": [ "Composer\\Config::disableProcessTimeout", "@php ./vendor/phpunit/phpunit/phpunit" ] - } + "name": "aspirepress/aspire-update", + "description": "Update plugins and themes for WordPress.", + "type": "wordpress-plugin", + "license": "GPL-3.0-or-later", + "authors": [ + { + "name": "AspirePress" + } + ], + "require": { + "php": ">=7.4.0" + }, + "require-dev": { + "yoast/phpunit-polyfills": "^1.1.0" + }, + "scripts": { + "test": [ "Composer\\Config::disableProcessTimeout", "@php ./vendor/phpunit/phpunit/phpunit" ] + } } diff --git a/includes/class-themes-screens.php b/includes/class-themes-screens.php index 207fecb..597314f 100644 --- a/includes/class-themes-screens.php +++ b/includes/class-themes-screens.php @@ -94,7 +94,7 @@ public function redirect_to_theme_install() { if ( $nonce && ! wp_verify_nonce( $nonce, 'query-themes' ) ) { return; } - + $browse = isset( $_GET['browse'] ) ? sanitize_text_field( wp_unslash( $_GET['browse'] ) ) : ''; if ( ! in_array( $browse, $this->unsupported_filters, true ) ) { return; diff --git a/languages/AspireUpdate-de_DE.I10n.php b/languages/AspireUpdate-de_DE.I10n.php index 4297531..2d2c3e5 100644 --- a/languages/AspireUpdate-de_DE.I10n.php +++ b/languages/AspireUpdate-de_DE.I10n.php @@ -1,25 +1,25 @@ 'AspireUpdate','report-msgid-bugs-to'=>'','pot-creation-date'=>'2024-11-04 00:29+0000','po-revision-date'=>'2024-11-04 00:29+0000','last-translator'=>'','language-team'=>'German (Germany)','language'=>'de_DE','plural-forms'=>'nplurals=2; plural=n != 1;','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','x-generator'=>'Loco https://localise.biz/','x-loco-version'=>'2.6.11; wp-6.6.2','x-domain'=>'AspireUpdate','messages'=>[ - 'API Configuration'=>'API-Konfiguration', - 'API Debug Configuration'=>'API-Debug-Konfiguration', - 'API Host'=>'API-Host', - 'API Key'=>'API-Schlüssel', - 'AspirePress'=>'AspirePress', - 'AspireUpdate'=>'AspireUpdate', - 'AspireUpdate Settings'=>'AspireUpdate-Einstellungen', - 'Disable SSL Verification'=>'SSL-Überprüfung deaktivieren', - 'Disables the verification of SSL to allow local testing.'=>'Deaktiviert die SSL-Überprüfung, um lokale Tests zu ermöglichen.', - 'Enable AspireUpdate API Rewrites'=>'Aktivieren der AspireUpdate API-Umschreibungen', - 'Enable Debug Mode'=>'Debug-Modus aktivieren', - 'Enable Debug Type'=>'Debug-Typ aktivieren', - 'Enables debug mode for the plugin.'=>'Aktiviert den Debug-Modus für das Plugin.', - 'https://aspirepress.org/'=>'AspireUpdate', - 'https://docs.aspirepress.org/aspireupdate/'=>'https://docs.aspirepress.org/aspireupdate/', - 'Outputs the request URL and headers / response headers and body / string that is being rewritten.'=>'Gibt die Anfrage-URL und Header / Antwort-Header und -Body / Zeichenfolge aus, die umgeschrieben wird.', - 'Provides an API key for repositories that may require authentication.'=>'Stellt einen API-Schlüssel für Repositories bereit, die möglicherweise eine Authentifizierung erfordern.', - 'Request'=>'Anfrage', - 'Response'=>'Antwort', - 'String'=>'Zeichenkette', - 'Update plugins and themes for WordPress.'=>'Aktualisiert Plugins und Themes für WordPress.', - 'Your new API Host.'=>'Ihr neuer API-Host' + 'API Configuration'=>'API-Konfiguration', + 'API Debug Configuration'=>'API-Debug-Konfiguration', + 'API Host'=>'API-Host', + 'API Key'=>'API-Schlüssel', + 'AspirePress'=>'AspirePress', + 'AspireUpdate'=>'AspireUpdate', + 'AspireUpdate Settings'=>'AspireUpdate-Einstellungen', + 'Disable SSL Verification'=>'SSL-Überprüfung deaktivieren', + 'Disables the verification of SSL to allow local testing.'=>'Deaktiviert die SSL-Überprüfung, um lokale Tests zu ermöglichen.', + 'Enable AspireUpdate API Rewrites'=>'Aktivieren der AspireUpdate API-Umschreibungen', + 'Enable Debug Mode'=>'Debug-Modus aktivieren', + 'Enable Debug Type'=>'Debug-Typ aktivieren', + 'Enables debug mode for the plugin.'=>'Aktiviert den Debug-Modus für das Plugin.', + 'https://aspirepress.org/'=>'AspireUpdate', + 'https://docs.aspirepress.org/aspireupdate/'=>'https://docs.aspirepress.org/aspireupdate/', + 'Outputs the request URL and headers / response headers and body / string that is being rewritten.'=>'Gibt die Anfrage-URL und Header / Antwort-Header und -Body / Zeichenfolge aus, die umgeschrieben wird.', + 'Provides an API key for repositories that may require authentication.'=>'Stellt einen API-Schlüssel für Repositories bereit, die möglicherweise eine Authentifizierung erfordern.', + 'Request'=>'Anfrage', + 'Response'=>'Antwort', + 'String'=>'Zeichenkette', + 'Update plugins and themes for WordPress.'=>'Aktualisiert Plugins und Themes für WordPress.', + 'Your new API Host.'=>'Ihr neuer API-Host' ]]; diff --git a/languages/AspireUpdate-zh_TW.l10n.php b/languages/AspireUpdate-zh_TW.l10n.php index 530790f..5974948 100644 --- a/languages/AspireUpdate-zh_TW.l10n.php +++ b/languages/AspireUpdate-zh_TW.l10n.php @@ -1,2 +1,2 @@ NULL,'plural-forms'=>NULL,'language'=>'zh_TW','project-id-version'=>'AspireUpdate','pot-creation-date'=>'2024-11-02 12:34-0700','po-revision-date'=>'2024-11-02 12:40-0700','x-generator'=>'Poedit 3.5','messages'=>['Settings have been reset to default.'=>'設定已重設為預設值。','AspireUpdate Settings'=>'AspireUpdate 設定','Save Changes'=>'儲存設定','Reset'=>'重設','API Configuration'=>'API 組態','Enable AspireUpdate API Rewrites'=>'啟用 AspireUpdate API 重寫','API Host'=>'API 主機','Your new API Host.'=>'設定新的 API 主機。','Other'=>'其他主機','API Key'=>'API 金鑰','Provides an API key for repositories that may require authentication.'=>'為需要驗證的存放庫提供 API 金鑰。','API Debug Configuration'=>'API 偵錯組態','Enable Debug Mode'=>'啟用偵錯模式','Enables debug mode for the plugin.'=>'為外掛啟用偵錯模式。','Enable Debug Type'=>'啟用偵錯類型','Request'=>'要求','Response'=>'回應','String'=>'字串','Outputs the request URL and headers / response headers and body / string that is being rewritten.'=>'輸出經過重寫的要求網址、標頭、回應標頭、內容及字串。','Disable SSL Verification'=>'停用 SSL 驗證','Disables the verification of SSL to allow local testing.'=>'停用 SSL 驗證,便能在本機環境進行測試。','Generate API Key'=>'產生 API 金鑰','AspireUpdate'=>'AspireUpdate','https://aspirepress.org/'=>'https://aspirepress.org/','Update plugins and themes for WordPress.'=>'更新 WordPress 的外掛及佈景主題。','AspirePress'=>'AspirePress','https://docs.aspirepress.org/aspireupdate/'=>'https://docs.aspirepress.org/aspireupdate/']]; \ No newline at end of file +return ['domain'=>NULL,'plural-forms'=>NULL,'language'=>'zh_TW','project-id-version'=>'AspireUpdate','pot-creation-date'=>'2024-11-02 12:34-0700','po-revision-date'=>'2024-11-02 12:40-0700','x-generator'=>'Poedit 3.5','messages'=>['Settings have been reset to default.'=>'設定已重設為預設值。','AspireUpdate Settings'=>'AspireUpdate 設定','Save Changes'=>'儲存設定','Reset'=>'重設','API Configuration'=>'API 組態','Enable AspireUpdate API Rewrites'=>'啟用 AspireUpdate API 重寫','API Host'=>'API 主機','Your new API Host.'=>'設定新的 API 主機。','Other'=>'其他主機','API Key'=>'API 金鑰','Provides an API key for repositories that may require authentication.'=>'為需要驗證的存放庫提供 API 金鑰。','API Debug Configuration'=>'API 偵錯組態','Enable Debug Mode'=>'啟用偵錯模式','Enables debug mode for the plugin.'=>'為外掛啟用偵錯模式。','Enable Debug Type'=>'啟用偵錯類型','Request'=>'要求','Response'=>'回應','String'=>'字串','Outputs the request URL and headers / response headers and body / string that is being rewritten.'=>'輸出經過重寫的要求網址、標頭、回應標頭、內容及字串。','Disable SSL Verification'=>'停用 SSL 驗證','Disables the verification of SSL to allow local testing.'=>'停用 SSL 驗證,便能在本機環境進行測試。','Generate API Key'=>'產生 API 金鑰','AspireUpdate'=>'AspireUpdate','https://aspirepress.org/'=>'https://aspirepress.org/','Update plugins and themes for WordPress.'=>'更新 WordPress 的外掛及佈景主題。','AspirePress'=>'AspirePress','https://docs.aspirepress.org/aspireupdate/'=>'https://docs.aspirepress.org/aspireupdate/']]; diff --git a/readme.txt b/readme.txt index c20faae..6844d4b 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === AspireUpdate === Contributors: sarah-savage, namithj, asirota Donate link: https://github.com/sponsors/aspirepress -Tags: +Tags: Requires at least: 5.3 Tested up to: 6.7 Stable tag: 0.5 diff --git a/tests/AdminSettings/AdminSettings_GetSettingTest.php b/tests/AdminSettings/AdminSettings_GetSettingTest.php index d54aed0..9516f90 100644 --- a/tests/AdminSettings/AdminSettings_GetSettingTest.php +++ b/tests/AdminSettings/AdminSettings_GetSettingTest.php @@ -7,13 +7,13 @@ /** * Tests for Admin_Settings::get_setting() - * + * * @covers \AspireUpdate\Admin_Settings::get_setting */ class AdminSettings_GetSettingTest extends WP_UnitTestCase { /** * Test that the default 'api_host' value is retrieved. - * + * * @covers \AspireUpdate\Admin_Settings::get_default_settings */ public function test_should_get_default_api_host() {