PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/common/locks.php +5 -5 2.6.17 → 2.6.19 View file →
@@ -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.