Skip to content

Commit

Permalink
Only process supported post types once per request
Browse files Browse the repository at this point in the history
  • Loading branch information
douglas-johnson committed Sep 11, 2024
1 parent 37065d2 commit 0e2c26a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions php/class-coauthors-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 0e2c26a

Please sign in to comment.