GravityView  1.19.4
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 (default)', 'gravityview' ),
17  'description' => __( 'Display items in a listing view.', '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', 'gravityview' ),
28  'value' => false,
29  'context' => 'directory'
30  ),
31  );
32 
33  $areas = array(
34  array(
35  '1-1' => array(
36  array(
37  'areaid' => 'list-title',
38  'title' => __( 'Listing Title', 'gravityview' ),
39  'subtitle' => ''
40  ),
41  array(
42  'areaid' => 'list-subtitle',
43  'title' => __( 'Subheading', 'gravityview' ),
44  'subtitle' => __( 'Data placed here will be bold.', 'gravityview' ),
45  ),
46  ),
47  '1-3' => array(
48  array(
49  'areaid' => 'list-image',
50  'title' => __( 'Image', 'gravityview' ),
51  'subtitle' => __( 'Leave empty to remove.', 'gravityview' ),
52  )
53  ),
54  '2-3' => array(
55  array(
56  'areaid' => 'list-description',
57  'title' => __( 'Other Fields', 'gravityview' ),
58  'subtitle' => __( 'Below the subheading, a good place for description and other data.', 'gravityview' ),
59  )
60  )
61  ),
62  array(
63  '1-2' => array(
64  array(
65  'areaid' => 'list-footer-left',
66  'title' => __( 'Footer Left', 'gravityview' ),
67  'subtitle' => ''
68  )
69  ),
70  '2-2' => array(
71  array(
72  'areaid' => 'list-footer-right',
73  'title' => __( 'Footer Right', 'gravityview' ),
74  'subtitle' => ''
75  )
76  )
77  )
78  );
79 
80  parent::__construct( $id, $settings, $field_options, $areas );
81 
82  }
83 }
84 
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory
Definition: gravityview.php:35
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...
GravityView_Default_Template_List class.
Class used to register a new template to be shown in GravityView presets.
const GRAVITYVIEW_FILE(!defined( 'ABSPATH'))
Plugin Name: GravityView Plugin URI: https://gravityview.co Description: The best, easiest way to display Gravity Forms entries on your website.
Definition: gravityview.php:26
__construct($id= 'default_list', $settings=array(), $field_options=array(), $areas=array())