Filter hook 'wp_check_post_lock_window'

in WP Core File wp-admin/includes/ajax-actions.php at line 2945

View Source

wp_check_post_lock_window

Filter Hook
Description
Filters the post lock window duration.

Hook Information

File Location wp-admin/includes/ajax-actions.php View on GitHub
Hook Type Filter
Line Number 2945

Hook Parameters

Type Name Description
int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 150.

Usage Examples

Basic Usage
<?php
// Hook into wp_check_post_lock_window
add_filter('wp_check_post_lock_window', 'my_custom_filter', 10, 1);

function my_custom_filter($interval) {
    // Your custom filtering logic here
    return $interval;
}

Source Code Context

wp-admin/includes/ajax-actions.php:2945 - How this hook is used in WordPress core
<?php
2940  	 * @since 3.3.0
2941  	 *
2942  	 * @param int $interval The interval in seconds the post lock duration
2943  	 *                      should last, plus 5 seconds. Default 150.
2944  	 */
2945  	$new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 150 ) + 5 ) . ':' . $active_lock[1];
2946  	update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) );
2947  	wp_die( 1 );
2948  }
2949  
2950  /**

PHP Documentation

<?php
/**
	 * Filters the post lock window duration.
	 *
	 * @since 3.3.0
	 *
	 * @param int $interval The interval in seconds the post lock duration
	 *                      should last, plus 5 seconds. Default 150.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/ajax-actions.php
Related Hooks

Related hooks will be displayed here in future updates.