wordpress-theme-base
wordpress-theme-base copied to clipboard
Replace post_class with something less expensive
My "final gift": post_class() is a monster, and does more work than necessary. The post object should contain enough data to create all classes actually needed.
https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/post-template.php#L466 https://github.com/Vincit/wordpress-theme-base/blob/8161ccde82e48c4502f0b9d6413964b4681f6089/inc/templates/SinglePost.php https://github.com/Vincit/wordpress-theme-base/blob/8161ccde82e48c4502f0b9d6413964b4681f6089/inc/templates/PostListItem.php