{"id":6514,"date":"2024-10-13T13:13:51","date_gmt":"2024-10-13T11:13:51","guid":{"rendered":"https:\/\/ploetner.io\/de\/?p=6514"},"modified":"2024-10-13T13:13:51","modified_gmt":"2024-10-13T11:13:51","slug":"mehrfachausgabe-bei-wordpress-action-verhindern","status":"publish","type":"post","link":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/","title":{"rendered":"Mehrfachausgabe bei WordPress Action verhindern"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Die Version 2.9.2 des <strong>Multisite Language Switcher<\/strong> ist gerade online gegangen. Es gibt diesmal eine relativ lange Liste von Dingen, die ich abgearbeitet habe. Au\u00dferdem habe ich endlich ein l\u00e4stiges Problemchen beseitigt.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">Was hat sich ge\u00e4ndert:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fehlermeldungen von PHPStan abgearbeitet<\/li>\n\n\n\n<li>PHPUnit auf Version 10 aktualisiert <\/li>\n\n\n\n<li>Code Coverage f\u00fcr den Code des Plugins auf zirka 76 % erh\u00f6ht<\/li>\n\n\n\n<li>\u201ePlugin Check Workflow\u201c als GitHub Action hinzugef\u00fcgt und existierende Workflows verbessert<\/li>\n\n\n\n<li>JavaScript Abh\u00e4ngigkeiten \u00fcberarbeitet<\/li>\n\n\n\n<li>Build Script verbessert<\/li>\n\n\n\n<li>Sicherheitsmeldungen des Plugin Checkers abgearbeitet<\/li>\n\n\n\n<li><strong>Doppelte Ausgaben im Admin-Bereich verhindert<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Der letzte Punkt war l\u00e4stig und ich hatte eine L\u00f6sung in den vorherigen Versionen, die bestenfalls einen Hack darstellte. Die (vermutlich endg\u00fcltige und sehr vereinfachte) L\u00f6sung, wenn man verhindern m\u00f6chte, dass eine Funktion, die man einer WordPress Action hinzugef\u00fcgt hat, mehrmals ausgef\u00fchrt wird:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'post_tag_add_form_fields', function ( $taxonomy ) {\n    if ( did_action( 'my_custom_action_name' ) ) {\n        return;\n    }\n\n    \/\/ your code here ...\n\n    do_action( 'my_custom_action_name' );\n} );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ich gehe davon aus, dass nur Websites, in denen <strong>Yoast SEO<\/strong> l\u00e4uft,  die doppelte Ausgabe der Metaboxen des <a href=\"https:\/\/wordpress.org\/plugins\/multisite-language-switcher\/\">Multisite Language Switcher<\/a>, im Editor der Taxonomien (Kategorien, Schlagw\u00f6rter usw.) bemerkt haben.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Falls dem nicht so ist, freue ich mich \u00fcber eure R\u00fcckmeldungen!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die Version 2.9.2 des Multisite Language Switcher ist gerade online gegangen. Es gibt diesmal eine relativ lange Liste von Dingen, die ich abgearbeitet habe. Au\u00dferdem habe ich endlich ein l\u00e4stiges Problemchen beseitigt.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"wpf_show_in_dewp_planet_feed":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-6514","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum<\/title>\n<meta name=\"description\" content=\"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum\" \/>\n<meta property=\"og:description\" content=\"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/\" \/>\n<meta property=\"og:site_name\" content=\"realloc&#039;s asylum\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-13T11:13:51+00:00\" \/>\n<meta name=\"author\" content=\"realloc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"realloc\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/\"},\"author\":{\"name\":\"realloc\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#\\\/schema\\\/person\\\/571f8ada841cca782e8001b942e032c8\"},\"headline\":\"Mehrfachausgabe bei WordPress Action verhindern\",\"datePublished\":\"2024-10-13T11:13:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/\"},\"wordCount\":186,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#\\\/schema\\\/person\\\/571f8ada841cca782e8001b942e032c8\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/\",\"url\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/\",\"name\":\"Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#website\"},\"datePublished\":\"2024-10-13T11:13:51+00:00\",\"description\":\"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/mehrfachausgabe-bei-wordpress-action-verhindern\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ploetner.io\\\/de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mehrfachausgabe bei WordPress Action verhindern\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#website\",\"url\":\"https:\\\/\\\/ploetner.io\\\/de\\\/\",\"name\":\"realloc's asylum\",\"description\":\"Software Developer &amp; WordPress Enthusiast | Born in Germany. Reborn in Italy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#\\\/schema\\\/person\\\/571f8ada841cca782e8001b942e032c8\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ploetner.io\\\/de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/#\\\/schema\\\/person\\\/571f8ada841cca782e8001b942e032c8\",\"name\":\"realloc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/sites\\\/8\\\/2022\\\/11\\\/52602486_10215993351498483_6040822616506236928_n.jpg\",\"url\":\"https:\\\/\\\/ploetner.io\\\/de\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/sites\\\/8\\\/2022\\\/11\\\/52602486_10215993351498483_6040822616506236928_n.jpg\",\"contentUrl\":\"https:\\\/\\\/ploetner.io\\\/de\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/sites\\\/8\\\/2022\\\/11\\\/52602486_10215993351498483_6040822616506236928_n.jpg\",\"width\":847,\"height\":848,\"caption\":\"realloc\"},\"logo\":{\"@id\":\"https:\\\/\\\/ploetner.io\\\/de\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/sites\\\/8\\\/2022\\\/11\\\/52602486_10215993351498483_6040822616506236928_n.jpg\"},\"description\":\"Software Developer &amp; WordPress Enthusiast | Born in Germany. Reborn in Italy.\",\"sameAs\":[\"https:\\\/\\\/ploetner.io\\\/\"],\"url\":\"https:\\\/\\\/ploetner.io\\\/de\\\/author\\\/realloc\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum","description":"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/","og_locale":"de_DE","og_type":"article","og_title":"Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum","og_description":"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.","og_url":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/","og_site_name":"realloc&#039;s asylum","article_published_time":"2024-10-13T11:13:51+00:00","author":"realloc","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"realloc","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/#article","isPartOf":{"@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/"},"author":{"name":"realloc","@id":"https:\/\/ploetner.io\/de\/#\/schema\/person\/571f8ada841cca782e8001b942e032c8"},"headline":"Mehrfachausgabe bei WordPress Action verhindern","datePublished":"2024-10-13T11:13:51+00:00","mainEntityOfPage":{"@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/"},"wordCount":186,"commentCount":0,"publisher":{"@id":"https:\/\/ploetner.io\/de\/#\/schema\/person\/571f8ada841cca782e8001b942e032c8"},"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/","url":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/","name":"Mehrfachausgabe bei WordPress Action verhindern - realloc&#039;s asylum","isPartOf":{"@id":"https:\/\/ploetner.io\/de\/#website"},"datePublished":"2024-10-13T11:13:51+00:00","description":"Die Version 2.9.2 des Multisite Language Switcher ist online. Ich habe endlich ein l\u00e4stiges Problemchen beseitigt.","breadcrumb":{"@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ploetner.io\/de\/mehrfachausgabe-bei-wordpress-action-verhindern\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ploetner.io\/de\/"},{"@type":"ListItem","position":2,"name":"Mehrfachausgabe bei WordPress Action verhindern"}]},{"@type":"WebSite","@id":"https:\/\/ploetner.io\/de\/#website","url":"https:\/\/ploetner.io\/de\/","name":"realloc's asylum","description":"Software Developer &amp; WordPress Enthusiast | Born in Germany. Reborn in Italy.","publisher":{"@id":"https:\/\/ploetner.io\/de\/#\/schema\/person\/571f8ada841cca782e8001b942e032c8"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ploetner.io\/de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":["Person","Organization"],"@id":"https:\/\/ploetner.io\/de\/#\/schema\/person\/571f8ada841cca782e8001b942e032c8","name":"realloc","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/ploetner.io\/de\/wp-content\/uploads\/sites\/7\/sites\/8\/2022\/11\/52602486_10215993351498483_6040822616506236928_n.jpg","url":"https:\/\/ploetner.io\/de\/wp-content\/uploads\/sites\/7\/sites\/8\/2022\/11\/52602486_10215993351498483_6040822616506236928_n.jpg","contentUrl":"https:\/\/ploetner.io\/de\/wp-content\/uploads\/sites\/7\/sites\/8\/2022\/11\/52602486_10215993351498483_6040822616506236928_n.jpg","width":847,"height":848,"caption":"realloc"},"logo":{"@id":"https:\/\/ploetner.io\/de\/wp-content\/uploads\/sites\/7\/sites\/8\/2022\/11\/52602486_10215993351498483_6040822616506236928_n.jpg"},"description":"Software Developer &amp; WordPress Enthusiast | Born in Germany. Reborn in Italy.","sameAs":["https:\/\/ploetner.io\/"],"url":"https:\/\/ploetner.io\/de\/author\/realloc\/"}]}},"_links":{"self":[{"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/posts\/6514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/comments?post=6514"}],"version-history":[{"count":0,"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/posts\/6514\/revisions"}],"wp:attachment":[{"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/media?parent=6514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/categories?post=6514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ploetner.io\/de\/wp-json\/wp\/v2\/tags?post=6514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}