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

Use $post object provided by action hook. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lgedeon
Copy link

@lgedeon lgedeon commented Dec 2, 2019

The action hook display_post_states provides a post object as the second parameter. Using this instead of the global $post prevents errors when the global is not set and may prevent unintended consequences when a post other than the global is being output.

The action hook `display_post_states` provides a post object as the second parameter. Using this instead of the `global $post` prevents errors when the global is not set and may prevent unintended consequences when a post other than the global is being output.
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

Successfully merging this pull request may close these issues.

1 participant