class WP_Sync_Post_Meta_Storage {}

In this article

This class’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Core class that provides an interface for storing and retrieving sync updates and awareness data during a collaborative session.

Description

Data is stored as post meta on a dedicated post per room of a custom post type.

Methods

NameDescription
WP_Sync_Post_Meta_Storage::add_updateAdds a sync update to a given room.
WP_Sync_Post_Meta_Storage::get_awareness_stateGets awareness state for a given room.
WP_Sync_Post_Meta_Storage::get_cursorGets the current cursor for a given room.
WP_Sync_Post_Meta_Storage::get_storage_post_idGets or creates the storage post for a given room.
WP_Sync_Post_Meta_Storage::get_update_countGets the number of updates stored for a given room.
WP_Sync_Post_Meta_Storage::get_updates_after_cursorRetrieves sync updates from a room after the given cursor.
WP_Sync_Post_Meta_Storage::remove_updates_before_cursorRemoves updates from a room that are older than the given cursor.
WP_Sync_Post_Meta_Storage::set_awareness_stateSets awareness state for a given room.

Source

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.