frontier_end_template

The Pods - Custom Content Types and Fields frontier end template function.

Description

frontier_end_template( $code, $base, $template, $pod ); 

Parameters (4)

0. $code
The code.
1. $base
The base.
2. $template
The template.
3. $pod
The pod.

Usage

  1. if ( !function_exists( 'frontier_end_template' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/components/Templates/includes/functions-view_template.php'; 
  3.  
  4. // The code. 
  5. $code = null; 
  6.  
  7. // The base. 
  8. $base = null; 
  9.  
  10. // The template. 
  11. $template = null; 
  12.  
  13. // The pod. 
  14. $pod = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = frontier_end_template($code, $base, $template, $pod); 
  18.  

Defined (1)

The function is defined in the following location(s).

/components/Templates/includes/functions-view_template.php  
  1. function frontier_end_template( $code, $base, $template, $pod ) { 
  2.  
  3. global $template_post_blocks; 
  4.  
  5. if ( !empty( $template_post_blocks[ 'before' ][ $pod->pod ] ) ) { 
  6. $code = $template_post_blocks[ 'before' ][ $pod->pod ] . $code; 
  7.  
  8. unset( $template_post_blocks[ 'before' ][ $pod->pod ] ); 
  9.  
  10. if ( !empty( $template_post_blocks[ 'after' ][ $pod->pod ] ) ) { 
  11. $code .= $template_post_blocks[ 'after' ][ $pod->pod ]; 
  12.  
  13. unset( $template_post_blocks[ 'after' ][ $pod->pod ] ); 
  14.  
  15. return pods_do_shortcode( $code, array( 'each', 'pod_sub_template', 'once', 'pod_once_template', 'before', 'pod_before_template', 'after', 'pod_after_template', 'if', 'pod_if_field' ) );