GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
views/table.php
Go to the documentation of this file.
1 <?php
2 /**
3  * The table layout template
4  *
5  * @global \GV\Template_Context $gravityview
6  */
7 
8 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
9  gravityview()->log->error( '{file} template loaded without context', array( 'file' => __FILE__ ) );
10 
11  return;
12 }
13 
14 ob_start();
15 
16 $gravityview->template->get_template_part( 'table/table', 'header' );
17 $gravityview->template->get_template_part( 'table/table', 'body' );
18 $gravityview->template->get_template_part( 'table/table', 'footer' );
19 
20 $content = ob_get_clean();
21 
22 /**
23  * @filter `gravityview/view/wrapper_container` Modify the wrapper container.
24  * @since 2.15
25  *
26  * @param string $wrapper_container Wrapper container HTML markup
27  * @param string $anchor_id (optional) Unique anchor ID to identify the view.
28  * @param \GV\View $view The View.
29  */
30 $wrapper_container = apply_filters(
31  'gravityview/view/wrapper_container',
32  '<div id="' . esc_attr( $gravityview->view->get_anchor_id() ) . '">{content}</div>',
33  $gravityview->view->get_anchor_id(),
34  $gravityview->view
35 );
36 
37 echo $wrapper_container ? str_replace( '{content}', $content, $wrapper_container ) : $content;
$wrapper_container
Definition: views/table.php:30
$content
Definition: views/table.php:20
gravityview()
The main GravityView wrapper function.