From 5c5635e44bbd0326dea1a2b578bda43abfab4683 Mon Sep 17 00:00:00 2001 From: DavidCamejo Date: Tue, 4 Nov 2025 23:03:43 -0400 Subject: [PATCH] First commit --- assets/admin-settings.js | 12 ++---------- git.txt | 17 +++++++++++++++++ src/Admin/SettingsPage.php | 22 +++++++++++++++++++++- 3 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 git.txt diff --git a/assets/admin-settings.js b/assets/admin-settings.js index 6061389..db13f1a 100644 --- a/assets/admin-settings.js +++ b/assets/admin-settings.js @@ -1,19 +1,11 @@ -// assets/admin-settings.js (function ($) { - const toggleSections = () => { + function toggleSections() { const adapter = $('#flysystem-offload-adapter').val(); $('.flysystem-offload-adapter-section').hide(); $(`.flysystem-offload-adapter-section[data-adapter="${adapter}"]`).show(); - }; + } $(document).ready(function () { - const $heading = $('h2:contains("Amazon S3 / Compatible")'); - const $table = $heading.next('table'); - - if ($heading.length && $table.length) { - $heading.add($table).wrapAll('
'); - } - toggleSections(); $('#flysystem-offload-adapter').on('change', toggleSections); }); diff --git a/git.txt b/git.txt new file mode 100644 index 0000000..635e979 --- /dev/null +++ b/git.txt @@ -0,0 +1,17 @@ +# Realizando push para um repositório existente por linha de comando +cd /ruta/de/tu/proyecto +git init +git add . +git commit -m "First commit" +git remote add origin https://git.brasdrive.com.br/Brasdrive/flysystem-offload.git +git push -u origin main + +---------------- +# Criando um novo repositório por linha de comando +touch README.md +git init +git checkout -b main +git add README.md +git commit -m "First commit" +git remote add origin https://git.brasdrive.com.br/Brasdrive/flysystem-offload.git +git push -u origin main diff --git a/src/Admin/SettingsPage.php b/src/Admin/SettingsPage.php index e0da506..feae5c3 100644 --- a/src/Admin/SettingsPage.php +++ b/src/Admin/SettingsPage.php @@ -188,7 +188,10 @@ class SettingsPage
generateSectionsMarkup(); + echo $sectionsHtml; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + submit_button(__('Guardar cambios', 'flysystem-offload')); ?>
@@ -196,6 +199,23 @@ class SettingsPage ]*>\s*' . $label . '\s*<\/h2>\s*]*>.*?<\/table>)/is'; + + return preg_replace( + $pattern, + '
$1
', + $html + ); + } + public function renderAdapterField(): void { $settings = get_option('flysystem_offload_settings', []);