PageRenderTime 37ms CodeModel.GetById 12ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/demo/config.php

https://github.com/deltafactory/landing-pages
PHP | 206 lines | 126 code | 8 blank | 72 comment | 0 complexity | 848a1e9769e88683c2364064f5462585 MD5 | raw file
  1<?php
  2/**
  3* WordPress Landing Page Config File
  4* Template Name:	Demo Template
  5* @package	WordPress Landing Pages
  6* @author 	Inbound Now
  7*
  8* This is a demo template for developers and designers to use as a reference for building landing page templates
  9* for Wordpress Landing Pages Plugin http://wordpress.org/plugins/landing-pages/
 10*
 11*/
 12
 13do_action('lp_global_config'); // The lp_global_config function is for global code added by 3rd party extensions
 14
 15//gets template directory name to use as identifier - do not edit - include in all template files
 16$key = lp_get_parent_directory(dirname(__FILE__));
 17$path = (preg_match("/uploads/", dirname(__FILE__))) ? LANDINGPAGES_UPLOADS_URLPATH . $key .'/' : LANDINGPAGES_URLPATH.'templates/'.$key.'/'; // This defines the path to your template folder. /wp-content/uploads/landing-pages/templates by default
 18
 19/**
 20 * Landing Page Main Setup Params
 21 *
 22	$lp_data[$key]['info'] Parameters
 23
 24	'version' => (string) (required)
 25	- Version Number. default = "1.0"
 26
 27	'label' => (string) (required)
 28	- Custom Nice Name for templates. default = template file folder name
 29
 30	'description' => (string) (required)
 31	- Landing page description.
 32
 33	'category' => (string) (required)
 34	- Category for template. default = "all"
 35
 36	'demo' => (string) (required)
 37	- Link to demo url.
 38*/
 39
 40/* DEMO TEMPLATE INFO SETUP */
 41$lp_data[$key]['info'] =
 42array(
 43	'data_type' => "template", // Template
 44	'version' => "2.0.0", // Version Number
 45	'label' => "Demo", // Nice Name
 46	'category' => 'Demo', // Template Category
 47	'demo' => 'http://demo.inboundnow.com/go/demo-template-preview/', // Demo Link
 48	'description'	=> 'The Demo theme is here to help developers and designs implment thier own designs into the landing page plugin. Study this template to learn about Landing Page Plugin\'s templating system and to assist in building new templates.' // template description
 49);
 50
 51
 52/**
 53 * $lp_data[$key]['settings']
 54 * Landing Page Main Setting Params
 55 * - Creates template metaboxes
 56	$lp_data[$key]['settings'] Parameters
 57
 58	'label' => (string) (required)
 59	- Label for Meta Fields.
 60
 61	'description' => (string) (required)
 62	- Description for meta Field
 63
 64	'id' => (string) (required)
 65	- unprefixed-meta-key. The $key (template file path name) is appended in the loop this array is used in.
 66
 67	'type' => (string) (required)
 68	- Meta box type. default = 'text'
 69
 70	'default' => (string) (optional)
 71	- Default Field Value.	default = ''
 72
 73	'options' => (array) (required for metaboxes with multiple options)
 74	- example: 'options' => array('value' => 'label','value_2'=>'label 2')
 75	- For dropdowns, checkboxes, etc.
 76
 77	'context' => (string) (optional)
 78	- where this box will go, will be used for advanced placement/styling.	default = normal
 79
 80*/
 81
 82/* DEMO TEMPLATE Metabox SETUP */
 83// These values are returned in the template's index.php file with the lp_get_value($post, $key, 'text-box-id')
 84$lp_data[$key]['settings'] =
 85array(
 86	array(
 87		'label' => 'turn-off-editor', /* Turns off main content */
 88		'description' => 'Turn off editor',
 89		'id'	=> 'turn-off-editor',
 90		'type'	=> 'custom-css',
 91		'default'	=> '#postdivrich, #lp_2_form_content {display:none !important;}'
 92		),
 93	array(
 94			'label' => __( 'Main Content' , 'landing-pages' ) ,
 95			'description' => __( 'This is the default content from template.' , 'landing-pages' ),
 96			'id' => "main-content",
 97			'type' => "wysiwyg",
 98			'default' => '<p>This is the first paragraph of your landing page. You want to grab the visitors attention and describe a commonly felt problem that they might be experiencing. Try and relate to your target audience and draw them in.</p>
 99
100<strong>In this guide you will learn:</strong>
101
102[list icon="ok-sign" font_size="16" icon_color="#00a319" text_color="" bottom_margin="10"]
103<ul>
104	<li>This list was created with the list icon shortcode.</li>
105	<li>Click on the power icon in your editor to customize your own</li>
106	<li>Explain why users will want to fill out the form</li>
107	<li>Keep it short and sweet.</li>
108	<li>This list should be easily scannable</li>
109</ul>
110[/list]
111
112<p>This is the final sentence or paragraph reassuring the visitor of the benefits of filling out the form and how their data will be safe.</p>'
113		),
114
115	array(
116			'label' => __( 'Conversion Area' , 'landing-pages' ),
117			'description' => __( 'Place your call to action here.' , 'landing-page' ),
118			'id' => "conversion-area-content",
119			'type' => "wysiwyg",
120			'default' => ''
121		),
122	/* Text field Example */
123	array(
124		'label' => 'Text Field Label', // Label of field
125		'description' => "Text field Description", // field description
126		'id' => 'text-box-id', // metakey. The $key Prefix is appended making the meta value demo-text-box-id
127		'type'	=> 'text', // text metafield type
128		'default'	=> '2013-1-31 13:00', // default content
129		'context'	=> 'normal' // Context in screen for organizing options
130		),
131	/* Textarea Example */
132	array(
133		'label' => 'Textarea Label',
134		'description' => "Textarea description to the user",
135		'id'	=> 'textarea-id', // called in template's index.php file with lp_get_value($post, $key, 'textarea-id');
136		'type'	=> 'textarea',
137		'default'	=> 'Default text in textarea',
138		'context'	=> 'normal'
139		),
140	/* Colorpicker Example */
141	array(
142		'label' => 'ColorPicker Label',
143		'description' => "Colorpicker field description",
144		'id'	=> 'color-picker-id', // called in template's index.php file with lp_get_value($post, $key, 'color-picker-id');
145		'type'	=> 'colorpicker',
146		'default'	=> 'ffffff',
147		'context'	=> 'normal'
148		),
149	/* Radio Button Example */
150	array(
151		'label' => 'Radio Label',
152		'description' => "Radio field description",
153		'id'	=> 'radio-id-here', // called in template's index.php file with lp_get_value($post, $key, 'radio-id-here');
154		'type'	=> 'radio',
155		'default'	=> '1',
156		'options' => array('1' => 'on','0'=>'off'),
157		'context'	=> 'normal'
158		),
159	/* Checkbox Example */
160	array(
161		'label' => 'Checkbox Label',
162		'description' => "Example Checkbox Description",
163		'id'	=> 'checkbox-id-here', // called in template's index.php file with lp_get_value($post, $key, 'checkbox-id-here');
164		'type'	=> 'checkbox',
165		'default'	=> 'on',
166		'options' => array('option_on' => 'on','option_off'=>'off'),
167		'context'	=> 'normal'
168		),
169	/* Dropdown Example */
170	array(
171		'label' => 'Dropdown Label',
172		'description' => "Dropdown option description",
173		'id'	=> 'dropdown-id-here', // called in template's index.php file with lp_get_value($post, $key, 'dropdown-id-here');
174		'type'	=> 'dropdown',
175		'default'	=> 'default',
176		'options' => array('right'=>'Float right','left'=>'Float left', 'default'=>'Default option'),
177		'context'	=> 'normal'
178		),
179	/* Date Picker Example */
180	array(
181		'label' => 'Date Picker Label',
182		'description' => "Date Picker Description",
183		'id'	=> 'date-picker', // called in template's index.php file with lp_get_value($post, $key, 'date-picker');
184		'type'	=> 'datepicker',
185		'default'	=> '2013-12-27',
186		'context'	=> 'normal'
187		),
188	/* WYSIWYG Example */
189	array(
190		'label' => 'Main Content Box 2',
191		'description' => "wysiwyg description",
192		'id'	=> 'wysiwyg-id', // called in template's index.php file with lp_get_value($post, $key, 'wysiwyg-id');
193		'type'	=> 'wysiwyg',
194		'default'	=> 'Default WYSIWYG content',
195		'context'	=> 'normal'
196		),
197	/* Media Uploaded Example */
198	array(
199		'label' => 'File/Image Upload Label',
200		'description' => "File/Image Upload Description",
201		'id'	=> 'media-id', // called in template's index.php file with lp_get_value($post, $key, 'media-id');
202		'type'	=> 'media',
203		'default'	=> '/wp-content/plugins/landing-pages/templates/path-to-image-place-holder.png',
204		'context'	=> 'normal'
205		)
206	);