/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. do_action('lp_global_config'); // The lp_global_config function is for global code added by 3rd party extensions
  13. //gets template directory name to use as identifier - do not edit - include in all template files
  14. $key = lp_get_parent_directory(dirname(__FILE__));
  15. $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
  16. /**
  17. * Landing Page Main Setup Params
  18. *
  19. $lp_data[$key]['info'] Parameters
  20. 'version' => (string) (required)
  21. - Version Number. default = "1.0"
  22. 'label' => (string) (required)
  23. - Custom Nice Name for templates. default = template file folder name
  24. 'description' => (string) (required)
  25. - Landing page description.
  26. 'category' => (string) (required)
  27. - Category for template. default = "all"
  28. 'demo' => (string) (required)
  29. - Link to demo url.
  30. */
  31. /* DEMO TEMPLATE INFO SETUP */
  32. $lp_data[$key]['info'] =
  33. array(
  34. 'data_type' => "template", // Template
  35. 'version' => "2.0.0", // Version Number
  36. 'label' => "Demo", // Nice Name
  37. 'category' => 'Demo', // Template Category
  38. 'demo' => 'http://demo.inboundnow.com/go/demo-template-preview/', // Demo Link
  39. '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
  40. );
  41. /**
  42. * $lp_data[$key]['settings']
  43. * Landing Page Main Setting Params
  44. * - Creates template metaboxes
  45. $lp_data[$key]['settings'] Parameters
  46. 'label' => (string) (required)
  47. - Label for Meta Fields.
  48. 'description' => (string) (required)
  49. - Description for meta Field
  50. 'id' => (string) (required)
  51. - unprefixed-meta-key. The $key (template file path name) is appended in the loop this array is used in.
  52. 'type' => (string) (required)
  53. - Meta box type. default = 'text'
  54. 'default' => (string) (optional)
  55. - Default Field Value. default = ''
  56. 'options' => (array) (required for metaboxes with multiple options)
  57. - example: 'options' => array('value' => 'label','value_2'=>'label 2')
  58. - For dropdowns, checkboxes, etc.
  59. 'context' => (string) (optional)
  60. - where this box will go, will be used for advanced placement/styling. default = normal
  61. */
  62. /* DEMO TEMPLATE Metabox SETUP */
  63. // These values are returned in the template's index.php file with the lp_get_value($post, $key, 'text-box-id')
  64. $lp_data[$key]['settings'] =
  65. array(
  66. array(
  67. 'label' => 'turn-off-editor', /* Turns off main content */
  68. 'description' => 'Turn off editor',
  69. 'id' => 'turn-off-editor',
  70. 'type' => 'custom-css',
  71. 'default' => '#postdivrich, #lp_2_form_content {display:none !important;}'
  72. ),
  73. array(
  74. 'label' => __( 'Main Content' , 'landing-pages' ) ,
  75. 'description' => __( 'This is the default content from template.' , 'landing-pages' ),
  76. 'id' => "main-content",
  77. 'type' => "wysiwyg",
  78. '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>
  79. <strong>In this guide you will learn:</strong>
  80. [list icon="ok-sign" font_size="16" icon_color="#00a319" text_color="" bottom_margin="10"]
  81. <ul>
  82. <li>This list was created with the list icon shortcode.</li>
  83. <li>Click on the power icon in your editor to customize your own</li>
  84. <li>Explain why users will want to fill out the form</li>
  85. <li>Keep it short and sweet.</li>
  86. <li>This list should be easily scannable</li>
  87. </ul>
  88. [/list]
  89. <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>'
  90. ),
  91. array(
  92. 'label' => __( 'Conversion Area' , 'landing-pages' ),
  93. 'description' => __( 'Place your call to action here.' , 'landing-page' ),
  94. 'id' => "conversion-area-content",
  95. 'type' => "wysiwyg",
  96. 'default' => ''
  97. ),
  98. /* Text field Example */
  99. array(
  100. 'label' => 'Text Field Label', // Label of field
  101. 'description' => "Text field Description", // field description
  102. 'id' => 'text-box-id', // metakey. The $key Prefix is appended making the meta value demo-text-box-id
  103. 'type' => 'text', // text metafield type
  104. 'default' => '2013-1-31 13:00', // default content
  105. 'context' => 'normal' // Context in screen for organizing options
  106. ),
  107. /* Textarea Example */
  108. array(
  109. 'label' => 'Textarea Label',
  110. 'description' => "Textarea description to the user",
  111. 'id' => 'textarea-id', // called in template's index.php file with lp_get_value($post, $key, 'textarea-id');
  112. 'type' => 'textarea',
  113. 'default' => 'Default text in textarea',
  114. 'context' => 'normal'
  115. ),
  116. /* Colorpicker Example */
  117. array(
  118. 'label' => 'ColorPicker Label',
  119. 'description' => "Colorpicker field description",
  120. 'id' => 'color-picker-id', // called in template's index.php file with lp_get_value($post, $key, 'color-picker-id');
  121. 'type' => 'colorpicker',
  122. 'default' => 'ffffff',
  123. 'context' => 'normal'
  124. ),
  125. /* Radio Button Example */
  126. array(
  127. 'label' => 'Radio Label',
  128. 'description' => "Radio field description",
  129. 'id' => 'radio-id-here', // called in template's index.php file with lp_get_value($post, $key, 'radio-id-here');
  130. 'type' => 'radio',
  131. 'default' => '1',
  132. 'options' => array('1' => 'on','0'=>'off'),
  133. 'context' => 'normal'
  134. ),
  135. /* Checkbox Example */
  136. array(
  137. 'label' => 'Checkbox Label',
  138. 'description' => "Example Checkbox Description",
  139. 'id' => 'checkbox-id-here', // called in template's index.php file with lp_get_value($post, $key, 'checkbox-id-here');
  140. 'type' => 'checkbox',
  141. 'default' => 'on',
  142. 'options' => array('option_on' => 'on','option_off'=>'off'),
  143. 'context' => 'normal'
  144. ),
  145. /* Dropdown Example */
  146. array(
  147. 'label' => 'Dropdown Label',
  148. 'description' => "Dropdown option description",
  149. 'id' => 'dropdown-id-here', // called in template's index.php file with lp_get_value($post, $key, 'dropdown-id-here');
  150. 'type' => 'dropdown',
  151. 'default' => 'default',
  152. 'options' => array('right'=>'Float right','left'=>'Float left', 'default'=>'Default option'),
  153. 'context' => 'normal'
  154. ),
  155. /* Date Picker Example */
  156. array(
  157. 'label' => 'Date Picker Label',
  158. 'description' => "Date Picker Description",
  159. 'id' => 'date-picker', // called in template's index.php file with lp_get_value($post, $key, 'date-picker');
  160. 'type' => 'datepicker',
  161. 'default' => '2013-12-27',
  162. 'context' => 'normal'
  163. ),
  164. /* WYSIWYG Example */
  165. array(
  166. 'label' => 'Main Content Box 2',
  167. 'description' => "wysiwyg description",
  168. 'id' => 'wysiwyg-id', // called in template's index.php file with lp_get_value($post, $key, 'wysiwyg-id');
  169. 'type' => 'wysiwyg',
  170. 'default' => 'Default WYSIWYG content',
  171. 'context' => 'normal'
  172. ),
  173. /* Media Uploaded Example */
  174. array(
  175. 'label' => 'File/Image Upload Label',
  176. 'description' => "File/Image Upload Description",
  177. 'id' => 'media-id', // called in template's index.php file with lp_get_value($post, $key, 'media-id');
  178. 'type' => 'media',
  179. 'default' => '/wp-content/plugins/landing-pages/templates/path-to-image-place-holder.png',
  180. 'context' => 'normal'
  181. )
  182. );