Title: WP_Sync_Post_Meta_Storage::get_cursor
Published: May 20, 2026

---

# WP_Sync_Post_Meta_Storage::get_cursor( string $room ): int

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#wp--skip-link--target)

Gets the current cursor for a given room.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#description)󠁿

The cursor is set during get_updates_after_cursor() and represents the highest meta_id
seen for the room’s sync updates.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#parameters)󠁿

 `$room`stringrequired

Room identifier.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#return)󠁿

 int Current cursor for the room.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#source)󠁿

    ```php
    public function get_cursor( string $room ): int {
    	return $this->room_cursors[ $room ] ?? 0;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/collaboration/class-wp-sync-post-meta-storage.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php#L208)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php#L208-L210)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_sync_post_meta_storage/get_cursor/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_sync_post_meta_storage%2Fget_cursor%2F)
before being able to contribute a note or feedback.