Recent

Revisions class

Revisions

Revisions class.

Namespace: WebberZone\AutoClose\Features
Since: 3.0.0
Source: includes/features/class-revisions.php line 17

Methods

__construct()

Constructor.

Since: 3.0.0
Line: 24

public function __construct(  );

process_revisions()

Process revisions based on settings.

Since: 3.0.0
Line: 33

public function process_revisions(  );

delete_revisions()

Delete post revisions.

Since: 3.0.0
Line: 58

public function delete_revisions(  ): int|bool;

Returns: int|bool — Number of rows affected/selected for all other queries. Boolean false on error.

revisions_to_keep()

Sets the number of revisions to keep for a specific post type.

Since: 3.0.0
Line: 80

public function revisions_to_keep( $num, $post ): int;
TypeNameDescription
int$numNumber of revisions to store.
\WP_Post$postPost object.

Returns: int — Number of revisions to keep.

get_revision_post_types()

Retrieve the post types that have revisions.

Since: 3.0.0
Line: 103

public function get_revision_post_types(  ): array;

Returns: array — Array of post types that support revisisions in the format name => label/name