$published, 'in_sitemap' => $in_sitemap, 'missing' => $published - $in_sitemap, ); } /** * Published posts across every public post type, counted straight from * the posts table via wp_count_posts(). * * @return int */ public static function published_count(): int { $total = 0; foreach ( array_keys( ABDS_SEO_Taxonomy_Helper::public_post_types() ) as $post_type ) { $counts = wp_count_posts( $post_type ); $total += isset( $counts->publish ) ? (int) $counts->publish : 0; } return $total; } }