components/Templates/includes/auto-template/Pods_Templates_Auto_Template_Front_End.php
public function current_post_type() {

		// start by getting current post or stdClass object
		global $wp_query;
		$obj = $wp_query->get_queried_object();

		// see if we are on a post type and if so, set $current_post_type to post type
		if ( isset( $obj->post_type ) ) {
			$current_post_type = $obj->post_type;

		} elseif ( isset( $obj->taxonomy ) ) {
			$current_post_type = $obj->taxonomy;
		} elseif ( isset( $obj->name ) ) {
			$current_post_type = $obj->name;
		} elseif ( is_home() ) {
			$current_post_type = 'post';
		} else {
			$current_post_type = false;
		}

		return $current_post_type;
	}
public function current_post_type() {

		// start by getting current post or stdClass object
		global $wp_query;
		$obj = $wp_query->get_queried_object();

		// see if we are on a post type and if so, set $current_post_type to post type
		if ( isset( $obj->post_type ) ) {
			$current_post_type = $obj->post_type;

		} elseif ( isset( $obj->taxonomy ) ) {
			$current_post_type = $obj->taxonomy;
		} elseif ( isset( $obj->name ) ) {
			$current_post_type = $obj->name;
		} elseif ( is_home() ) {
			$current_post_type = 'post';
		} else {
			$current_post_type = false;
		}

		return $current_post_type;
	}
public function current_post_type ( ) { // start by getting current post or stdClass object global $ wp_query ; $ obj = $ wp_query -> get_queried_object ( ) ; // see if we are on a post type and if so, set $current_post_type to post type if ( isset ( $ obj -> post_type ) ) { $ current_post_type = $ obj -> post_type ; } elseif ( isset ( $ obj -> taxonomy ) ) { $ current_post_type = $ obj -> taxonomy ; } elseif ( isset ( $ obj -> name ) ) { $ current_post_type = $ obj -> name ; } elseif ( is_home ( ) ) { $ current_post_type = 'post' ; } else { $ current_post_type = false ; } return $ current_post_type ; }
Fetches the current post type.

@return string current post type.

@since 2.4.5
Fetches the current post type .