From e6782ba7939c6d03fb335596482b484129429653 Mon Sep 17 00:00:00 2001 From: Daniel Reintanz <85614916+FreelancerAMP@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:52:47 +0200 Subject: [PATCH 01/14] CHANGES: CHANGED tax to efobi standard --- rpi-wall-installer.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/rpi-wall-installer.php b/rpi-wall-installer.php index e3cf6a5..63dcaac 100644 --- a/rpi-wall-installer.php +++ b/rpi-wall-installer.php @@ -70,10 +70,10 @@ public function add_custom_capabilities() $role->add_cap('delete_badge'); $role->add_cap('assign_badge'); - $role->add_cap('manage_schooltype'); - $role->add_cap('edit_schooltype'); - $role->add_cap('delete_schooltype'); - $role->add_cap('assign_schooltype'); + $role->add_cap('manage_section'); + $role->add_cap('edit_section'); + $role->add_cap('delete_section'); + $role->add_cap('assign_section'); /* if($roleslug === 'editor'){ @@ -137,7 +137,7 @@ public function add_custom_capabilities() $role->add_cap('assign_badge'); - $role->add_cap('assign_schooltype'); + $role->add_cap('assign_section'); } } @@ -249,7 +249,7 @@ public function register_post_types() 'title', "editor", ], - 'taxonomies' => ['wall-tag', "badge", 'schooltype', 'profession'], + 'taxonomies' => ['wall-tag', "badge", 'section', 'profession'], "show_in_graphql" => false, ]; @@ -547,17 +547,17 @@ function register_taxonomies() register_taxonomy("badge", ["member"], $args); /** - * Taxonomy: schooltype. + * Taxonomy: Section. */ $labels = [ - "name" => __("Schulformen", "blocksy"), - "singular_name" => __("Schulform", "blocksy"), + "name" => __("Bereiche", "blocksy"), + "singular_name" => __("Bereich", "blocksy"), ]; $args = [ - "label" => __("Schulform", "blocksy"), + "label" => __("Bereich", "blocksy"), "labels" => $labels, "public" => true, "publicly_queryable" => true, @@ -566,24 +566,24 @@ function register_taxonomies() "show_in_menu" => true, "show_in_nav_menus" => true, "query_var" => true, - "rewrite" => ['slug' => 'schooltype', 'with_front' => true, 'hierarchical' => true,], + "rewrite" => ['slug' => 'section', 'with_front' => true, 'hierarchical' => true,], "show_admin_column" => false, "show_in_rest" => true, "show_tagcloud" => false, - "rest_base" => "schooltype", + "rest_base" => "section", "rest_controller_class" => "WP_REST_Terms_Controller", "rest_namespace" => "wp/v2", "show_in_quick_edit" => false, "sort" => false, "show_in_graphql" => false, "capabilities" => array( - 'manage_terms' => 'manage_schooltype', - 'edit_terms' => 'edit_schooltype', - 'delete_terms' => 'delete_schooltype', - 'assign_terms' => 'assign_schooltype' + 'manage_terms' => 'manage_section', + 'edit_terms' => 'edit_section', + 'delete_terms' => 'delete_section', + 'assign_terms' => 'assign_section' ), ]; - register_taxonomy("schooltype", ["member"], $args); + register_taxonomy("section", ["member"], $args); /** * Taxonomy: profession. From d76e733744b9d604c8687583676b41046b0a4e6b Mon Sep 17 00:00:00 2001 From: Joachim Happel Date: Fri, 31 Mar 2023 17:07:04 +0200 Subject: [PATCH 02/14] =?UTF-8?q?CHANGES:=20Leerer=20Termin=20bei=20Arbeit?= =?UTF-8?q?sstruktubogen=20wird=20ber=C3=BCcksichtigt=20Fehlende=20Ausgabe?= =?UTF-8?q?n=20im=20Protokoll=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/protocol.php | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/inc/protocol.php b/inc/protocol.php index 0a476b7..661a298 100644 --- a/inc/protocol.php +++ b/inc/protocol.php @@ -166,6 +166,8 @@ function on_acf_update_protocol( $post_id, $type, $args, $form, $action) { if(time() < strtotime($next_date)){ update_post_meta($group_id,'date_of_meeting', $next_date ); do_action('new_meeting_date', $next_date, $group_id ); + }elseif(!$next_date){ + delete_post_meta($group_id,'date_of_meeting'); } do_action('update_group_protocol', $post_id, $group_id ); } @@ -205,10 +207,12 @@ function on_acf_submit_new_protocol( $post_id, $type, $args, $form, $action) { static function display($content){ $fields = (get_field_objects()); + //var_dump('
',$fields); die();
 
 
 		if('protokoll' === get_post_type()){
 
+
 			$members = get_field('teilnehmende');
 			$content .= '

'.$fields['teilnehmende']['label'].':