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 Dec 2, 2024
1 parent 7ee34f5 commit e4c3a98
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 e4c3a98

Please sign in to comment.