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