-
Notifications
You must be signed in to change notification settings - Fork 4
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
Content changes to track in Altis #506
base: master
Are you sure you want to change the base?
Conversation
inc/telemetry/namespace.php
Outdated
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE || 'auto-draft' === $post->post_status ) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have had to include the auto-draft
status here in the return as it seems to apply when a new post ( the exact post_type ) is created but not other post types. Not returning then fires off the tracking event. Essentially firing two tracking events when creating a new post.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do this in a separate if statement. Read through the logic here, I don't think it will do what you in every scenario. What if DOING_AUTOSAVE
is defined but false. You should never mix &&
operators directly with ||
.
Content changes to track in Altis