Merged
Conversation
…ion) Neue Admin-Seite unter Datensätze → Einstellungen mit vier Sektionen. Standardwerte werden via set_default_value() direkt in Carbon Fields vorausgefüllt; Cache-TTL ist nun konfigurierbar statt hardcodiert (300 s). - class-settings.php: WordPress Settings API; ODW_Settings::get() als zentrale Zugriffs-API; filter_catalog_title() koppelt odw_catalog_title an gespeicherten Wert; handle_recalculate_quality() iteriert alle Datensätze und ruft ODW_Quality::calculate/store auf - class-fields.php: set_default_value() für odw_publisher, odw_license, odw_language liest aus ODW_Settings::get() - class-rest-api.php: delete_catalog_transients_public() als öffentlicher Alias — wird nach Einstellungsänderungen aufgerufen - uninstall.php: liest odw_settings[delete_on_uninstall]; löscht alle Plugin-Optionen (odw_settings, odw_demo_post_id, odw_show_welcome) - open-data-wizard.php: class-settings.php vor class-fields.php laden https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn
8 neue DCAT-AP 3.0 Felder in neuem Tab 4 (Vorschau → Tab 5 verschoben). JSON-LD Context um vcard und skos Namespaces erweitert. - class-fields.php: Tab "4 — Erweiterte Angaben" mit Projektseite (dcat:landingPage), Aktualisierungsfrequenz (dct:accrualPeriodicity, EU Publications Office Vokabular), geographischer Abdeckung (dct:spatial → skos:prefLabel), zeitlichem Bezug (dct:PeriodOfTime mit dcat:startDate/endDate) und Kontaktpunkt (vcard:Organization mit vcard:fn, vcard:hasEmail, vcard:hasURL); get_periodicity_options() für EU-Frequenz-Vokabular; odw_build_dataset_jsonld() um alle neuen Felder erweitert - class-rest-api.php: vcard + skos Namespace in JSONLD_CONTEXT - class-admin.php: Help Tab Text auf Tab 5 (Vorschau) aktualisiert https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn
… tests) - tests/test-settings.php: 7 tests covering ODW_Settings::get() defaults, merging, single-key access and filter_catalog_title() with whitespace handling - tests/test-quality.php: 17 tests covering get_level() thresholds, get_level_label(), get_indicators() total (100 pts), get()/store() meta round-trip, append_to_jsonld() - tests/test-shortcode.php: 10 tests covering format_bytes() byte/KB/MB/GB ranges and render() early-return edge cases (zero ID, missing post, wrong type, non-published) - tests/test-fields-extended.php: 22 tests covering get_periodicity_options() EU URIs and odw_build_dataset_jsonld() for all v1.7.0 fields (landingPage, accrualPeriodicity, spatial, temporal start/end, contactPoint with mailto: prefix and @id URL) - composer.json: downgraded phpunit to ^9.6 and wp_mock to ^1.0 (PHP 8.4 compat) - phpunit.xml: migrated from PHPUnit 10 schema; added suffix=".php" for test discovery - vendor: added PHPUnit 9.6, WP_Mock 1.1, Mockery and related dev dependencies https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn
…d file meta
Replaces the Carbon Fields file field with a custom sidebar meta box that uses
the native WordPress Media Library (wp.media) for a richer upload experience.
Changes:
- includes/class-fields.php: remove CF Field::make('file', 'odw_file_id') from Tab 3
- includes/class-admin.php:
- register_file_meta_box() — sidebar meta box on odw_dataset edit screen
- render_file_meta_box() — button + file preview area + remove button + nonce
- save_file_attachment() — nonce/capability-gated save; auto-computes
_odw_file_size (bytes) and _odw_file_format (uppercase extension) on file change
- enqueue_assets() — calls wp_enqueue_media() and loads odw-file-upload.js
with wp_localize_script (current file name + translated labels)
- assets/js/odw-file-upload.js (new) — jQuery + wp.media integration:
opens media frame, writes attachment ID to hidden input, updates preview;
remove button clears selection; UI state restored from localized PHP data
- includes/class-shortcode.php — reads pre-computed _odw_file_size/_odw_file_format
from post meta; falls back to runtime filesize()/pathinfo() for old entries
- assets/css/admin.css — .odw-file-preview, .odw-file-actions, icon styles
Security: wp_verify_nonce + current_user_can('edit_post') in save handler.
All 56 PHPUnit tests pass.
https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.