Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace post_class with something less expensive #23

Open
k1sul1 opened this issue Mar 14, 2019 · 0 comments
Open

Replace post_class with something less expensive #23

k1sul1 opened this issue Mar 14, 2019 · 0 comments

Comments

@k1sul1
Copy link
Contributor

k1sul1 commented Mar 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant