components/Templates/includes/auto-template/Pods_Templates_Auto_Template_Front_End.php
public function get_pod_filter( $current_post_type = '', $possible_pods = array() ) {
		$filter = 'the_content';

		if ( ! $current_post_type ) {
			// get the current post type
			$current_post_type = $this->current_post_type();
		}

		if ( ! $possible_pods ) {
			//now use other methods in class to build array to search in/ use
			$possible_pods = $this->auto_pods();
		}

		//check if $current_post_type is the key of the array of possible pods
		if ( isset( $possible_pods[ $current_post_type ] ) ) {
			$this_pod = $possible_pods[ $current_post_type ];

			if ( is_singular( $current_post_type ) ) {
				$filter = pods_v( 'single_filter', $this_pod, $filter, true );
			} elseif ( is_post_type_archive( $current_post_type ) ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			} elseif ( is_home() && $current_post_type === 'post'  ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			} elseif ( is_tax( $current_post_type )  ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			}
		}

		return $filter;
	}
public function get_pod_filter( $current_post_type = '', $possible_pods = array() ) {
		$filter = 'the_content';

		if ( ! $current_post_type ) {
			// get the current post type
			$current_post_type = $this->current_post_type();
		}

		if ( ! $possible_pods ) {
			//now use other methods in class to build array to search in/ use
			$possible_pods = $this->auto_pods();
		}

		//check if $current_post_type is the key of the array of possible pods
		if ( isset( $possible_pods[ $current_post_type ] ) ) {
			$this_pod = $possible_pods[ $current_post_type ];

			if ( is_singular( $current_post_type ) ) {
				$filter = pods_v( 'single_filter', $this_pod, $filter, true );
			} elseif ( is_post_type_archive( $current_post_type ) ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			} elseif ( is_home() && $current_post_type === 'post'  ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			} elseif ( is_tax( $current_post_type )  ) {
				$filter = pods_v( 'archive_filter', $this_pod, $filter, true );
			}
		}

		return $filter;
	}
public function get_pod_filter ( $ current_post_type = '' , $ possible_pods = array ( ) ) { $ filter = 'the_content' ; if ( ! $ current_post_type ) { // get the current post type $ current_post_type = $ this -> current_post_type ( ) ; } if ( ! $ possible_pods ) { //now use other methods in class to build array to search in/ use $ possible_pods = $ this -> auto_pods ( ) ; } //check if $current_post_type is the key of the array of possible pods if ( isset ( $ possible_pods [ $ current_post_type ] ) ) { $ this_pod = $ possible_pods [ $ current_post_type ] ; if ( is_singular ( $ current_post_type ) ) { $ filter = pods_v ( 'single_filter' , $ this_pod , $ filter , true ) ; } elseif ( is_post_type_archive ( $ current_post_type ) ) { $ filter = pods_v ( 'archive_filter' , $ this_pod , $ filter , true ) ; } elseif ( is_home ( ) && $ current_post_type === 'post' ) { $ filter = pods_v ( 'archive_filter' , $ this_pod , $ filter , true ) ; } elseif ( is_tax ( $ current_post_type ) ) { $ filter = pods_v ( 'archive_filter' , $ this_pod , $ filter , true ) ; } } return $ filter ; }
Get the filter used for a Pod.
@since  1.7.2
@param  string  $current_post_type
@param  array   $possible_pods
@return string
Get the filter used for a Pod .