optionsframework_options

Defines an array of options that will be used to generate the settings page and be saved in the database.

Description

optionsframework_options(); 

When creating the id fields, make sure to use all lowercase and no spaces.

If you are making your theme translatable, you should replace skt-full-width with the actual text domain for your theme. Read more: http://codex.wordpress.org/Function_Reference/load_theme_textdomain


Usage

  1. if ( !function_exists( 'optionsframework_options' ) ) { 
  2. require_once '/options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = optionsframework_options(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/options.php  
  1. function optionsframework_options() { 
  2.  
  3. $options = array(); 
  4. $imagepath = get_template_directory_uri() . '/images/'; 
  5.  
  6.  
  7. //Basic Settings 
  8.  
  9. $options[] = array( 
  10. 'name' => __('Basic Settings', 'skt-full-width'),  
  11. 'type' => 'heading'); 
  12.  
  13. $options[] = array( 
  14. 'name' => __('Logo', 'skt-full-width'),  
  15. 'desc' => __('Upload your logo here', 'skt-full-width'),  
  16. 'id' => 'logo',  
  17. 'class' => '',  
  18. 'std' => '',  
  19. 'type' => 'upload'); 
  20.  
  21. $options[] = array( 
  22. 'name' => __('Copyright Text', 'skt-full-width'),  
  23. 'desc' => __('Some Text regarding copyright of your site, you would like to display in the footer.', 'skt-full-width'),  
  24. 'id' => 'footertext2',  
  25. 'std' => 'Full Width 2014. All Rights Reserved',  
  26. 'type' => 'text'); 
  27.  
  28. $options[] = array( 
  29. 'name' => __('Featured image as background', 'skt-full-width'),  
  30. 'desc' => __('Do not use featured image as background image.', 'skt-full-width'),  
  31. 'id' => 'featured_as_background',  
  32. 'type' => 'checkbox',  
  33. 'std' => '' ); 
  34.  
  35. $options[] = array( 
  36. 'name' => __('Color Scheme', 'skt-full-width'),  
  37. 'desc' => __('Select the color scheme for theme', 'skt-full-width'),  
  38. 'id' => 'navigation_color',  
  39. 'std' => '#7BB303',  
  40. 'type' => 'color'); 
  41.  
  42. $options[] = array( 
  43. 'name' => __('Navigation Icon', 'skt-full-width'),  
  44. 'desc' => __('Upload icon for navigation<br />(max image size 9px X 9px)', 'skt-full-width'),  
  45. 'id' => 'navigation_icon',  
  46. 'class' => '',  
  47. 'std' => get_template_directory_uri()."/images/nav-icon-hover.png",  
  48. 'type' => 'upload'); 
  49.  
  50. $options[] = array( 
  51. 'name' => __('Pagination Gradient Color - Top', 'skt-full-width'),  
  52. 'desc' => __('Select the top gradient color for pagination links', 'skt-full-width'),  
  53. 'id' => 'pagin_grad_top_color',  
  54. 'std' => '#89b219',  
  55. 'type' => 'color'); 
  56.  
  57. $options[] = array( 
  58. 'name' => __('Pagination Gradient Color - Bottom', 'skt-full-width'),  
  59. 'desc' => __('Select the bottom gradient color for pagination links', 'skt-full-width'),  
  60. 'id' => 'pagin_grad_bottom_color',  
  61. 'std' => '#3f8d03',  
  62. 'type' => 'color'); 
  63.  
  64. //Layout Settings 
  65.  
  66. $options[] = array( 
  67. 'name' => __('Layout Settings', 'skt-full-width'),  
  68. 'type' => 'heading');  
  69.  
  70. $options[] = array( 
  71. 'name' => "Menu Layout",  
  72. 'desc' => "Select Layout for Menu position. It applies on inner pages only.",  
  73. 'id' => "sidebar-layout",  
  74. 'std' => "left",  
  75. 'type' => "images",  
  76. 'options' => array( 
  77. 'left' => $imagepath . '2cl.png',  
  78. 'right' => $imagepath . '2cr.png') 
  79. ); 
  80.  
  81. $options[] = array( 
  82. 'name' => __('Custom CSS', 'skt-full-width'),  
  83. 'desc' => __('Some Custom Styling for your site. Place any css codes here instead of the style.css file.', 'skt-full-width'),  
  84. 'id' => 'style2',  
  85. 'std' => '',  
  86. 'type' => 'textarea'); 
  87.  
  88. //SLIDER SETTINGS 
  89.  
  90. $options[] = array( 
  91. 'name' => __('Homepage Slider', 'skt-full-width'),  
  92. 'type' => 'heading'); 
  93.  
  94. $options[] = array( 
  95. 'name' => __('Slider Effects', 'skt-full-width'),  
  96. 'desc' => __('Add slider effects number eg: 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left.', 'skt-full-width'),  
  97. 'id' => 'sliderefect',  
  98. 'type' => 'text',  
  99. 'std' => '1' ); 
  100.  
  101. $options[] = array( 
  102. 'name' => __('Slider Image 1', 'skt-full-width'),  
  103. 'desc' => __('First Slide', 'skt-full-width'),  
  104. 'id' => 'slide1',  
  105. 'class' => '',  
  106. 'std' => get_template_directory_uri()."/images/banner_bg.jpg",  
  107. 'type' => 'upload'); 
  108.  
  109. $options[] = array( 
  110. 'desc' => __('Title', 'skt-full-width'),  
  111. 'id' => 'slidetitle1',  
  112. 'std' => 'Slider Image 1',  
  113. 'type' => 'text'); 
  114.  
  115. $options[] = array( 
  116. 'desc' => __('Description or Tagline', 'skt-full-width'),  
  117. 'id' => 'slidedesc1',  
  118. 'std' => 'Small description for slide 1',  
  119. 'type' => 'textarea');  
  120.  
  121. $options[] = array( 
  122. 'desc' => __('Url', 'skt-full-width'),  
  123. 'id' => 'slideurl1',  
  124. 'std' => '#link1',  
  125. 'type' => 'text',  
  126. 'subtype' => 'url');  
  127.  
  128. $options[] = array( 
  129. 'name' => __('Slider Image 2', 'skt-full-width'),  
  130. 'desc' => __('Second Slide', 'skt-full-width'),  
  131. 'class' => '',  
  132. 'id' => 'slide2',  
  133. 'std' => get_template_directory_uri()."/images/banner-welcome.jpg",  
  134. 'type' => 'upload'); 
  135.  
  136. $options[] = array( 
  137. 'desc' => __('Title', 'skt-full-width'),  
  138. 'id' => 'slidetitle2',  
  139. 'std' => 'Slider Image 2 ',  
  140. 'type' => 'text');  
  141.  
  142. $options[] = array( 
  143. 'desc' => __('Description or Tagline', 'skt-full-width'),  
  144. 'id' => 'slidedesc2',  
  145. 'std' => 'Small description for slide 2',  
  146. 'type' => 'textarea');  
  147.  
  148. $options[] = array( 
  149. 'desc' => __('Url', 'skt-full-width'),  
  150. 'id' => 'slideurl2',  
  151. 'std' => '#link2',  
  152. 'type' => 'text',  
  153. 'subtype' => 'url');  
  154.  
  155. $options[] = array( 
  156. 'name' => __('Slider Image 3', 'skt-full-width'),  
  157. 'desc' => __('Third Slide', 'skt-full-width'),  
  158. 'id' => 'slide3',  
  159. 'class' => '',  
  160. 'std' => '',  
  161. 'type' => 'upload');  
  162.  
  163. $options[] = array( 
  164. 'desc' => __('Title', 'skt-full-width'),  
  165. 'id' => 'slidetitle3',  
  166. 'std' => '',  
  167. 'type' => 'text');  
  168.  
  169. $options[] = array( 
  170. 'desc' => __('Description or Tagline', 'skt-full-width'),  
  171. 'id' => 'slidedesc3',  
  172. 'std' => '',  
  173. 'type' => 'textarea');  
  174.  
  175. $options[] = array( 
  176. 'desc' => __('Url', 'skt-full-width'),  
  177. 'id' => 'slideurl3',  
  178. 'std' => '',  
  179. 'type' => 'text',  
  180. 'subtype' => 'url');  
  181.  
  182. $options[] = array( 
  183. 'name' => __('Slider Image 4', 'skt-full-width'),  
  184. 'desc' => __('Fourth Slide', 'skt-full-width'),  
  185. 'id' => 'slide4',  
  186. 'class' => '',  
  187. 'std' => '',  
  188. 'type' => 'upload');  
  189.  
  190. $options[] = array( 
  191. 'desc' => __('Title', 'skt-full-width'),  
  192. 'id' => 'slidetitle4',  
  193. 'std' => '',  
  194. 'type' => 'text'); 
  195.  
  196. $options[] = array( 
  197. 'desc' => __('Description or Tagline', 'skt-full-width'),  
  198. 'id' => 'slidedesc4',  
  199. 'std' => '',  
  200. 'type' => 'textarea');  
  201.  
  202. $options[] = array( 
  203. 'desc' => __('Url', 'skt-full-width'),  
  204. 'id' => 'slideurl4',  
  205. 'std' => '',  
  206. 'type' => 'text',  
  207. 'subtype' => 'url');  
  208.  
  209. $options[] = array( 
  210. 'name' => __('Slider Image 5', 'skt-full-width'),  
  211. 'desc' => __('Fifth Slide', 'skt-full-width'),  
  212. 'id' => 'slide5',  
  213. 'class' => '',  
  214. 'std' => '',  
  215. 'type' => 'upload');  
  216.  
  217. $options[] = array( 
  218. 'desc' => __('Title', 'skt-full-width'),  
  219. 'id' => 'slidetitle5',  
  220. 'std' => '',  
  221. 'type' => 'text');  
  222.  
  223. $options[] = array( 
  224. 'desc' => __('Description or Tagline', 'skt-full-width'),  
  225. 'id' => 'slidedesc5',  
  226. 'std' => '',  
  227. 'type' => 'textarea');  
  228.  
  229. $options[] = array( 
  230. 'desc' => __('Url', 'skt-full-width'),  
  231. 'id' => 'slideurl5',  
  232. 'std' => '',  
  233. 'type' => 'text',  
  234. 'subtype' => 'url');  
  235.  
  236. //Social Settings 
  237.  
  238. $options[] = array( 
  239. 'name' => __('Social Settings', 'skt-full-width'),  
  240. 'type' => 'heading'); 
  241.  
  242. $options[] = array( 
  243. 'desc' => __('Please set the value of following fields, as per the instructions given along. If you do not want to use an icon, just leave it blank. If some icons are showing up, even when no value is set then make sure they are completely blank, and just save the options once. They will not be shown anymore.', 'skt-full-width'),  
  244. 'type' => 'info'); 
  245.  
  246. $options[] = array( 
  247. 'name' => __('Facebook', 'skt-full-width'),  
  248. 'desc' => __('Facebook Profile or Page URL i.e. http://facebook.com/username/ ', 'skt-full-width'),  
  249. 'id' => 'facebook',  
  250. 'std' => '#',  
  251. 'class' => 'mini',  
  252. 'type' => 'text',  
  253. 'subtype' => 'url'); 
  254.  
  255. $options[] = array( 
  256. 'name' => __('Twitter', 'skt-full-width'),  
  257. 'desc' => __('Twitter Username', 'skt-full-width'),  
  258. 'id' => 'twitter',  
  259. 'std' => '#',  
  260. 'class' => 'mini',  
  261. 'type' => 'text'); 
  262.  
  263. $options[] = array( 
  264. 'name' => __('Google Plus', 'skt-full-width'),  
  265. 'desc' => __('Google Plus profile url, including "http://"', 'skt-full-width'),  
  266. 'id' => 'google',  
  267. 'std' => '#',  
  268. 'class' => 'mini',  
  269. 'type' => 'text',  
  270. 'subtype' => 'url'); 
  271.  
  272. $options[] = array( 
  273. 'name' => __('Linkedin', 'skt-full-width'),  
  274. 'desc' => __('Linkedin URL', 'skt-full-width'),  
  275. 'id' => 'linkedin',  
  276. 'std' => '#',  
  277. 'class' => 'mini',  
  278. 'type' => 'text',  
  279. 'subtype' => 'url');  
  280.  
  281.  
  282. // Contact Details 
  283. $options[] = array( 
  284. 'name' => __('Contact Details for footer', 'skt-full-width'),  
  285. 'type' => 'heading'); 
  286.  
  287. $options[] = array( 
  288. 'desc' => __('Company Name', 'skt-full-width'),  
  289. 'id' => 'contact1',  
  290. 'std' => 'Full Width',  
  291. 'type' => 'text');  
  292.  
  293. $options[] = array( 
  294. 'desc' => __('Address 1', 'skt-full-width'),  
  295. 'id' => 'contact2',  
  296. 'std' => '123 Some Street',  
  297. 'type' => 'text');  
  298.  
  299. $options[] = array( 
  300. 'desc' => __('Address 2', 'skt-full-width'),  
  301. 'id' => 'contact3',  
  302. 'std' => 'California, USA',  
  303. 'type' => 'text'); 
  304.  
  305. $options[] = array( 
  306. 'desc' => __('Phone', 'skt-full-width'),  
  307. 'id' => 'contact4',  
  308. 'std' => '100 2000 300',  
  309. 'type' => 'text'); 
  310.  
  311. $options[] = array( 
  312. 'desc' => __('Email', 'skt-full-width'),  
  313. 'id' => 'contact5',  
  314. 'std' => sanitize_email( 'info@example.com' ),  
  315. 'type' => 'text',  
  316. 'subtype' => 'email');  
  317.  
  318. // Support  
  319. $options[] = array( 
  320. 'name' => __('Our Themes', 'skt-full-width'),  
  321. 'type' => 'heading'); 
  322.  
  323. $options[] = array( 
  324. 'desc' => __('SKT Full Width WordPress theme has been Designed and Created by SKT Themes.', 'skt-full-width'),  
  325. 'type' => 'info');  
  326.  
  327. $options[] = array( 
  328. 'desc' => '<a href="'.esc_url(SKT_THEME_URL).'" target="_blank"><img src="'.get_template_directory_uri().'/images/sktskill.jpg"></a><p><em><a target="_blank" href="'.esc_url(SKT_THEME_URL_DIRECT).'">'.__('Buy PRO version for only $39 with more features.', 'skt-full-width').'</a></em></p>',  
  329. 'type' => 'info');  
  330.  
  331.  
  332. return $options;