AP_QA_Query_Hooks::imaginary_post( WP_Post $p )

Description #

An imaginary post.

Parameters #

  • $p
    WP_Post (Required) Post.

Source #

File: includes/qaquery-hooks.php

	public static function imaginary_post( $p ) {
		$_post = array(
			'ID'           => 0,
			'post_title'   => __( 'No permission', 'anspress-question-answer' ),
			'post_content' => __( 'You do not have permission to read this question.', 'anspress-question-answer' ),
			'post_status'  => $p->post_status,
			'post_type'    => 'question',
		);

		return (object) $_post;
	}

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