ap_toggle_close_question( integer $post_id )

Description #

Toggle closed

Parameters #

  • $post_id
    integer (Required) Question ID.

Source #

File: includes/qameta.php

function ap_toggle_close_question( $post_id ) {
	$qameta = ap_get_qameta( $post_id );
	$toggle = $qameta->closed ? 0 : 1;
	ap_insert_qameta( $post_id, array( 'closed' => $toggle ) );

	return $toggle;
}

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