GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gv-template-view-legacy.php
Go to the documentation of this file.
1 <?php
2 namespace GV;
3 
4 /** If this file is called directly, abort. */
5 if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6  die();
7 }
8 
9 /**
10  * A legacy fallback View template.
11  *
12  * Can be used to render old templates as needed.
13  */
15  /**
16  * Render an old template.
17  */
18  public function render() {
19  if ( ! class_exists( 'GravityView_Template' ) ) {
20  return;
21  }
22 
23  $context = array(
24  'view' => $this->view,
25  'fields' => $this->view->fields->by_visible( $this->view ),
26  'entries' => $this->entries,
27  'request' => $this->request,
28  );
29 
30  global $post;
31 
32  if ( $post ) {
33  $context['post'] = $post;
34  }
35 
37 
38  $sections = array( 'header', 'body', 'footer' );
39 
40  $sections = apply_filters( 'gravityview_render_view_sections', $sections, $this->view->settings->get( 'template' ) );
41 
43 
44  $slug = apply_filters( 'gravityview_template_slug_' . $this->view->settings->get( 'template' ), 'table', 'directory' );
45 
46  foreach ( $sections as $section ) {
47  $template->render( $slug, $section, false );
48  }
49 
51  }
52 }
static getInstance( $passed_post=NULL)
if(! isset( $gravityview)||empty( $gravityview->template)) $template
The entry loop for the list output.
If this file is called directly, abort.
render()
Render an old template.
$entries
global $post
Definition: delete-entry.php:7
static pop()
Restores last saved state and context.
Definition: _mocks.php:410
static push( $configuration)
Set the state depending on the provided configuration.
Definition: _mocks.php:400
If this file is called directly, abort.