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-world 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-world'),  
  11. 'type' => 'heading'); 
  12.  
  13. $options[] = array( 
  14. 'name' => __('Copyright Text', 'skt-photo-world'),  
  15. 'desc' => __('Some Text regarding copyright of your site, you would like to display in the footer.', 'skt-photo-world'),  
  16. 'id' => 'footertext2',  
  17. 'std' => 'Photo World 2015. All Rights Reserved',  
  18. 'type' => 'text'); 
  19.  
  20. $options[] = array( 
  21. 'name' => __('Featured image as background', 'skt-photo-world'),  
  22. 'desc' => __('Do not use featured image as background image.', 'skt-photo-world'),  
  23. 'id' => 'featured_as_background',  
  24. 'type' => 'checkbox',  
  25. 'std' => '' ); 
  26.  
  27. $options[] = array( 
  28. 'name' => __('Color Scheme', 'skt-photo-world'),  
  29. 'desc' => __('Select the color scheme for theme', 'skt-photo-world'),  
  30. 'id' => 'navigation_color',  
  31. 'std' => '#fc0000',  
  32. 'type' => 'color'); 
  33.  
  34. $options[] = array( 
  35. 'name' => __('Pagination Gradient Color - Top', 'skt-photo-world'),  
  36. 'desc' => __('Select the top gradient color for pagination links', 'skt-photo-world'),  
  37. 'id' => 'pagin_grad_top_color',  
  38. 'std' => '#e76a6a',  
  39. 'type' => 'color'); 
  40.  
  41. $options[] = array( 
  42. 'name' => __('Pagination Gradient Color - Bottom', 'skt-photo-world'),  
  43. 'desc' => __('Select the bottom gradient color for pagination links', 'skt-photo-world'),  
  44. 'id' => 'pagin_grad_bottom_color',  
  45. 'std' => '#fc0000',  
  46. 'type' => 'color'); 
  47.  
  48. //Layout Settings 
  49.  
  50. $options[] = array( 
  51. 'name' => __('Layout Settings', 'skt-photo-world'),  
  52. 'type' => 'heading');  
  53.  
  54. $options[] = array( 
  55. 'name' => "Menu Layout",  
  56. 'desc' => "Select Layout for Menu position. It applies on inner pages only.",  
  57. 'id' => "sidebar-layout",  
  58. 'std' => "left",  
  59. 'type' => "images",  
  60. 'options' => array( 
  61. 'left' => $imagepath . '2cl.png',  
  62. 'right' => $imagepath . '2cr.png') 
  63. ); 
  64.  
  65. $options[] = array( 
  66. 'name' => __('Custom CSS', 'skt-photo-world'),  
  67. 'desc' => __('Some Custom Styling for your site. Place any css codes here instead of the style.css file.', 'skt-photo-world'),  
  68. 'id' => 'style2',  
  69. 'std' => '',  
  70. 'type' => 'textarea'); 
  71.  
  72. //SLIDER SETTINGS 
  73.  
  74. $options[] = array( 
  75. 'name' => __('Homepage Slider', 'skt-photo-world'),  
  76. 'type' => 'heading'); 
  77.  
  78. $options[] = array( 
  79. 'name' => __('Slider Image 1', 'skt-photo-world'),  
  80. 'desc' => __('First Slide', 'skt-photo-world'),  
  81. 'id' => 'slide1',  
  82. 'class' => '',  
  83. 'std' => get_template_directory_uri()."/images/banner_bg.jpg",  
  84. 'type' => 'upload');  
  85.  
  86. $options[] = array( 
  87. 'name' => __('Slider Image 2', 'skt-photo-world'),  
  88. 'desc' => __('Second Slide', 'skt-photo-world'),  
  89. 'class' => '',  
  90. 'id' => 'slide2',  
  91. 'std' => get_template_directory_uri()."/images/banner-welcome.jpg",  
  92. 'type' => 'upload'); 
  93.  
  94.  
  95. $options[] = array( 
  96. 'name' => __('Slider Image 3', 'skt-photo-world'),  
  97. 'desc' => __('Third Slide', 'skt-photo-world'),  
  98. 'id' => 'slide3',  
  99. 'class' => '',  
  100. 'std' => get_template_directory_uri()."/images/banner-third.jpg",  
  101. 'type' => 'upload');  
  102.  
  103. $options[] = array( 
  104. 'name' => __('Slider Image 4', 'skt-photo-world'),  
  105. 'desc' => __('Fourth Slide', 'skt-photo-world'),  
  106. 'id' => 'slide4',  
  107. 'class' => '',  
  108. 'std' => get_template_directory_uri()."/images/banner-fourth.jpg",  
  109. 'type' => 'upload');  
  110.  
  111.  
  112. $options[] = array( 
  113. 'name' => __('Slider Image 5', 'skt-photo-world'),  
  114. 'desc' => __('Fifth Slide', 'skt-photo-world'),  
  115. 'id' => 'slide5',  
  116. 'class' => '',  
  117. 'std' => '',  
  118. 'type' => 'upload'); 
  119.  
  120. $options[] = array( 
  121. 'name' => __('Slider Image 6', 'skt-photo-world'),  
  122. 'desc' => __('Sixth Slide', 'skt-photo-world'),  
  123. 'id' => 'slide6',  
  124. 'class' => '',  
  125. 'std' => get_template_directory_uri().'/images/banner-sixth.jpg',  
  126. 'type' => 'upload'); 
  127.  
  128. $options[] = array( 
  129. 'name' => __('Slider Image 7', 'skt-photo-world'),  
  130. 'desc' => __('Seventh Slide', 'skt-photo-world'),  
  131. 'id' => 'slide7',  
  132. 'class' => '',  
  133. 'std' => get_template_directory_uri().'/images/banner-seventh.jpg',  
  134. 'type' => 'upload'); 
  135.  
  136. $options[] = array( 
  137. 'name' => __('Slider Image 8', 'skt-photo-world'),  
  138. 'desc' => __('Eighth Slide', 'skt-photo-world'),  
  139. 'id' => 'slide8',  
  140. 'class' => '',  
  141. 'std' => get_template_directory_uri().'/images/banner-eight.jpg',  
  142. 'type' => 'upload'); 
  143.  
  144. $options[] = array( 
  145. 'name' => __('Slider Image 9', 'skt-photo-world'),  
  146. 'desc' => __('Nineth Slide', 'skt-photo-world'),  
  147. 'id' => 'slide9',  
  148. 'class' => '',  
  149. 'std' => get_template_directory_uri().'/images/banner-nine.jpg',  
  150. 'type' => 'upload');  
  151.  
  152. $options[] = array( 
  153. 'name' => __('Slider Image 10', 'skt-photo-world'),  
  154. 'desc' => __('Tenth Slide', 'skt-photo-world'),  
  155. 'id' => 'slide10',  
  156. 'class' => '',  
  157. 'std' => get_template_directory_uri().'/images/banner-ten.jpg',  
  158. 'type' => 'upload');  
  159.  
  160. //Social Settings 
  161.  
  162. $options[] = array( 
  163. 'name' => __('Social Settings', 'skt-photo-world'),  
  164. 'type' => 'heading'); 
  165.  
  166. $options[] = array( 
  167. '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-world'),  
  168. 'type' => 'info'); 
  169.  
  170. $options[] = array( 
  171. 'name' => __('Facebook', 'skt-photo-world'),  
  172. 'desc' => __('Facebook Profile or Page URL i.e. http://facebook.com/username/ ', 'skt-photo-world'),  
  173. 'id' => 'facebook',  
  174. 'std' => '#',  
  175. 'class' => 'mini',  
  176. 'type' => 'text',  
  177. 'subtype' => 'url'); 
  178.  
  179. $options[] = array( 
  180. 'name' => __('Twitter', 'skt-photo-world'),  
  181. 'desc' => __('Twitter Username', 'skt-photo-world'),  
  182. 'id' => 'twitter',  
  183. 'std' => '#',  
  184. 'class' => 'mini',  
  185. 'type' => 'text'); 
  186.  
  187. $options[] = array( 
  188. 'name' => __('Google Plus', 'skt-photo-world'),  
  189. 'desc' => __('Google Plus profile url, including "http://"', 'skt-photo-world'),  
  190. 'id' => 'google',  
  191. 'std' => '#',  
  192. 'class' => 'mini',  
  193. 'type' => 'text',  
  194. 'subtype' => 'url'); 
  195.  
  196. $options[] = array( 
  197. 'name' => __('Linkedin', 'skt-photo-world'),  
  198. 'desc' => __('Linkedin URL', 'skt-photo-world'),  
  199. 'id' => 'linkedin',  
  200. 'std' => '#',  
  201. 'class' => 'mini',  
  202. 'type' => 'text',  
  203. 'subtype' => 'url');  
  204.  
  205.  
  206. // Contact Details 
  207. $options[] = array( 
  208. 'name' => __('Contact Details for footer', 'skt-photo-world'),  
  209. 'type' => 'heading'); 
  210.  
  211. $options[] = array( 
  212. 'desc' => __('Company Name', 'skt-photo-world'),  
  213. 'id' => 'contact1',  
  214. 'std' => 'PHOTO WORLD',  
  215. 'type' => 'text');  
  216.  
  217. $options[] = array( 
  218. 'desc' => __('Address 1', 'skt-photo-world'),  
  219. 'id' => 'contact2',  
  220. 'std' => '123 Some Street',  
  221. 'type' => 'text');  
  222.  
  223. $options[] = array( 
  224. 'desc' => __('Address 2', 'skt-photo-world'),  
  225. 'id' => 'contact3',  
  226. 'std' => 'California, USA',  
  227. 'type' => 'text'); 
  228.  
  229. $options[] = array( 
  230. 'desc' => __('Phone', 'skt-photo-world'),  
  231. 'id' => 'contact4',  
  232. 'std' => '100 2000 300',  
  233. 'type' => 'text'); 
  234.  
  235. $options[] = array( 
  236. 'desc' => __('Email', 'skt-photo-world'),  
  237. 'id' => 'contact5',  
  238. 'std' => sanitize_email( 'info@example.com' ),  
  239. 'type' => 'text',  
  240. 'subtype' => 'email');  
  241.  
  242. // Support  
  243. $options[] = array( 
  244. 'name' => __('Our Themes', 'skt-photo-world'),  
  245. 'type' => 'heading'); 
  246.  
  247. $options[] = array( 
  248. 'desc' => __('SKT Photo World WordPress theme has been Designed and Created by SKT Themes.', 'skt-photo-world'),  
  249. 'type' => 'info');  
  250.  
  251. $options[] = array( 
  252. '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-world'),  
  253. 'type' => 'info');  
  254.  
  255.  
  256. return $options;