components/Templates/includes/auto-template/Pods_Templates_Auto_Template_Front_End.php
public function front( $content ) {

		// get the current post type
		$current_post_type = $this->current_post_type();

		// 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 ] ) ) {
			// get array for the current post type
			$this_pod = $possible_pods[ $current_post_type ];

			$filter = $this->get_pod_filter( $current_post_type, $possible_pods );

			if ( current_filter() !== $filter ) {
				return $content;
			}

			if ( ! in_the_loop() && ! pods_v( 'run_outside_loop', $this_pod, false ) ) {
				// If outside of the loop, exit quickly
				return $content;
			}

			// build Pods object for current item
			global $post;
			$pods = pods( $current_post_type, $post->ID );

			if ( $this_pod['single'] && is_singular( $current_post_type ) ) {
				// load the template
				$content = $this->load_template( $this_pod['single'], $content, $pods, $this_pod['single_append'] );
			} //end if
			// check if we are on an archive of the post type
			elseif ( $this_pod['archive'] && is_post_type_archive( $current_post_type ) ) {
				// load the template
				$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );

			} elseif ( is_home() && $this_pod['archive'] && $current_post_type === 'post' ) {
				// if pfat_archive was set and we're in the blog index, try to append template
				// append the template
				$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );

			} elseif ( is_tax( $current_post_type ) ) {
				// if is taxonomy archive of the selected taxonomy
				// if pfat_single was set try to use that template
				if ( $this_pod['archive'] ) {
					// append the template
					$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );
				}
			}
		}//end if

		return $content;

	}
public function front( $content ) {

		// get the current post type
		$current_post_type = $this->current_post_type();

		// 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 ] ) ) {
			// get array for the current post type
			$this_pod = $possible_pods[ $current_post_type ];

			$filter = $this->get_pod_filter( $current_post_type, $possible_pods );

			if ( current_filter() !== $filter ) {
				return $content;
			}

			if ( ! in_the_loop() && ! pods_v( 'run_outside_loop', $this_pod, false ) ) {
				// If outside of the loop, exit quickly
				return $content;
			}

			// build Pods object for current item
			global $post;
			$pods = pods( $current_post_type, $post->ID );

			if ( $this_pod['single'] && is_singular( $current_post_type ) ) {
				// load the template
				$content = $this->load_template( $this_pod['single'], $content, $pods, $this_pod['single_append'] );
			} //end if
			// check if we are on an archive of the post type
			elseif ( $this_pod['archive'] && is_post_type_archive( $current_post_type ) ) {
				// load the template
				$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );

			} elseif ( is_home() && $this_pod['archive'] && $current_post_type === 'post' ) {
				// if pfat_archive was set and we're in the blog index, try to append template
				// append the template
				$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );

			} elseif ( is_tax( $current_post_type ) ) {
				// if is taxonomy archive of the selected taxonomy
				// if pfat_single was set try to use that template
				if ( $this_pod['archive'] ) {
					// append the template
					$content = $this->load_template( $this_pod['archive'], $content, $pods, $this_pod['archive_append'] );
				}
			}
		}//end if

		return $content;

	}
public function front ( $ content ) { // get the current post type $ current_post_type = $ this -> current_post_type ( ) ; // 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 ] ) ) { // get array for the current post type $ this_pod = $ possible_pods [ $ current_post_type ] ; $ filter = $ this -> get_pod_filter ( $ current_post_type , $ possible_pods ) ; if ( current_filter ( ) !== $ filter ) { return $ content ; } if ( ! in_the_loop ( ) && ! pods_v ( 'run_outside_loop' , $ this_pod , false ) ) { // If outside of the loop, exit quickly return $ content ; } // build Pods object for current item global $ post ; $ pods = pods ( $ current_post_type , $ post -> ID ) ; if ( $ this_pod [ 'single' ] && is_singular ( $ current_post_type ) ) { // load the template $ content = $ this -> load_template ( $ this_pod [ 'single' ] , $ content , $ pods , $ this_pod [ 'single_append' ] ) ; } //end if // check if we are on an archive of the post type elseif ( $ this_pod [ 'archive' ] && is_post_type_archive ( $ current_post_type ) ) { // load the template $ content = $ this -> load_template ( $ this_pod [ 'archive' ] , $ content , $ pods , $ this_pod [ 'archive_append' ] ) ; } elseif ( is_home ( ) && $ this_pod [ 'archive' ] && $ current_post_type === 'post' ) { // if pfat_archive was set and we're in the blog index, try to append template // append the template $ content = $ this -> load_template ( $ this_pod [ 'archive' ] , $ content , $ pods , $ this_pod [ 'archive_append' ] ) ; } elseif ( is_tax ( $ current_post_type ) ) { // if is taxonomy archive of the selected taxonomy // if pfat_single was set try to use that template if ( $ this_pod [ 'archive' ] ) { // append the template $ content = $ this -> load_template ( $ this_pod [ 'archive' ] , $ content , $ pods , $ this_pod [ 'archive_append' ] ) ; } } } //end if return $ content ; }
Outputs templates after the content as needed.

@param string $content Post content

@uses  'the_content' filter

@return string Post content with the template appended if appropriate.

@since 2.4.5
Outputs templates after the content as needed .