Menu Close Menu
Menu
  • 0
    • Number of items in basket: 0

      • Your basket is empty.
      • Total: £0.00
      • Checkout
  • Blog
  • Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Contact Us
  • Demo

Removing Post Lock from Tickets

Removing Post Lock from Tickets

Enable multiple agents to work on a ticket simultaneously

WordPress locks posts whenever they are accessed in order to prevent multiple users from accessing and modifying the post at the same time.

This can be a hindrance to a support organisation and therefore, sometimes, it is necessary to enable multiple people to access and work on a ticket at the same time.

Post Lock

Remove the Post Lock from Tickets

With KB Support, by default, we do not adjust the WordPress post lock feature, however, we have built in functionality for you to easily override this configuration with a single line of code.

Place the following into your functions.php file, or into a custom plugin, to allow multiple agents to view and edit a support ticket simultaneously.

/**
 * Disable the WordPress post lock from tickets
 * to enable multiple support workers to view and
 * edit a ticket at the same time.
 */
add_filter( 'kbs_disable_ticket_post_lock', '__return_true' );

Remove the Post Lock for Support Managers Only

Whilst a single line of code can remove the post lock for everyone, with slightly more advanced coding, it is possible to remove the post lock in certain conditions only.

The following example will remove the post lock for users with the Support Manager role only…

/**
 * Disable the WordPress post lock from tickets
 * to enable support managers to view and
 * edit a ticket at the same time as agents.
 *
 * @param	bool	$remove		True to disable, or false
 * @return	bool
 */
function kbs_example_remove_post_lock_for_managers( $remove )	{

	$current_user = wp_get_current_user();
	$user_roles   = $current_user->roles;
 
	if ( in_array( 'support_manager', $user_roles ) )	{
		$remove = true;
	}

	return $remove;
}
add_filter( 'kbs_disable_ticket_post_lock', 'kbs_example_disable_post_lock_for_managers' );

Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

Removing Post Lock from Tickets

WordPress locks posts whenever they are accessed in order to prevent multiple users from accessing and modifying the post at the same time. This can be a hindrance to a support organisation and therefore, sometimes, it is necessary to enable multiple people to access and work on a ticket at the same time. Remove the Post…
KB Article rating: 4.0 based on 1 ratings

Share this:

  • Tweet
  • WhatsApp

Related Articles

Advanced FAQs Tickets Workflow Last updated: 11th September 2017

Published by Michael

Mike is the founder and lead developer of KB Support. When he's not working on KB Support, he's generally spending time with his 3 children and following his favourite football team

Posts by Michael Visit Website

Post navigation

Previous

Assigning Multiple Agents to a Ticket

Next

Configuring Reply Approvals

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs

Latest Tweets

RT @nhsCFwarriormum: @ChrisMRiches -Love this Great to see @cftrust working with @Daily_Express to help raise valuable funds for this brill…

- 7 days ago

h J R
The Advanced Ticket Assignment Extension for KB Support is available now! - https://t.co/6bIm4FJgoN

- 47 days ago

h J R
Configuring Advanced Ticket Assignment https://t.co/Afs57XLn43 https://t.co/F5Afzlv9S0

- 47 days ago

h J R

Social Links

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Sign up to our newsletter!

Subscribe now to receive all the latest news, thoughts and offers from KB Support.
New subscribers will receive 15% off their first purchase.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
© 2019 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Donate
  • Your Account
  • Contact Us
  • Privacy Policy