post type => plural label, for translatable types without the block editor. */ public function classic_types(): array { require_once ABSPATH . 'wp-admin/includes/post.php'; // Defines use_block_editor_for_post_type outside wp-admin. $out = array(); foreach ( $this->settings->get()->post_types() as $type ) { $object = get_post_type_object( $type ); if ( $object && ! use_block_editor_for_post_type( $type ) ) { $out[ $type ] = (string) $object->labels->name; } } return $out; } /** The Classic Editor plugin is active: its setting can bring the block editor back. */ public function classic_editor_plugin(): bool { return class_exists( 'Classic_Editor' ); } }