inkthemes_options

The Black Rider Lite Responsive Theme inkthemes options function.

Description

inkthemes_options(); 

Usage

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

Defined (1)

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

/functions/theme-options.php  
  1. function inkthemes_options() { 
  2. // VARIABLES 
  3. $themename = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); 
  4. $shortname = "of"; 
  5. // Populate OptionsFramework option in array for use in theme 
  6. global $of_options; 
  7. $of_options = inkthemes_get_option('of_options'); 
  8. //Front page on/off 
  9. $file_rename = array("on" => "On", "off" => "Off"); 
  10. $home_page_blog_content = array("on" => "On", "off" => "Off"); 
  11. // Background Defaults 
  12. $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll'); 
  13. //Stylesheet Reader 
  14. $alt_stylesheets = array("orange" => "orange", "green" => "green", "teal-green" => "teal-green", "yellow" => "yellow", "red" => "red", "black" => "black", "pink" => "pink", "blue" => "blue"); 
  15. $lan_stylesheets = array("Default" => "Default", "rtl" => "rtl"); 
  16. // Pull all the categories into an array 
  17. $options_categories = array(); 
  18. $options_categories_obj = get_categories(); 
  19. foreach ($options_categories_obj as $category) { 
  20. $options_categories[$category->cat_ID] = $category->cat_name; 
  21. // Populate OptionsFramework option in array for use in theme 
  22. $contact_option = array("on" => "On", "off" => "Off"); 
  23. $captcha_option = array("on" => "On", "off" => "Off"); 
  24. // Pull all the pages into an array 
  25. $options_pages = array(); 
  26. $options_pages_obj = get_pages('sort_column=post_parent, menu_order'); 
  27. $options_pages[''] = 'Select a page:'; 
  28. foreach ($options_pages_obj as $page) { 
  29. $options_pages[$page->ID] = $page->post_title; 
  30. // If using image radio buttons, define a directory path 
  31. $imagepath = get_template_directory_uri() . '/images/'; 
  32.  
  33. $options = array( 
  34. array("name" => "General Settings",  
  35. "type" => "heading"),  
  36. array("name" => "Custom Logo",  
  37. "desc" => "Upload a logo for your Website. The recommended size for the logo is 200px width x 50px height.",  
  38. "id" => "inkthemes_logo",  
  39. "type" => "upload"),  
  40. array("name" => "Custom Favicon",  
  41. "desc" => "Here you can upload a Favicon for your Website. Specified size is 16px x 16px.",  
  42. "id" => "inkthemes_favicon",  
  43. "type" => "upload"),  
  44. array("name" => "Mobile Navigation Menu",  
  45. "desc" => "Enter your mobile navigation menu text",  
  46. "id" => "inkthemes_nav",  
  47. "std" => "",  
  48. "type" => "textarea"),  
  49. array("name" => "Top Right Contact Details",  
  50. "desc" => "Mention the contact details here which will be displayed on the top right corner of Website.",  
  51. "id" => "inkthemes_topright",  
  52. "std" => "",  
  53. "type" => "textarea"),  
  54. array("name" => "Contact Number For Tap To Call Feature",  
  55. "desc" => "Mention your contact number here through which users can interact to you directly. This feature is called tap to call and this will work when the user will access your website through mobile phones or iPhone.",  
  56. "id" => "inkthemes_contact_number",  
  57. "std" => "",  
  58. "type" => "text"),  
  59. array("name" => "Tracking Code",  
  60. "desc" => "Paste your Google Analytics (or other) tracking code here.",  
  61. "id" => "inkthemes_analytics",  
  62. "std" => "",  
  63. "type" => "textarea"),  
  64. array("name" => "Front Page On/Off",  
  65. "desc" => "If the front page option is active then home page will appear otherwise blog page will display.",  
  66. "id" => "re_nm",  
  67. "std" => "on",  
  68. "type" => "radio",  
  69. "options" => $file_rename),  
  70. //Homepage Feature Area 
  71. array("name" => "Homepage Feature Area",  
  72. "type" => "heading"),  
  73. array("name" => "Home Page Main Heading Comes Here",  
  74. "desc" => "Mention the punch line for your business here.",  
  75. "id" => "inkthemes_page_main_heading",  
  76. "std" => "",  
  77. "type" => "textarea"),  
  78. array("name" => "Home Page Sub Heading",  
  79. "desc" => "Mention the tagline for your business here that will complement the punch line.",  
  80. "id" => "inkthemes_page_sub_heading",  
  81. "std" => "",  
  82. "type" => "textarea"),  
  83. array("name" => "Home Page Feature Section Starts From Here.",  
  84. "type" => "saperate",  
  85. "class" => "saperator"),  
  86. array("name" => "First Feature Image",  
  87. "desc" => "Choose image for your first Feature area. Optimal size 170px x 170px",  
  88. "id" => "inkthemes_fimg1",  
  89. "std" => "",  
  90. "type" => "upload"),  
  91. array("name" => "First Feature Heading",  
  92. "desc" => "Enter your text for first col heading.",  
  93. "id" => "inkthemes_firsthead",  
  94. "std" => "",  
  95. "type" => "textarea"),  
  96. array("name" => "First Feature Description",  
  97. "desc" => "Enter your text for first col description.",  
  98. "id" => "inkthemes_firstdesc",  
  99. "std" => "",  
  100. "type" => "textarea"),  
  101. array("name" => "First feature Link",  
  102. "desc" => "Enter your text for First feature Link.",  
  103. "id" => "inkthemes_feature_link1",  
  104. "std" => "",  
  105. "type" => "text"),  
  106. array("name" => "Second Feature Starts From Here.",  
  107. "type" => "saperate",  
  108. "class" => "saperator"),  
  109. //Second Feature Separetor 
  110. array("name" => "Second Feature Image",  
  111. "desc" => "Choose image for your second Feature area. Optimal size 170px x 170px",  
  112. "id" => "inkthemes_fimg2",  
  113. "std" => "",  
  114. "type" => "upload"),  
  115. array("name" => "Second Feature Heading",  
  116. "desc" => "Enter your heading for second Feature area",  
  117. "id" => "inkthemes_headline2",  
  118. "std" => "",  
  119. "type" => "textarea"),  
  120. array("name" => "Second Col Description",  
  121. "desc" => "Enter your text for second col description.",  
  122. "id" => "inkthemes_seconddesc",  
  123. "std" => "",  
  124. "type" => "textarea"),  
  125. array("name" => "Second feature Link",  
  126. "desc" => "Enter your text for Second feature Link.",  
  127. "id" => "inkthemes_feature_link2",  
  128. "std" => "",  
  129. "type" => "text"),  
  130. array("name" => "Third Feature Starts From Here.",  
  131. "type" => "saperate",  
  132. "class" => "saperator"),  
  133. //Third Feature Separetor 
  134. array("name" => "Third Feature Image",  
  135. "desc" => "Choose image for your thrid Feature. Optimal size 170px x 170px",  
  136. "id" => "inkthemes_fimg3",  
  137. "std" => "",  
  138. "type" => "upload"),  
  139. array("name" => "Third Feature Heading",  
  140. "desc" => "Enter your heading for third Feature area",  
  141. "id" => "inkthemes_headline3",  
  142. "std" => "",  
  143. "type" => "textarea"),  
  144. array("name" => "Third Feature Description",  
  145. "desc" => "Enter your text for Third Feature description.",  
  146. "id" => "inkthemes_thirddesc",  
  147. "std" => "",  
  148. "type" => "textarea"),  
  149. array("name" => "Third feature Link",  
  150. "desc" => "Enter your text for Second feature Link.",  
  151. "id" => "inkthemes_feature_link3",  
  152. "std" => "",  
  153. "type" => "text"),  
  154. array("name" => "Fourth Feature Starts From Here.",  
  155. "type" => "saperate",  
  156. "class" => "saperator"),  
  157. //Fourth Feature Separetor 
  158. array("name" => "Fourth Feature Image",  
  159. "desc" => "Choose image for your Fourth Feature. Optimal size 170px x 170px",  
  160. "id" => "inkthemes_fimg4",  
  161. "std" => "",  
  162. "type" => "upload"),  
  163. array("name" => "Fourth Feature Heading",  
  164. "desc" => "Enter your heading for Fourth Feature area",  
  165. "id" => "inkthemes_headline4",  
  166. "std" => "",  
  167. "type" => "textarea"),  
  168. array("name" => "Fourth Feature Description",  
  169. "desc" => "Enter your text for Fourth Feature description.",  
  170. "id" => "inkthemes_fourthdesc",  
  171. "std" => "",  
  172. "type" => "textarea"),  
  173. array("name" => "Fourth feature Link",  
  174. "desc" => "Enter your text for Fourth feature Link.",  
  175. "id" => "inkthemes_feature_link4",  
  176. "std" => "",  
  177. "type" => "text"),  
  178. array("name" => "Home Page Testimonial Section Starts From Here",  
  179. "type" => "saperate",  
  180. "class" => "saperator"),  
  181. array("name" => "Home Page Blog Heading",  
  182. "desc" => "Enter your text for home Page blog heading section",  
  183. "id" => "inkthemes_blog_heading",  
  184. "std" => "",  
  185. "type" => "text"),  
  186. array("name" => "Number Of Post",  
  187. "desc" => "Here you can mention the number of blog post that will display on home page.",  
  188. "id" => "inkthemes_blog_post",  
  189. "std" => "2",  
  190. "type" => "text"),  
  191. //****=============================================================================****// 
  192. //****-----------This code is used for creating color styleshteet options----------****//  
  193. //****=============================================================================****//  
  194. array("name" => "Styling Options",  
  195. "type" => "heading"),  
  196. array("name" => "Custom CSS",  
  197. "desc" => "Quickly add your custom CSS code to your theme by writing the code in this block.",  
  198. "id" => "inkthemes_customcss",  
  199. "std" => "",  
  200. "type" => "textarea"),  
  201. //****=============================================================================****// 
  202. //****-------------This code is used for creating Bottom Footer Setting options-------------****//  
  203. //****=============================================================================****//  
  204. array("name" => "Footer Settings",  
  205. "type" => "heading"),  
  206. array("name" => "Footer Text",  
  207. "desc" => "Write the text here that will be displayed on the footer i.e. at the bottom of the Website.",  
  208. "id" => "inkthemes_footertext",  
  209. "std" => "",  
  210. "type" => "textarea")); 
  211.  
  212. inkthemes_update_option('of_template', $options); 
  213. inkthemes_update_option('of_themename', $themename); 
  214. inkthemes_update_option('of_shortname', $shortname);