From 6caece78f54146277f1cfae2526f7e4b9c28056a Mon Sep 17 00:00:00 2001 From: s4luorth Date: Mon, 8 Jun 2026 14:18:30 +0200 Subject: [PATCH] feat: plugin-icon einbinden (auto-erkennung in assets/) (v1.5.1) CB_Updater::icons() liefert das plugin-icon fuer den Aktualisierungen-screen und das "Versionsdetails"-popup. Es erkennt automatisch eine icon-datei in assets/ (icon.svg|png|webp|jpg); ohne datei wird kein icon gesetzt. Bild wird vom betreiber selbst hinzugefuegt (nicht im repo). + version 1.5.1. Co-Authored-By: Claude Opus 4.8 --- gdpr-content-blocker/gdpr-content-blocker.php | 6 ++--- .../includes/class-updater.php | 22 ++++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/gdpr-content-blocker/gdpr-content-blocker.php b/gdpr-content-blocker/gdpr-content-blocker.php index 77543df..6c7a30c 100644 --- a/gdpr-content-blocker/gdpr-content-blocker.php +++ b/gdpr-content-blocker/gdpr-content-blocker.php @@ -1,9 +1,9 @@ $url ]; + } + return [ '1x' => $url, '2x' => $url, 'default' => $url ]; + } + } + return []; + } + /** Inject the update into the plugins update transient. */ public static function inject( mixed $transient ): mixed { if ( ! is_object( $transient ) ) { @@ -97,7 +116,7 @@ class CB_Updater { 'tested' => (string) ( $info['tested'] ?? '' ), 'requires' => (string) ( $info['requires'] ?? '' ), 'requires_php'=> (string) ( $info['requires_php'] ?? '' ), - 'icons' => [], + 'icons' => self::icons(), 'banners' => [], ]; @@ -131,6 +150,7 @@ class CB_Updater { 'tested' => (string) ( $info['tested'] ?? '' ), 'requires_php' => (string) ( $info['requires_php'] ?? '' ), 'download_link' => esc_url_raw( $info['package'] ?? '' ), + 'icons' => self::icons(), 'sections' => [ 'changelog' => wp_kses_post( $info['changelog'] ?? '' ), ],