wordpress-theme-base icon indicating copy to clipboard operation
wordpress-theme-base copied to clipboard

Replace post_class with something less expensive

Open k1sul1 opened this issue 5 years ago • 0 comments

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

k1sul1 avatar Mar 14 '19 09:03 k1sul1