| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * Check to see if the post is currently being edited by another user. |
| 15 | 15 | * |
| 16 | 16 | * @see wp_check_post_lock() |
| 17 | 17 | * |
| 18 | - * @since 2.6.0 bbPress (r6340) | |
| 18 | + * @since 2.6.0 bbPress (r6341) | |
| 19 | 19 | * |
| 20 | 20 | * @param int $post_id ID of the post to check for editing |
| 21 | 21 | * @return integer False: not locked or locked by current user. Int: user ID of user with lock. |
| 22 | 22 | */ |
| @@ -34,11 +34,11 @@ | ||
| 34 | 34 | |
| 35 | 35 | // Get lock |
| 36 | 36 | $lock = explode( ':', $lock ); |
| 37 | 37 | $time = $lock[0]; |
| 38 | - $user = (int) isset( $lock[1] ) | |
| 39 | - ? $lock[1] | |
| 40 | - : get_post_meta( $post->ID, '_edit_last', true ); | |
| 38 | + $user = isset( $lock[1] ) | |
| 39 | + ? (int) $lock[1] | |
| 40 | + : (int) get_post_meta( $post->ID, '_edit_last', true ); | |
| 41 | 41 | |
| 42 | 42 | // Filter editing window duration |
| 43 | 43 | $time_window = apply_filters( 'bbp_check_post_lock_window', 3 * MINUTE_IN_SECONDS ); |
| 44 | 44 | |
| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * Mark the post as currently being edited by the current user |
| 55 | 55 | * |
| 56 | - * @since 2.6.0 bbPress (r6340) | |
| 56 | + * @since 2.6.0 bbPress (r6341) | |
| 57 | 57 | * |
| 58 | 58 | * @param int $post_id ID of the post to being edited |
| 59 | 59 | * @return bool|array Returns false if the post doesn't exist of there is no current user, or |
| 60 | 60 | * an array of the lock time and the user ID. |