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

[Draft] Post Locking #6314

Closed
wants to merge 5 commits into from
Closed

[Draft] Post Locking #6314

wants to merge 5 commits into from

Conversation

allan23
Copy link

@allan23 allan23 commented Feb 10, 2021

Context

This is a draft PR of the Post Locking implementation (#3126)

@google-cla
Copy link

google-cla bot commented Feb 10, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Feb 10, 2021

$send['lock_error'] = $error;
} else {
$new_lock = $this->set_post_lock( $post_id );
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could just use wp_set_post_lock(). No need to duplicate this code from core.

Copy link
Author

Choose a reason for hiding this comment

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

Is that function available via the REST API?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, good point.

wp-admin/includes/post.php would need to be loaded in the REST API.

But we cannot just copy the core code for license reasons.

return $response;
}

$user_id = $this->check_post_lock( $post_id );
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could just use wp_check_post_lock(). No need to duplicate this code from core.

@swissspidy
Copy link
Collaborator

@allan23 Would be great if you could sign the CLA above so we could build upon your contribution here.

@allan23
Copy link
Author

allan23 commented Feb 11, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Feb 11, 2021
@spacedmonkey
Copy link
Contributor

Closing in favor of #6497

@swissspidy swissspidy deleted the 3126/post-locking branch February 26, 2021 12:17
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.

3 participants