GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-default-template-list.php
Go to the documentation of this file.
1 <?php
2 
3 /**
4  * GravityView_Default_Template_List class.
5  * Defines List (default) template
6  */
8 
9  function __construct( $id = 'default_list', $settings = array(), $field_options = array(), $areas = array() ) {
10 
11  $rtl = is_rtl() ? '-rtl' : '';
12 
13  $list_settings = array(
14  'slug' => 'list',
15  'type' => 'custom',
16  'label' => __( 'List', 'gk-gravityview' ),
17  'description' => __( 'Display items in a listing view.', 'gk-gravityview' ),
18  'logo' => plugins_url( 'includes/presets/default-list/logo-default-list.png', GRAVITYVIEW_FILE ),
19  'css_source' => gravityview_css_url( 'list-view' . $rtl . '.css', GRAVITYVIEW_DIR . 'templates/css/' ),
20  );
21 
22  $settings = wp_parse_args( $settings, $list_settings );
23 
24  $field_options = array(
25  'show_as_link' => array(
26  'type' => 'checkbox',
27  'label' => __( 'Link to single entry', 'gk-gravityview' ),
28  'value' => false,
29  'context' => 'directory',
30  'priority' => 1190,
31  'group' => 'display',
32  ),
33  );
34 
35  $areas = array(
36  array(
37  '1-1' => array(
38  array(
39  'areaid' => 'list-title',
40  'title' => __( 'Listing Title', 'gk-gravityview' ),
41  'subtitle' => ''
42  ),
43  array(
44  'areaid' => 'list-subtitle',
45  'title' => __( 'Subheading', 'gk-gravityview' ),
46  'subtitle' => __( 'Data placed here will be bold.', 'gk-gravityview' ),
47  ),
48  ),
49  '1-3' => array(
50  array(
51  'areaid' => 'list-image',
52  'title' => __( 'Image', 'gk-gravityview' ),
53  'subtitle' => __( 'Leave empty to remove.', 'gk-gravityview' ),
54  )
55  ),
56  '2-3' => array(
57  array(
58  'areaid' => 'list-description',
59  'title' => __( 'Other Fields', 'gk-gravityview' ),
60  'subtitle' => __( 'Below the subheading, a good place for description and other data.', 'gk-gravityview' ),
61  )
62  )
63  ),
64  array(
65  '1-2' => array(
66  array(
67  'areaid' => 'list-footer-left',
68  'title' => __( 'Footer Left', 'gk-gravityview' ),
69  'subtitle' => ''
70  )
71  ),
72  '2-2' => array(
73  array(
74  'areaid' => 'list-footer-right',
75  'title' => __( 'Footer Right', 'gk-gravityview' ),
76  'subtitle' => ''
77  )
78  )
79  )
80  );
81 
82  parent::__construct( $id, $settings, $field_options, $areas );
83 
84  }
85 }
86 
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash ...
Definition: gravityview.php:49
GravityView_Default_Template_List class.
Class used to register a new template to be shown in GravityView presets.
__construct( $id='default_list', $settings=array(), $field_options=array(), $areas=array())
gravityview_css_url( $css_file='', $dir_path='')
Functions that don&#39;t require GravityView or Gravity Forms API access but are used in the plugin to ex...
const GRAVITYVIEW_FILE
Full path to the GravityView file "GRAVITYVIEW_FILE" "./gravityview.php".
Definition: gravityview.php:40