AP_Update_Helper::change_closed_status( object $_post )

Description #

Change closed post status to publish.

Parameters #

  • $_post
    object (Required) Post object.

Source #

File: admin/update.php

	public function change_closed_status( $_post ) {
		if ( 'closed' === $_post->post_status ) {
			global $wpdb;

			$wpdb->update( $wpdb->posts, [ 'post_status' => 'publish' ], [ 'ID' => $_post->ID ], [ '%s' ] );
			ap_toggle_close_question( $_post->ID );
		}
	}

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