From 11ee44d2b7f1e350ee2719bef81a64537e4fc991 Mon Sep 17 00:00:00 2001 From: Marcus Quinn Date: Sat, 15 Mar 2025 02:29:48 +0000 Subject: [PATCH] Add expandable settings to Auto Upload Images: - Add max width/height settings - Add URL exclusion list - Add filename and alt text patterns - Add expand/collapse functionality - Add styles for settings panel --- admin/css/wpa-superstar-admin.css | 65 +++++++++++++++++ admin/settings.php | 115 ++++++++++++++++++++++++++---- 2 files changed, 165 insertions(+), 15 deletions(-) diff --git a/admin/css/wpa-superstar-admin.css b/admin/css/wpa-superstar-admin.css index d37a7c1..11c2c32 100644 --- a/admin/css/wpa-superstar-admin.css +++ b/admin/css/wpa-superstar-admin.css @@ -260,4 +260,69 @@ input:checked + .slider:before { .nav-tab-active { background: #fff; border-bottom: 1px solid #fff; +} + +.wpa-toggle-header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; +} + +.wpa-expand-settings { + background: none; + border: none; + padding: 4px; + cursor: pointer; + color: #787c82; + transition: color .15s ease-in-out; +} + +.wpa-expand-settings:hover { + color: #2271b1; +} + +.wpa-expand-settings .dashicons { + width: 20px; + height: 20px; + font-size: 20px; +} + +.wpa-toggle-settings { + margin-top: 15px; + padding-top: 15px; + border-top: 1px solid #ddd; +} + +.wpa-setting-row { + margin-bottom: 20px; +} + +.wpa-setting-row:last-child { + margin-bottom: 0; +} + +.wpa-setting-row label { + display: block; + font-weight: 600; + margin-bottom: 5px; +} + +.wpa-setting-row input[type="text"], +.wpa-setting-row input[type="number"], +.wpa-setting-row textarea { + width: 100%; + max-width: 400px; + margin-top: 5px; +} + +.wpa-setting-row textarea { + min-height: 80px; +} + +.wpa-setting-row .description { + margin-top: 5px; + margin-left: 0; + color: #666; + font-size: 13px; } \ No newline at end of file diff --git a/admin/settings.php b/admin/settings.php index 80cbfbd..664329a 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -508,28 +508,113 @@ function wpa_superstar_settings_page() {
- +
+ + +

+
+ +