RtThemesSupport

home_custom_fields.php rt17

Jan 29th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. <?php
  2. #-----------------------------------------
  3. # RT-Theme home_custom_fields.php
  4. # version: 1.0
  5. #-----------------------------------------
  6.  
  7. #
  8. # Home Page Custom Fields
  9. #
  10.  
  11. /**
  12. * @var array $customFields Defines the custom fields available
  13. */
  14.  
  15. asort($this->google_fonts);//sort google fonts by name
  16.  
  17. $customFields = array(
  18.  
  19. array(
  20. "title" => __("HEADING & TEXT",'rt_theme_admin'),
  21. "type" => "heading"
  22. ),
  23.  
  24. array(
  25. "title" => __("Heading & Text Position",'rt_theme_admin'),
  26. "name" => "heading_and_text_position",
  27. "options" => array(
  28. "left" => "Left aligned",
  29. "center" => "Centered",
  30. ),
  31.  
  32. "hr" => true,
  33. "type" => "select"
  34. ),
  35.  
  36. array(
  37. "title" => __("Hide the Heading",'rt_theme_admin'),
  38. "name" => "hide_the_heading",
  39. "default" => "",
  40. "type" => "checkbox"
  41. ),
  42.  
  43. array(
  44. "title" => __("LINK",'rt_theme_admin'),
  45. "type" => "heading"
  46. ),
  47.  
  48.  
  49. array(
  50. "name" => "custom_link",
  51. "title" => __("Custom Link",'rt_theme_admin'),
  52. "type" => "text",
  53. "hr" => true,
  54. ),
  55.  
  56. array(
  57. "name" => "custom_link_text",
  58. "title" => __("Custom Link Text",'rt_theme_admin'),
  59. "description" => "ex: read more",
  60. "type" => "text"
  61. ),
  62.  
  63. array(
  64. "name" => "custom_link_target",
  65. "title" => __("Custom Link Target",'rt_theme_admin'),
  66. "options" => array(
  67. "_self" => "_self",
  68. "_blank" => "_blank",
  69. "_parent" => "_parent",
  70. "_top" => "_top",
  71. ),
  72. "hr" => true,
  73. "type" => "select"
  74.  
  75. ),
  76.  
  77.  
  78. array(
  79. "title" => __("FEATURED IMAGE",'rt_theme_admin'),
  80. "type" => "heading"
  81. ),
  82.  
  83.  
  84. array(
  85. "title" => __("Featured Image Position",'rt_theme_admin'),
  86. "name" => "featured_image_position",
  87. "options" => array(
  88. "1-optgroup-start" => "Before Title",
  89. "before-center" => "Centered",
  90. "before-left" => "Left aligned",
  91. "before-right" => "Right aligned",
  92. "1-optgroup-end" => "#",
  93.  
  94. "2-optgroup-start" => "After Title",
  95. "after-center" => "Centered",
  96. "after-left" => "Left aligned",
  97. "after-right" => "Right aligned",
  98. "2-optgroup-end" => "#",
  99.  
  100. ),
  101. "select" => __("Select",'rt_theme_admin'),
  102. "hr" => true,
  103. "type" => "select"
  104. ),
  105.  
  106.  
  107. array(
  108. "title" => __("Crop Featured Image",'rt_theme_admin'),
  109. "name" => "homepage_image_crop",
  110. "default" => "",
  111. "hr" => true,
  112. "type" => "checkbox"
  113. ),
  114.  
  115. array(
  116. "title" => __("Maximum Image Height",'rt_theme_admin'),
  117. "name" => "homepage_image_height",
  118. "description" => __('You can use this option if the "Crop Featured Image" feature is on','rt_theme_admin'),
  119. "min" =>"60",
  120. "max" =>"400",
  121. "default" =>"120",
  122. "type" => "rangeinput"
  123. ),
  124.  
  125.  
  126. array(
  127. "title" => __("CUSTOM TYPOGRAPHY OPTIONS",'rt_theme_admin'),
  128. "type" => "heading"),
  129.  
  130.  
  131. array(
  132. "title" => __("Select Heading Font",'rt_theme_admin'),
  133. "description" => __("You can select another google font for the heading just for this content. Make sure Google Fonts is ON inside the Typograpyh Options",'rt_theme_admin'),
  134. "name" => "_google_fonts_heading",
  135. "options" => $this->google_fonts,
  136. "font-demo" => "true",
  137. "font-system" => "google",
  138. "class" => "fontlist",
  139. "select"=>__("Select Font",'rt_theme_admin'),
  140. "hr" => "true",
  141. "type" => "select"),
  142.  
  143. array(
  144. "title" => __("Select Text Font",'rt_theme_admin'),
  145. "description" => __("You can select another google font for the text just for this content. Make sure Google Fonts is ON inside the Typograpyh Options",'rt_theme_admin'),
  146. "name" => "_google_fonts_body",
  147. "options" => $this->google_fonts,
  148. "font-demo" => "true",
  149. "font-system" => "google",
  150. "class" => "fontlist",
  151. "select"=>__("Select Font",'rt_theme_admin'),
  152. "type" => "select"),
  153.  
  154.  
  155. array(
  156. "title" => __("CUSTOM FONT SIZES",'rt_theme_admin'),
  157. "type" => "heading"),
  158.  
  159. array(
  160. "title" => __("Heading Font Size (px)",'rt_theme_admin'),
  161. "name" => "_heading_font_size",
  162. "description" => "When you use the default values, it doesn't overwrites the selected heading values via the Typography Options.",
  163. "min"=>"10",
  164. "max"=>"100",
  165. "default"=>"18",
  166. "dont_save"=>"true",
  167. "show_default"=>"true",
  168. "hr" => true,
  169. "type" => "rangeinput"),
  170.  
  171. array(
  172. "title" => __("Text Font Size (px)",'rt_theme_admin'),
  173. "name" => "_text_font_size",
  174. "min"=>"10",
  175. "max"=>"36",
  176. "default"=>"13",
  177. "dont_save"=>"true",
  178. "show_default"=>"true",
  179. "type" => "rangeinput"),
  180.  
  181.  
  182. array(
  183. "title" => __("CUSTOM COLOR OPTIONS",'rt_theme_admin'),
  184. "type" => "heading"),
  185.  
  186. array(
  187. "title" => __("Heading Font Color",'rt_theme_admin'),
  188. "name" => "_heading_font_color",
  189. "dont_save" => "true",
  190. "hr" => "true",
  191. "type" => "colorpicker"),
  192.  
  193. array(
  194. "title" => __("Text Font Color",'rt_theme_admin'),
  195. "name" => "_text_font_color",
  196. "dont_save" => "true",
  197. "hr" => "true",
  198. "type" => "colorpicker"),
  199.  
  200. array(
  201. "title" => __("Link Color",'rt_theme_admin'),
  202. "name" => "_link_font_color",
  203. "dont_save" => "true",
  204. "hr" => "true",
  205. "type" => "colorpicker"),
  206.  
  207. array(
  208. "title" => __("Box Background Color",'rt_theme_admin'),
  209. "name" => "_box_bg_color",
  210. "dont_save" => "true",
  211. "type" => "colorpicker"),
  212.  
  213.  
  214. array(
  215. "name" => "_custom_styling",
  216. "statical_value" => "custom_styled",
  217. "type" => "hidden"),
  218.  
  219. );
  220.  
  221. $settings = array(
  222. "name" => THEMENAME ." Home Page Options",
  223. "scope" => "home_page",
  224. "slug" => "rt_home_custom_fields",
  225. "capability" => "edit_post",
  226. "context" => "normal",
  227. "priority" => "high"
  228. );
Advertisement
Add Comment
Please, Sign In to add comment