Skip to content

Commit e4c3a98

Browse files
Only process supported post types once per request
1 parent 7ee34f5 commit e4c3a98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: php/class-coauthors-plus.php

+4
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ public function admin_init(): void {
255255
* @return array Supported post types.
256256
*/
257257
public function supported_post_types(): array {
258+
if ( ! empty( $this->supported_post_types ) ) {
259+
return $this->supported_post_types;
260+
}
261+
258262
$post_types = array_values( get_post_types() );
259263

260264
$excluded_built_in = array(

0 commit comments

Comments
 (0)