WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#38067 new feature request

New filter `wp_post_lock_status`

Reported by: sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.5
Component: Posts, Post Types Keywords: has-patch needs-refresh
Focuses: Cc:
PR Number:

Description

I have wp with one account for 5 people, employees. We make websites so 5 accounts for each website -> waste of time and difficult to maintain. We have big problem - if somebody edit page and I start edit the same page we have conficts and overwrite own changes. I can't see notice about that somebody edit this page because we use one account. My best idea! When user is logged in i create new cookie: wordpress_logged_in_unique_COOKIEHASH with unique hash -> user agent + wp_generate_password().

I save user hash if _edit_lock_hash was saved.

So I can't check that post is locked or. So I write filter for return value of wp_check_post_lock() and... this work!

I suggest add this filter (idea) to core or show me other way to resolve my problem.

Attachments (2)

38067.patch (1.3 KB) - added by sebastian.pisula 3 years ago.
auth.php (1.4 KB) - added by sebastian.pisula 3 years ago.
if filter will be exists this is solution for my problem. I need only filter :)

Download all attachments as: .zip

Change History (5)

#1 @sebastian.pisula
3 years ago

  • Keywords has-patch added

@sebastian.pisula
3 years ago

if filter will be exists this is solution for my problem. I need only filter :)

This ticket was mentioned in Slack in #core by sebastian.pisula. View the logs.


3 years ago

#3 @desrosj
7 months ago

  • Keywords needs-refresh added
  • Version set to 2.5

He @sebastianpisula,

Thanks for this. Your filter request seems sensible. I do recommend using different user accounts, but I could see scenarios where a site would want to implement custom logic for post locking.

The patch needs a refresh against the latest trunk, though. Are you able to take care of that?

Note: See TracTickets for help on using tickets.