From 59acfaee5194612cd2e0a47735d1d02cd2cddc04 Mon Sep 17 00:00:00 2001 From: Viktor Miller Date: Fri, 16 Jan 2026 11:02:21 +0900 Subject: [PATCH] feat(01-01): register custom post type for form submissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created Umzugsliste_CPT class with singleton pattern - Registered umzugsliste_entry post type - German labels (Einträge, Eintrag) - Settings: public=false, show_ui=true, show_in_menu=false - Supports title field only (custom fields in Phase 6) - Registered on init hook --- includes/class-cpt.php | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 includes/class-cpt.php diff --git a/includes/class-cpt.php b/includes/class-cpt.php new file mode 100644 index 0000000..d5b92d0 --- /dev/null +++ b/includes/class-cpt.php @@ -0,0 +1,71 @@ + 'Einträge', + 'singular_name' => 'Eintrag', + 'menu_name' => 'Einträge', + 'name_admin_bar' => 'Eintrag', + 'add_new' => 'Neu hinzufügen', + 'add_new_item' => 'Neuen Eintrag hinzufügen', + 'new_item' => 'Neuer Eintrag', + 'edit_item' => 'Eintrag bearbeiten', + 'view_item' => 'Eintrag ansehen', + 'all_items' => 'Alle Einträge', + 'search_items' => 'Einträge durchsuchen', + 'not_found' => 'Keine Einträge gefunden', + 'not_found_in_trash' => 'Keine Einträge im Papierkorb gefunden', + ); + + $args = array( + 'labels' => $labels, + 'public' => false, + 'show_ui' => true, + 'show_in_menu' => false, + 'capability_type' => 'post', + 'supports' => array( 'title' ), + 'has_archive' => false, + 'rewrite' => false, + ); + + register_post_type( 'umzugsliste_entry', $args ); + } +}