From e4c3a98822e5064be0e7ce87438bb51b99821358 Mon Sep 17 00:00:00 2001 From: Douglas Johnson Date: Wed, 11 Sep 2024 13:53:33 -0400 Subject: [PATCH] Only process supported post types once per request --- php/class-coauthors-plus.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/class-coauthors-plus.php b/php/class-coauthors-plus.php index f51a5289..0a195690 100644 --- a/php/class-coauthors-plus.php +++ b/php/class-coauthors-plus.php @@ -255,6 +255,10 @@ public function admin_init(): void { * @return array Supported post types. */ public function supported_post_types(): array { + if ( ! empty( $this->supported_post_types ) ) { + return $this->supported_post_types; + } + $post_types = array_values( get_post_types() ); $excluded_built_in = array(