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

Fix unset variable #4757

Merged
merged 2 commits into from
Feb 2, 2018
Merged

Fix unset variable #4757

merged 2 commits into from
Feb 2, 2018

Conversation

Rahmon
Copy link
Contributor

@Rahmon Rahmon commented Jan 30, 2018

Description

In the gutenberg_meta_box_post_form_hidden_fields function the active_post_lock variable never was defined. This function was added in #2804 by @BE-Webdesign.

Closes #4714

How Has This Been Tested?

This has been tested with "npm test", "npm run test-e2e" and manually on Chrome and Firefox.

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@aduth
Copy link
Member

aduth commented Jan 30, 2018

Can you explain a bit more the context for the specific change to set a post lock if one does not exist? I am not sure whether we want to be incurring side-effects as part of this code, vs. simply dropping the dead code as was proposed in #4714.

@aduth
Copy link
Member

aduth commented Jan 30, 2018

As a productivity quality-of-life tip: You can flag your pull request to automatically close related issues with specific keywords, e.g. "Closes #4714"

See also: https://help.github.com/articles/closing-issues-using-keywords/

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is probably something related to Post Locking and for the meta boxes work @BE-Webdesign was trying to be as close as possible to the classic's editor markup to avoid issues with meta boxes trying to access dom nodes etc... I don't see this field used by meta boxes in general. Fine to remove for me.

Post locking should be worked on separately anyway.

@youknowriad youknowriad merged commit 56e192c into WordPress:master Feb 2, 2018
@Rahmon Rahmon deleted the fix/4714 branch February 2, 2018 14:47
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.

Dead (or bad) code in gutenberg_meta_box_post_form_hidden_fields()
4 participants