ap_is_cpt( WP_Post $_post )

Description #

Check if post object is AnsPress CPT i.e. question or answer.

Parameters #

  • $_post
    WP_Post (Required) WordPress post object.

Changelog #


Source #

File: includes/functions.php

function ap_is_cpt( $_post ) {
	return ( in_array( $_post->post_type, array( 'answer', 'question' ), true ) );

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