AnsPress_Upgrader::restore_last_activity( integer $post_id )

Description #

Restore last activity of a post.

Parameters #

  • $post_id
    integer (Required) Post ID.

Source #

File: lib/class-anspress-upgrader.php

	public function restore_last_activity( $post_id ) {
		$activity = get_post_meta( $post_id, '__ap_activity', true );

		// Restore last activity.
		if ( ! empty( $activity ) ) {
			ap_insert_qameta( $post_id, array( 'activities' => $activity ) );
		}

		delete_post_meta( $post_id, '__ap_activity' );
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment