Advertisement
Guest User

Pytheas options.php

a guest
May 29th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.44 KB | None | 0 0
  1. <?php
  2. // Define options framework name for the DB
  3. function optionsframework_option_name() {
  4.  
  5. $optionsframework_settings = get_option('optionsframework');
  6. $optionsframework_settings['id'] = 'options_wpex_themes';
  7. update_option('optionsframework', $optionsframework_settings);
  8.  
  9. }
  10.  
  11. // Begin Options Function
  12. function optionsframework_options() {
  13.  
  14. //prettyPhoto themes
  15. $lightbox_themes = array(
  16. 'pp_default' => __('Default','wpex'),
  17. 'light_rounded' => __('Light Rounded','wpex'),
  18. 'dark_rounded' => __('Dark Rounded','wpex'),
  19. 'light_square' => __('Light Square','wpex'),
  20. 'dark_square' => __('Dark Square','wpex'),
  21. 'facebook' => __('Facebook','wpex'),
  22. );
  23.  
  24. // Begin options array
  25. $options = array();
  26.  
  27. //GENERAL
  28. $options[] = array(
  29. 'name' => __('General', 'wpex'),
  30. 'type' => 'heading');
  31.  
  32. $options['custom_logo'] = array(
  33. 'name' => __('Custom Logo', 'wpex'),
  34. 'desc' => __('Upload your custom logo.', 'wpex'),
  35. 'id' => 'custom_logo',
  36. 'type' => 'upload');
  37.  
  38. $options['headerimg_front_page_exclude'] = array(
  39. 'name' => __('Exclude Header Image From Homepage?', 'wpex'),
  40. 'desc' => __('Check box to exclude the header image from the homepage.', 'wpex'),
  41. 'id' => 'headerimg_front_page_exclude',
  42. 'std' => '1',
  43. 'type' => 'checkbox');
  44.  
  45. $options['widgetized_footer'] = array(
  46. 'name' => __('Widgetized Footer?', 'wpex'),
  47. 'desc' => __('Check box to enable the widgetized footer area.', 'wpex'),
  48. 'id' => 'widgetized_footer',
  49. 'std' => '1',
  50. 'type' => 'checkbox');
  51.  
  52. $options['lightbox_theme'] = array(
  53. 'name' => __('PrettyPhoto Theme', 'wpex'),
  54. 'desc' => __('Choose your PrettyPhoto theme.', 'wpex'),
  55. 'id' => 'lightbox_theme',
  56. 'std' => 'default',
  57. 'type' => 'select',
  58. 'options' => $lightbox_themes );
  59.  
  60. $options['masterhead_right'] = array(
  61. 'name' => __('Header Right Content', 'wpex'),
  62. 'desc' => __('Enter your custom content for the header top right section above the searchbox.', 'wpex'),
  63. 'id' => 'masterhead_right',
  64. 'std' => '<i class="icon-phone"></i>Call us: 999-99-99',
  65. 'type' => 'textarea');
  66.  
  67. $options['custom_copyright'] = array(
  68. 'name' => __('Custom Copyright', 'wpex'),
  69. 'desc' => __('Enter your custom copyright infor for the footer.', 'wpex'),
  70. 'id' => 'custom_copyright',
  71. 'std' => '<a href="http://wordpress.org" title="WordPress">WordPress</a>'. __('Theme by','wpex') .'<a href="http://wpexplorer.me" title="WPExplorer">WPExplorer</a>',
  72. 'type' => 'textarea');
  73.  
  74.  
  75. //Slider
  76. $options[] = array(
  77. 'name' => __('Slides', 'wpex'),
  78. 'type' => 'heading');
  79.  
  80. if ( class_exists( 'Symple_Slides_Post_Type' ) ) {
  81.  
  82. $options['slides_slideshow'] = array(
  83. "name" => __('Toggle: Slideshow', 'wpex'),
  84. "desc" => __('Check this box to enable automatic slideshow for your slides.', 'wpex'),
  85. "id" => "slides_slideshow",
  86. "std" => "true",
  87. "type" => "select",
  88. "options" => array(
  89. 'true' => 'true',
  90. 'false' => 'false'
  91. ) );
  92.  
  93. $options['slides_randomize'] = array(
  94. "name" => __('Toggle: Randomize', 'wpex'),
  95. "desc" => __('Check this box to enable the randomize feature for your slides.', 'wpex'),
  96. "id" => "slides_randomize",
  97. "std" => "false",
  98. "type" => "select",
  99. "options" => array(
  100. 'true' => 'true',
  101. 'false' => 'false'
  102. ) );
  103.  
  104. $options['slides_animation'] = array(
  105. "name" => __('Animation', 'wpex'),
  106. "desc" => __('Select your animation of choice.', 'wpex'),
  107. "id" => "slides_animation",
  108. "std" => "slide",
  109. "type" => "select",
  110. "options" => array(
  111. 'fade' => 'fade',
  112. 'slide' => 'slide'
  113. ) );
  114.  
  115. $options['slides_direction'] = array(
  116. "name" => __('Direction', 'wpex'),
  117. "desc" => __('Select the direction for your slides. Slide animation only & if using the <strong>vertical direction</strong> all slides must have the same height.', 'wpex'),
  118. "id" => "slides_direction",
  119. "std" => "horizontal",
  120. "type" => "select",
  121. "options" => array(
  122. 'horizontal' => 'horizontal',
  123. 'vertical' => 'vertical'
  124. ));
  125.  
  126. $options['slideshow_speed'] = array(
  127. "name" => __('SlideShow Speed', 'wpex'),
  128. "desc" => __('Enter your preferred slideshow speed in milliseconds.', 'wpex'),
  129. "id" => "slideshow_speed",
  130. "std" => "7000",
  131. "type" => "text" );
  132.  
  133. $options['animation_speed'] = array(
  134. "name" => __('Animation Speed', 'wpex'),
  135. "desc" => __('Enter your preferred animation speed in milliseconds.', 'wpex'),
  136. "id" => "animation_speed",
  137. "std" => "600",
  138. "type" => "text" );
  139. }
  140.  
  141. $options['slides_alt'] = array(
  142. "name" => __('Slider Alternative', 'wpex'),
  143. "desc" => __('If you prefer to use another slider you can enter the <strong>shortcode</strong> here.', 'wpex'),
  144. "id" => "slides_alt",
  145. "std" => "",
  146. "type" => "textarea" );
  147.  
  148.  
  149. //HOMEPAGE
  150. $options[] = array(
  151. 'name' => __('Homepage', 'wpex'),
  152. 'type' => 'heading');
  153.  
  154. $options['home_tagline'] = array(
  155. 'name' => __('Homepage Tagline', 'wpex','wpex'),
  156. 'desc' => __('Enter your homepage tagline content. Leave blank to show nothing.', 'wpex','wpex'),
  157. 'id' => 'home_tagline',
  158. 'std' => __('Homepage Tagline Sample','wpex'),
  159. 'type' => 'textarea');
  160.  
  161. $options['home_services_title'] = array(
  162. 'name' => __('Homepage Services Title', 'wpex','wpex'),
  163. 'desc' => __('Enter your homepage services title.', 'wpex','wpex'),
  164. 'id' => 'home_services_title',
  165. 'std' => __('What We Do','wpex'),
  166. 'class' => 'mini',
  167. 'type' => 'text');
  168.  
  169. $options['home_services_count'] = array(
  170. 'name' => __('How Manny Services Posts', 'wpex','wpex'),
  171. 'desc' => __('Enter an integer for how many service posts to show on the homepage.', 'wpex'),
  172. 'id' => 'home_services_count',
  173. 'std' => '6',
  174. 'type' => 'text');
  175.  
  176. $options['home_portfolio'] = array(
  177. 'name' => __('Show Recent Work?', 'wpex'),
  178. 'desc' => __('Check box to show recent work on the homepage.', 'wpex'),
  179. 'id' => 'home_portfolio',
  180. 'std' => '1',
  181. 'type' => 'checkbox');
  182.  
  183. $options['home_portfolio_title'] = array(
  184. 'name' => __('Recent Work Title', 'wpex'),
  185. 'desc' => __('Enter your custom title for the recent work section', 'wpex'),
  186. 'id' => 'home_portfolio_title',
  187. 'std' => __('Recent Work','wpex'),
  188. 'type' => 'text');
  189.  
  190. $options['home_portfolio_count'] = array(
  191. 'name' => __('Home Many Portfolio Posts?', 'wpex'),
  192. 'desc' => __('Enter an integer for how many portfolio posts to show on the homepage.', 'wpex'),
  193. 'id' => 'home_portfolio_count',
  194. 'std' => __('4','wpex'),
  195. 'type' => 'text');
  196.  
  197. $options['home_blog'] = array(
  198. 'name' => __('Show Recent Blog Posts?', 'wpex'),
  199. 'desc' => __('Check box to show recent blog posts on the homepage.', 'wpex'),
  200. 'id' => 'home_blog',
  201. 'std' => '1',
  202. 'type' => 'checkbox');
  203.  
  204. $options['home_blog_title'] = array(
  205. 'name' => __('Recent Blog Posts Title', 'wpex'),
  206. 'desc' => __('Enter your custom title for the recent blog posts section', 'wpex'),
  207. 'id' => 'home_blog_title',
  208. 'std' => __('Recent News','wpex'),
  209. 'class' => 'mini',
  210. 'type' => 'text');
  211.  
  212. $options['home_blog_count'] = array(
  213. 'name' => __('Home Many Blog Posts?', 'wpex'),
  214. 'desc' => __('Enter an integer for how many blog posts to show on the homepage.', 'wpex'),
  215. 'id' => 'home_blog_count',
  216. 'std' => __('4','wpex'),
  217. 'class' => 'mini',
  218. 'type' => 'text');
  219.  
  220. //BLOG
  221. $options[] = array(
  222. 'name' => __('Blog', 'wpex'),
  223. 'type' => 'heading');
  224.  
  225. $options['blog_single_thumbnail'] = array(
  226. 'name' => __('Featured Images On Single Posts?', 'wpex'),
  227. 'desc' => __('Check box to enable featured images on single blog posts.', 'wpex'),
  228. 'id' => 'blog_single_thumbnail',
  229. 'std' => '1',
  230. 'type' => 'checkbox');
  231.  
  232. $options['blog_excerpt'] = array(
  233. 'name' => __('Entry Excerpts?', 'wpex'),
  234. 'desc' => __('Check box to show excerpts rather then full posts on standard entries.', 'wpex'),
  235. 'id' => 'blog_exceprt',
  236. 'std' => '1',
  237. 'type' =>'checkbox');
  238.  
  239. $options['blog_bio'] = array(
  240. 'name' => __('Author Bio?', 'wpex'),
  241. 'desc' => __('Check box to enable featured images on single blog posts.', 'wpex'),
  242. 'id' => 'blog_bio',
  243. 'std' => '1',
  244. 'type' => 'checkbox');
  245.  
  246. $options['blog_tags'] = array(
  247. 'name' => __('Tags?', 'wpex'),
  248. 'desc' => __('Check box to enable featured images on single blog posts.', 'wpex'),
  249. 'id' => 'blog_tags',
  250. 'std' => '1',
  251. 'type' => 'checkbox');
  252.  
  253. $options['blog_related'] = array(
  254. 'name' => __('Related Posts?', 'wpex'),
  255. 'desc' => __('Check box to enable featured images on single blog posts.', 'wpex'),
  256. 'id' => 'blog_related',
  257. 'std' => '1',
  258. 'type' => 'checkbox');
  259.  
  260.  
  261. //SOCIAL
  262. if( function_exists('wpex_social_links') ) {
  263.  
  264. $options[] = array(
  265. 'name' => __('Social', 'wpex'),
  266. 'type' => 'heading');
  267.  
  268.  
  269. $options['social'] = array(
  270. 'name' => __('Social?', 'wpex'),
  271. 'desc' => __('Check box to enable the social section in the main menu.', 'wpex'),
  272. 'id' => 'social',
  273. 'std' => '1',
  274. 'type' => 'checkbox');
  275.  
  276.  
  277. $social_links = wpex_social_links();
  278. foreach( $social_links as $social_link ) {
  279. $options[] = array( "name" => ucfirst($social_link),
  280. 'desc' => ' '. __('Enter your ','wpex') . $social_link . __(' url','wpex') .' <br />'. __('Include http:// at the front of the url.', 'wpex'),
  281. 'id' => $social_link,
  282. 'std' => '',
  283. 'type' => 'text');
  284. }
  285. }
  286.  
  287. return $options;
  288. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement