Advertisement
towfiqi

demo_options

Oct 22nd, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.06 KB | None | 0 0
  1. <?php
  2.  
  3. //include the main class file
  4. require_once("admin/admin-page-class.php");
  5.  
  6. /**
  7. * configure your admin page
  8. */
  9. $config = array(
  10. 'menu' => 'theme', //sub page to settings page
  11. 'page_title' => __('Asteria Options','asteria'), //The name of this page
  12. 'capability' => 'edit_themes', // The capability needed to view the page
  13. 'option_group' => 'asteria_options', //the name of the option to create in the database
  14. 'id' => 'admin_page', // meta box id, unique per page
  15. 'fields' => array(), // list of fields (can be added by field arrays)
  16. 'local_images' => false, // Use local or hosted images (meta box images for add/remove)
  17. 'use_with_theme' => get_template_directory_uri() . '/admin/', //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
  18. 'google_fonts' => true
  19. );
  20. register_activation_hook( __FILE__, 'admin_pageplugin_activate' );
  21.  
  22. /**
  23. * instantiate your admin page
  24. */
  25. $options_panel = new BF_Admin_Page_Class($config);
  26. $options_panel->OpenTabs_container('');
  27.  
  28. /**
  29. * define your admin page tabs listing
  30. */
  31. $options_panel->TabsListing(array(
  32. 'links' => array(
  33. 'options_1' => __('Basic','asteria'),
  34. 'options_2' => __('Front Page','asteria'),
  35. 'options_3' => __('Slider','asteria'),
  36. 'options_4' => __('Style','asteria'),
  37. 'options_5' => __('TypoGraphy','asteria'),
  38. 'options_6' => __('Social','asteria'),
  39. 'options_7' => __('Miscellaneous','asteria'),
  40. 'options_8' => __('Mobile Layout','asteria'),
  41. 'options_9' => __('Custom CSS','asteria'),
  42. 'options_10' => __('Maintanace Mode','asteria'),
  43. 'options_11' => __('Import/Export','asteria'),
  44. 'options_12' => __('About The Theme','asteria'),
  45. 'options_13' => __('Upgrade to PRO','asteria'),
  46. 'options_14' => __('Documentation','asteria'),
  47. )
  48. ));
  49.  
  50. /**
  51. * Open admin page first tab
  52. */
  53. $options_panel->OpenTab('options_1');
  54.  
  55. /**
  56. * Add fields to your admin page first tab
  57. *
  58. * Simple options:
  59. * input text, checbox, select, radio
  60. * textarea
  61. */
  62.  
  63. //title
  64. $options_panel->Title(__("Basic Settings","asteria"));
  65.  
  66. //LOGO Image field
  67. $options_panel->addImage('logo_image_id',array('name'=> __('Logo/Header Image ','asteria'),'preview_height' => 'auto', 'preview_width' => '300px', 'desc' => __('Click the "Upload" button to upload your logo Image.','asteria')));
  68.  
  69. //Site Width
  70. $options_panel->addRadio('site_width_id',array('fixed'=>'Fixed Width','full_width'=>'Full Width'),array('name'=> __('Site Width','asteria'), 'std'=> array('fixed'), 'desc' => __('No matter which layout you select the site will be responsive','asteria')));
  71.  
  72.  
  73.  
  74. //Header Type
  75. $options_panel->addSelect('page_type_id',array('page_head1'=>'Big Page header','page_head2'=>'Normal Page Header'),array('name'=> __('Page Header Type','asteria'), 'std'=> array('page_head1'), 'desc' => __('Change how the Page Title Looks','asteria')));
  76.  
  77. //Disable Ajax Pagination
  78. $options_panel->addCheckbox('ajax_id',array('name'=> __('Ajax Pagination','asteria'), 'std' => true, 'desc' => __('Ajax pagination(Go to next page without reloading the page) ','asteria')));
  79.  
  80. //Disable Ajax Pagination
  81. $options_panel->addCheckbox('totop_id',array('name'=> __('To Top Button','asteria'), 'std' => true, 'desc' => __('Turn On/Off "To Top Button"(The button that appears on bottom right when you scroll down to pages.) ','asteria')));
  82.  
  83. //wysiwyg field
  84. $options_panel->addWysiwyg('footer_text_id',array('name'=> __('Footer Copyright Text ','asteria'), 'desc' => __('Your copyright text here','asteria')));
  85.  
  86.  
  87. /**
  88. * Close first tab
  89. */
  90. $options_panel->CloseTab();
  91.  
  92.  
  93. /**
  94. * Open admin page Second tab
  95. */
  96. $options_panel->OpenTab('options_2');
  97. /**
  98. * Add fields to your admin page 2nd tab
  99. *
  100. * Fancy options:
  101. * typography field
  102. * image uploader
  103. * Pluploader
  104. * date picker
  105. * time picker
  106. * color picker
  107. */
  108. //title
  109. $options_panel->Title(__('Front Page Options','asteria'));
  110.  
  111. $options_panel->Title(__('<span class="ast_smalltit">Frontpage Elements Settings</span>','asteria'));
  112.  
  113. //BLOCKS---------------------------------------
  114. $options_panel->addCheckbox('hide_blocks',array('name'=> '','class' => 'show-hide', 'std' => true));
  115. $options_panel->Title(__('Blocks','asteria'));
  116.  
  117. //Disable Block1
  118. $options_panel->addCheckbox('hide_block1',array('name'=> __('Hide Block 1','asteria'),'class' => 'no-fancy', 'std' => false));
  119. //text field
  120. $options_panel->addText('block1_text_id', array('name'=> __('Block 1 Title ','asteria'), 'std'=> ''));
  121. //ICON SELCET
  122. $options_panel->addSelect('block1_icon',$fontawesome,array('name'=> __('Block 1 Icon','asteria'),'class' => 'no-fancy iconselect' , 'std'=> array('icon-camera-retro')));
  123. //wysiwyg field
  124. $options_panel->addWysiwyg('block1_textarea_id',array('name'=> __('Block 1 Content','asteria'), 'std'=> ''));
  125.  
  126. //Disable Block2
  127. $options_panel->addCheckbox('hide_block2',array('name'=> __('Hide Block 2','asteria'),'class' => 'no-fancy', 'std' => false));
  128. //text field
  129. $options_panel->addText('block2_text_id', array('name'=> __('Block 2 Title ','asteria'), 'std'=> ''));
  130. //ICON SELCET
  131. $options_panel->addSelect('block2_icon',$fontawesome,array('name'=> __('Block 2 Icon','asteria'),'class' => 'no-fancy iconselect' , 'std'=> array('icon-rocket')));
  132. //wysiwyg field
  133. $options_panel->addWysiwyg('block2_textarea_id',array('name'=> __('Block 2 Content','asteria'), 'std'=> ''));
  134.  
  135.  
  136. //Disable Block3
  137. $options_panel->addCheckbox('hide_block3',array('name'=> __('Hide Block 3','asteria'),'class' => 'no-fancy', 'std' => false));
  138. //text field
  139. $options_panel->addText('block3_text_id', array('name'=> __('Block 3 Title ','asteria'), 'std'=> ''));
  140. //ICON SELCET
  141. $options_panel->addSelect('block3_icon',$fontawesome,array('name'=> __('Block 3 Icon','asteria'),'class' => 'no-fancy iconselect' , 'std'=> array('icon-signal')));
  142. //wysiwyg field
  143. $options_panel->addWysiwyg('block3_textarea_id',array('name'=> __('Block 3 Content','asteria'), 'std'=> ''));
  144.  
  145.  
  146. //Disable Block4
  147. $options_panel->addCheckbox('hide_block4',array('name'=> __('Hide Block 4','asteria'),'class' => 'no-fancy', 'std' => false));
  148. //text field
  149. $options_panel->addText('block4_text_id', array('name'=> __('Block 4 Title ','asteria'), 'std'=> ''));
  150. //ICON SELCET
  151. $options_panel->addSelect('block4_icon',$fontawesome,array('name'=> __('Block 4 Icon','asteria'),'class' => 'no-fancy iconselect' , 'std'=> array('icon-cogs')));
  152. //wysiwyg field
  153. $options_panel->addWysiwyg('block4_textarea_id',array('name'=> __('Block 4 Content','asteria'), 'std'=> ''));
  154.  
  155.  
  156.  
  157. //Welcome Text---------------------------------------
  158. $options_panel->addCheckbox('hide_welcmtxt',array('name'=> '','class' => 'show-hide', 'std' => true));
  159. $options_panel->Title(__('Welcome Text','asteria'));
  160.  
  161. //wysiwyg field
  162. $options_panel->addWysiwyg('welcm_textarea_id',array('name'=> __('Welcome Text','asteria'), 'std'=> ''));
  163. //Background Color
  164. $options_panel->addColor('welcome_color_id',array('name'=> __('Background Color ','asteria'), 'std'=> '#333333'));
  165.  
  166.  
  167.  
  168. //Frontpage Posts---------------------------------------
  169. $options_panel->addCheckbox('hide_posts',array('name'=> '','class' => 'show-hide', 'std' => true));
  170. $options_panel->Title(__('Frontpage Posts','asteria'));
  171. //wysiwyg field
  172. $options_panel->addWysiwyg('posts_title_id',array('name'=> __('Title &amp; Description','asteria'), 'std'=> ''));
  173.  
  174. //Front Page posts layout
  175. $options_panel->addRadio('front_layout_id',array('layout1'=>'Layout 1'),array('name'=> __('Posts layout','asteria'), 'std'=> array('layout1'), 'desc' => __('Select how you want to display posts on Front page','asteria')));
  176.  
  177.  
  178. /**
  179. * To Create a Conditional Block first create an array of fields (just like a repeater block
  180. * use the same functions as above but add true as a last param
  181. */
  182.  
  183.  
  184. $options_panel->addCheckbox('enable_cat',array('name'=> __('Display posts from a Category', 'asteria'),'class' => 'enablecat', 'std' => false));
  185. //taxonomy select field
  186. $options_panel->addTaxonomy('posts_cat_id',array('taxonomy' => 'category'),array('name'=> __('Category Name','asteria'),'class' => 'fancy inline-txt', 'std' => "1" ));
  187. //is_numeric
  188. $options_panel->addText('n_posts_field_id', array('name' => __('Number of Posts ','asteria'),'class' => 'inline-txt', 'std' => 9,'validate' => array( 'numeric' => array('param' => '','message' => __("must be numeric value","asteria")))));
  189.  
  190.  
  191.  
  192. //Tabs---------------------------------------
  193. $options_panel->Title(__('Tabs','asteria'));
  194.  
  195. //Location Map---------------------------------------
  196. $options_panel->Title(__('Location Map','asteria'));
  197.  
  198. //Call to Action---------------------------------------
  199. $options_panel->Title(__('Call to Action','asteria'));
  200.  
  201. //Frontpage Widgets Area---------------------------------------
  202. $options_panel->Title(__('Frontpage Widgets Area','asteria') );
  203.  
  204.  
  205. //sortable field
  206. $options_panel->addSortable('home_sort_id',array('1' => __('Blocks', 'asteria'),'2'=> __('Welcome Text', 'asteria'), '3'=> 'Posts'),array('name' => __('Frontpage Elements position','asteria'), 'desc' => __('Drag and Drop each element to reorder their position.','asteria')));
  207.  
  208.  
  209. /**
  210. * Close second tab
  211. */
  212. $options_panel->CloseTab();
  213.  
  214.  
  215.  
  216. /**
  217. * Open admin page 3rd tab
  218. */
  219. $options_panel->OpenTab('options_3');
  220. /**
  221. * Add fields to your admin page 3rd tab
  222. *
  223. * Editor options:
  224. * WYSIWYG (tinyMCE editor)
  225. * Syntax code editor (css,html,js,php)
  226. */
  227. //title
  228. $options_panel->Title(__("Slider Setup","asteria"));
  229.  
  230. //Slider Type
  231. $options_panel->addSelect('slider_type_id',array('nivo'=>'Nivo Slider','noslider'=>'Disable Slider'),array('name'=> __('Slider Type','asteria'), 'std'=> array('nivo')));
  232.  
  233. //Slider Paustime - is_numeric
  234. $options_panel->addText('n_slide_time_id', array('name' => __('Pause Time Between Each Slide ','asteria'), 'std' => 4000,'validate' => array( 'numeric' => array('param' => '','message' => __("must be numeric value","asteria")))));
  235.  
  236. //Slider Height
  237. $options_panel->addText('slide_height', array('name' => __('Slider Height ','asteria'), 'std'=> ''));
  238.  
  239. //Slider Title Font
  240. //Slider Font Size
  241. $options_panel->addText('slidefont_size_id', array('name' => __('Slide Font Style','asteria'), 'std'=> '' , 'class' => 'smalltxt'));
  242. //Slider Font Weight
  243. $options_panel->addSelect('slidefont_weight_id',array('normal'=>'Normal','bold'=>'Bold'),array('name'=> __('','asteria'), 'std'=> array('normal'), 'class' => 'no-fancy smalltxt'));
  244.  
  245. /*
  246. * To Create a reapeater Block first create an array of fields
  247. * use the same functions as above but add true as a last param
  248. */
  249. $repeater_fields[] = $options_panel->addText('re_text_field_id',array('name'=> __('Title ','asteria')),true);
  250. $repeater_fields[] = $options_panel->addImage('image_field_id',array('name'=> __('Image','asteria'),'preview_height' => 'auto', 'preview_width' => '300px'),true);
  251. $repeater_fields[] = $options_panel->addTextarea('re_textarea_field_id',array('name'=> __('Content ','asteria')),true);
  252. $repeater_fields[] = $options_panel->addText('re_link_field_id',array('name'=> __('Link ','asteria')),true);
  253. $repeater_fields[] = $options_panel->addRadio('slider_content_id',array('sldcontent1'=>'Layout 1','sldcontent2'=>'Layout 2','sldcontent3'=>'Layout 3'),array('name'=> __('Slide Text Layout','asteria'), 'std'=> array('sldcontent1')),true);
  254.  
  255. /*
  256. * Then just add the fields to the repeater block
  257. */
  258. //repeater block
  259. $options_panel->addRepeaterBlock('re_blockid',array('sortable' => true, 'inline' => false, 'name' => __('Create Slides','asteria'),'fields' => $repeater_fields));
  260.  
  261. /**
  262. * Close 3rd tab
  263. */
  264. $options_panel->CloseTab();
  265.  
  266.  
  267. /**
  268. * Open admin page 4th tab
  269. */
  270. $options_panel->OpenTab('options_4');
  271.  
  272. /**
  273. */
  274. //title
  275. $options_panel->Title(__("Style","asteria"));
  276. $options_panel->addParagraph(__("To change the color settings, Use the ","asteria"));
  277. //Logo Color
  278.  
  279. $options_panel->addColor('sec_color_id',array('name'=> __('Secondary Element background Color','asteria'), 'std' => '#2dcb73'));
  280. $options_panel->addColor('head_color_id',array('name'=> __('Header Background Color','asteria'), 'std' => '#333333'));
  281.  
  282.  
  283. $options_panel->addParagraph(__("<h3 style='margin-top:60px;'>Text Colors</h3>","asteria"));
  284. $options_panel->addColor('primtxt_color_id',array('name'=> __('Site wide Text Color','asteria'), 'std' => '#888888'));
  285. $options_panel->addColor('sectxt_color_id',array('name'=> __('Text Color on secondary elements','asteria'), 'std' => '#ffffff'));
  286. $options_panel->addColor('menutxt_color_id',array('name'=> __('Menu Text Color','asteria'), 'std' => '#ffffff'));
  287. $options_panel->addColor('leavreplytxt_color_id',array('name'=> __('"Leave a Reply" Text Color','asteria'), 'std' => '#333333'));
  288.  
  289. //ROUNDED CORNER
  290. $options_panel->addCheckbox('rounded_id',array('name'=> __('Rounded Corners','asteria'), 'std' => false));
  291.  
  292. $options_panel->addCheckbox('shadow_id',array('name'=> __('Drop Shadow','asteria'), 'std' => false));
  293.  
  294.  
  295. /**
  296. * Close 4th tab
  297. */
  298. $options_panel->CloseTab();
  299.  
  300.  
  301. /**
  302. * Open admin page 5th tab
  303. */
  304. $options_panel->OpenTab('options_5');
  305. //title
  306. $options_panel->Title(__("Typography Settings","asteria"));
  307.  
  308.  
  309. //Logo Font Family
  310. $options_panel->addText('logo_font_id', array('name' => __('Logo Style','asteria'), 'std'=> '' , 'class' => 'fontloader'));
  311. //Logo Font Size
  312. $options_panel->addText('logo_size_id', array('name' => __('','asteria'), 'std'=> '' , 'class' => 'smalltxt'));
  313. //Logo Weight
  314. $options_panel->addSelect('logo_weight_id',array('normal'=>'Normal','bold'=>'Bold'),array('name'=> __('','asteria'), 'std'=> array('normal'), 'class' => 'no-fancy smalltxt'));
  315. //Logo Color
  316. $options_panel->addColor('logo_color_id',array('name'=> __('','asteria'), 'std' => '#FFFFFF'));
  317.  
  318.  
  319. /**
  320. * Close 5th tab
  321. */
  322. $options_panel->CloseTab();
  323.  
  324.  
  325. /**
  326. * Open admin page 6th tab
  327. */
  328. $options_panel->OpenTab('options_6');
  329.  
  330. //title
  331. $options_panel->Title(__("Social Buttons","asteria"));
  332.  
  333. //checkbox field
  334. $options_panel->addCheckbox('social_single_id',array('name'=> __('Social Share Icons under Posts ','asteria'), 'std' => true));
  335.  
  336.  
  337.  
  338. //Facebook
  339. $options_panel->addText('facebook_field_id',array('name' => __('Facebook URL ','asteria')));
  340. //Twitter
  341. $options_panel->addText('twitter_field_id',array('name' => __('Twitter URL ','asteria')));
  342. //Google Plus
  343. $options_panel->addText('gplus_field_id',array('name' => __('Google Plus URL ','asteria')));
  344. //Youtube
  345. $options_panel->addText('youtube_field_id',array('name' => __('Youtube URL ','asteria')));
  346. //Flickr
  347. $options_panel->addText('flickr_field_id',array('name' => __('Flickr URL ','asteria')));
  348. //Linkedin
  349. $options_panel->addText('linkedin_field_id',array('name' => __('Linkedin URL ','asteria')));
  350. //Pinterest
  351. $options_panel->addText('pinterest_field_id',array('name' => __('Pinterest URL ','asteria')));
  352. //Tumblr
  353. $options_panel->addText('tumblr_field_id',array('name' => __('Tumblr URL ','asteria')));
  354. //Instagram
  355. $options_panel->addText('instagram_field_id',array('name' => __('Instagram URL ','asteria')));
  356. //RSS
  357. $options_panel->addText('rss_field_id',array('name' => __('RSS URL ','asteria')));
  358.  
  359.  
  360.  
  361. /**
  362. * Close 6th tab
  363. */
  364. $options_panel->CloseTab();
  365.  
  366. /**
  367. * Open admin page 7th tab
  368. */
  369. $options_panel->OpenTab('options_7');
  370.  
  371. //title
  372. $options_panel->Title(__("Miscellaneous Settings","asteria"));
  373.  
  374.  
  375. //Category, Archive Page posts layout
  376. $options_panel->addRadio('cat_layout_id',array('layout1'=>'Layout 1'),array('name'=> __('Category, Archive Page posts layout','asteria'), 'std'=> array('layout1'), 'desc' => __('Select how you want to display posts on category and archive pages','asteria')));
  377.  
  378. //checkbox field
  379. $options_panel->addCheckbox('post_info_id',array('name'=> __('Show Post Info - Date, Author Name, Categories etc..','asteria'), 'std' => true));
  380. //checkbox field
  381. $options_panel->addCheckbox('post_nextprev_id',array('name'=> __('Show Next and Previous Posts','asteria'), 'std' => true));
  382. //checkbox field
  383. $options_panel->addCheckbox('post_comments_id',array('name'=> __('Show Comments','asteria'), 'std' => true));
  384. //checkbox field
  385. $options_panel->addCheckbox('post_lightbox_id',array('name'=> __('Lightbox Feature','asteria'), 'std' => true));
  386.  
  387. //taxonomy select field
  388. $options_panel->addTaxonomy('blog_cat_id',array('taxonomy' => 'category'),array('name'=> __('Display Blog Posts from a selected Category','asteria'),'class' => 'fancy' , 'desc' => __("If you have setup a Blog page with Blog Page Template, choose a category to get the posts from","asteria")));
  389.  
  390.  
  391.  
  392. /**
  393. * Close 7th tab
  394. */
  395. $options_panel->CloseTab();
  396.  
  397.  
  398. /**
  399. * Open 8th tab
  400. */
  401. $options_panel->OpenTab('options_8');
  402.  
  403. //title
  404. $options_panel->Title(__("Mobile Layout","asteria"));
  405. $options_panel->addParagraph(__("Checking each of these below option will only hide these elements from the Mobile layout.", "asteria"));
  406.  
  407. //checkbox field
  408. $options_panel->addCheckbox('hide_mob_slide',array('name'=> __('Hide Slider','asteria'),'class' => 'no-fancy', 'std' => false));
  409. $options_panel->addCheckbox('hide_mob_blocks',array('name'=> __('Hide Front Page Blocks','asteria'),'class' => 'no-fancy', 'std' => false));
  410. $options_panel->addCheckbox('hide_mob_welcm',array('name'=> __('Hide Front Page Welcome Text','asteria'),'class' => 'no-fancy', 'std' => false));
  411. $options_panel->addCheckbox('hide_mob_frontposts',array('name'=> __('Hide Front Page Posts','asteria'),'class' => 'no-fancy', 'std' => false));
  412. $options_panel->addCheckbox('hide_mob_footwdgt',array('name'=> __('Hide Footer Widgets','asteria'),'class' => 'no-fancy', 'std' => false));
  413. $options_panel->addCheckbox('hide_mob_rightsdbr',array('name'=> __('Hide Right Sidebar','asteria'),'class' => 'no-fancy', 'std' => false));
  414.  
  415.  
  416. $options_panel->CloseTab();
  417. /**
  418. * Close 8th tab
  419.  
  420.  
  421. /**
  422. * Open 8th tab
  423. */
  424. $options_panel->OpenTab('options_9');
  425.  
  426. //title
  427. $options_panel->Title(__("Custom CSS","asteria"));
  428.  
  429. //textarea field
  430. $options_panel->addTextarea('css_textarea_id',array('name'=> __('Write your custom css here ','asteria')));
  431.  
  432. $options_panel->CloseTab();
  433. /**
  434. * Close 8th tab
  435. */
  436.  
  437.  
  438. /**
  439. * Open 10th tab
  440. */
  441. $options_panel->OpenTab('options_10');
  442.  
  443. //title
  444. $options_panel->Title(__("Maintenance Mode","asteria"));
  445.  
  446. //checkbox field
  447. $options_panel->addCheckbox('offline_id',array('name'=> __('Maintenance Mode','asteria'), 'std' => false));
  448. //title
  449. $options_panel->Title(__("Back Time","asteria"));
  450. //date field
  451. $options_panel->addDate('offline_date_id',array('name'=> __('Date ','asteria'), 'std' => '18 September, 2013'));
  452. //Time field
  453. $options_panel->addTime('offline_time_id',array('name'=> __('Time ','asteria'), 'std' => '06:06'));
  454.  
  455. $options_panel->addText('offline_text_id', array('name'=> __('Title ','asteria'), 'std'=> ''));
  456.  
  457. //wysiwyg field
  458. $options_panel->addWysiwyg('offline_msg_id',array('name'=> __('Message ','asteria'), 'std'=> '' , 'desc' => __('wysiwyg field description','asteria')));
  459.  
  460.  
  461. $options_panel->CloseTab();
  462. /**
  463. * Close 10th tab
  464. */
  465.  
  466. /**
  467. * Open 11th tab
  468. */
  469. $options_panel->OpenTab('options_11');
  470.  
  471. //title
  472. $options_panel->Title(__("Import Export","asteria"));
  473.  
  474. /**
  475. * add import export functionallty
  476. */
  477. $options_panel->addImportExport();
  478.  
  479. $options_panel->CloseTab();
  480. /**
  481. * Close 11th tab
  482. */
  483.  
  484.  
  485. /**
  486. * Open 12th tab
  487. */
  488. $options_panel->OpenTab('options_12');
  489.  
  490. //title
  491. $options_panel->Title(__("About The Theme","asteria"));
  492.  
  493. $options_panel->CloseTab();
  494. /**
  495. * Close 12th tab
  496. */
  497.  
  498.  
  499. /**
  500. * Open 13th tab
  501. */
  502. $options_panel->OpenTab('options_13');
  503.  
  504. //title
  505. $options_panel->Title(__("Upgrade to PRO","asteria"));
  506.  
  507. $options_panel->CloseTab();
  508. /**
  509. * Close 13th tab
  510. */
  511.  
  512.  
  513. /**
  514. * Open 8th tab
  515. */
  516. $options_panel->OpenTab('options_14');
  517.  
  518. //title
  519. $options_panel->Title(__("Documentation","asteria"));
  520.  
  521. $options_panel->CloseTab();
  522. /**
  523. * Close 8th tab
  524. */
  525.  
  526.  
  527. $options_panel->CloseTab();
  528.  
  529. //Now Just for the fun I'll add Help tabs
  530. $options_panel->HelpTab(array(
  531. 'id' =>'tab_id',
  532. 'title' => __('My help tab title','asteria'),
  533. 'content' =>'<p>'.__('This is my Help Tab content','asteria').'</p>'
  534. ));
  535. $options_panel->HelpTab(array(
  536. 'id' => 'tab_id2',
  537. 'title' => __('My 2nd help tab title','asteria'),
  538. 'callback' => 'help_tab_callback_demo'
  539. ));
  540.  
  541. //help tab callback function
  542. function help_tab_callback_demo(){
  543. echo '<p>'.__('This is my 2nd Help Tab content from a callback function','asteria').'</p>';
  544.  
  545. }
  546.  
  547. function admin_pageplugin_activate(){
  548. $option_default_values = array(
  549. "block1_text_id" => "Lorem Ipsum",
  550. "block2_text_id" => "Lorem Ipsum",
  551. "block3_text_id" => "Lorem Ipsum",
  552. "block4_text_id" => "Lorem Ipsum",
  553. "slide_height" => "550px",
  554. "slidefont_size_id" => "60px",
  555. "logo_font_id" => "Cinzel+Decorative:regular",
  556. "logo_size_id" => "60px",
  557. "content_size_id" => "14px",
  558. "menu_size_id" => "18px",
  559. "offline_text_id" => "Maintenance Mode",
  560. "offline_msg_id" => "We are currently undergoing maintenance. Please try back after",
  561. "block1_textarea_id" => "Lorem ipsum dolor sit amet, consectetur dol adipiscing elit. Nam nec rhoncus risus. In ultrices lacinia ipsum, posuere faucibus velit bibe.",
  562. "block2_textarea_id" => "Lorem ipsum dolor sit amet, consectetur dol adipiscing elit. Nam nec rhoncus risus. In ultrices lacinia ipsum, posuere faucibus velit bibe.",
  563. "block3_textarea_id" => "Lorem ipsum dolor sit amet, consectetur dol adipiscing elit. Nam nec rhoncus risus. In ultrices lacinia ipsum, posuere faucibus velit bibe.",
  564. "block4_textarea_id" => "Lorem ipsum dolor sit amet, consectetur dol adipiscing elit. Nam nec rhoncus risus. In ultrices lacinia ipsum, posuere faucibus velit bibe.",
  565. "welcm_textarea_id" => "Lorem ipsum dolor sit amet, consectetur dol adipiscing elit. Nam nec rhoncus risus. In ultrices lacinia ipsum, posuere faucibus velit bibe.",
  566. "posts_title_id" => "<h2 style='text-align: center;'><span style='color: #e2341d;'>Check Out Our Portfolio</span></h2><p style='text-align: center;'>The Very recent work for our clients</p>",
  567.  
  568. );
  569.  
  570.  
  571. update_option("asteria_options",$option_default_values);
  572. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement