frontier_template_once_blocks

Processes once blocks.

Description

(string) frontier_template_once_blocks( (array) $atts, (string) $code ); 

Returns (string)

template code

Parameters (2)

0. $atts (array)
Attributes from template
1. $code (string)
Encoded template to be decoded

Usage

  1. if ( !function_exists( 'frontier_template_once_blocks' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/components/Templates/includes/functions-view_template.php'; 
  3.  
  4. // attributes from template 
  5. $atts = array(); 
  6.  
  7. // encoded template to be decoded 
  8. $code = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = frontier_template_once_blocks($atts, $code); 
  12.  

Defined (1)

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

/components/Templates/includes/functions-view_template.php  
  1. function frontier_template_once_blocks( $atts, $code ) { 
  2.  
  3. global $frontier_once_hashes; 
  4.  
  5. if ( !isset( $frontier_once_hashes ) ) { 
  6. $frontier_once_hashes = array(); 
  7.  
  8. $blockhash = md5( $code . $atts[ 'id' ] ); 
  9. if ( in_array( $blockhash, $frontier_once_hashes ) ) { 
  10. return ''; 
  11. $frontier_once_hashes[ ] = $blockhash; 
  12.  
  13. return pods_do_shortcode( frontier_decode_template( $code, $atts ), array( 'each', 'pod_sub_template', 'once', 'pod_once_template', 'before', 'pod_before_template', 'after', 'pod_after_template', 'if', 'pod_if_field' ) );