wp_check_post_lock_window

wp_check_post_lock_window

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_check_post_lock_window') is found 2 times:

  • /wp-admin/includes/ajax-actions.php line 2945
    	 *
    	 * @param int $interval The interval in seconds the post lock duration
    	 *                      should last, plus 5 seconds. Default 150.
    	 */
    	$new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 150 ) + 5 ) . ':' . $active_lock[1];
    	update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) );
    	wp_die( 1 );
    }
    
    /**
     * Handles dismissing a WordPress pointer via AJAX.
    
  • /wp-admin/includes/post.php line 1723
    		return false;
    	}
    
    	/** This filter is documented in wp-admin/includes/ajax-actions.php */
    	$time_window = apply_filters( 'wp_check_post_lock_window', 150 );
    
    	if ( $time && $time > time() - $time_window && get_current_user_id() !== $user ) {
    		return $user;
    	}
    
    	return false;