Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.79 KB | None | 0 0
  1. <?php
  2.  
  3. add_action('cmb2_admin_init',function(){
  4.  
  5. //post page
  6.  
  7. $kta = new_cmb2_box(array(
  8.  
  9. 'title' =>'Video',
  10. 'id' =>'ktavideo',
  11. 'object_types' =>array('post')
  12. ));
  13.  
  14. $kta-> add_field(array(
  15. 'name' =>'Background image',
  16. 'id' =>'dflt-bg-img',
  17. 'type' =>'file',
  18. 'description' =>'select here'
  19.  
  20. ));
  21.  
  22. $kta-> add_field(array(
  23. 'name' =>'Background title',
  24. 'id' =>'dflt-bg-title',
  25. 'type' =>'text',
  26. 'description' =>'type here'
  27.  
  28. ));
  29.  
  30. $kta-> add_field(array(
  31. 'name' =>'Background subtitle',
  32. 'id' =>'dflt-bg-sub-title',
  33. 'type' =>'wysiwyg',
  34. 'description' =>'type here'
  35.  
  36. ));
  37.  
  38. $kta-> add_field(array(
  39. 'name' =>'Short Description',
  40. 'id' =>'blog_short_des',
  41. 'type' =>'textarea',
  42. 'description' =>'type here'
  43.  
  44. ));
  45.  
  46. $kta-> add_field(array(
  47. 'name' =>'Video link',
  48. 'id' =>'video-link',
  49. 'type' =>'oembed',
  50. 'description' =>'Put an embed link'
  51.  
  52. ));
  53.  
  54.  
  55.  
  56.  
  57. //homepage
  58.  
  59.  
  60. //background video
  61.  
  62. $kta = new_cmb2_box(array(
  63.  
  64. 'title' =>'Background video',
  65. 'id' =>'bgvideo',
  66. 'object_types' => array( 'page' ), // post type
  67. 'show_on' => array( 'key' => 'page-template', 'value' => 'homepage.php' ),
  68. ));
  69.  
  70. $kta-> add_field(array(
  71. 'name' =>'Select a video',
  72. 'id' =>'hbgvdo',
  73. 'type' =>'file',
  74. 'description' =>'select here (Video should be in mp4 format)'
  75.  
  76. ));
  77.  
  78. $kta-> add_field(array(
  79. 'name' =>'video title',
  80. 'id' =>'bvideotitle',
  81. 'type' =>'textarea',
  82. 'description' =>'type here'
  83.  
  84. ));
  85.  
  86.  
  87. //welcome note
  88.  
  89. $kta = new_cmb2_box(array(
  90.  
  91. 'title' =>'Welcome note',
  92. 'id' =>'hwelcome',
  93. 'object_types' => array( 'page' ), // post type
  94. 'show_on' => array( 'key' => 'page-template', 'value' => 'homepage.php' ),
  95. ));
  96.  
  97. $kta-> add_field(array(
  98. 'name' =>'Welcome text',
  99. 'id' =>'wtxt',
  100. 'type' =>'textarea',
  101. 'description' =>'type here'
  102.  
  103. ));
  104.  
  105.  
  106. //feature content
  107.  
  108. $kta = new_cmb2_box(array(
  109.  
  110. 'title' =>'Feature content',
  111. 'id' =>'fcontent',
  112. 'object_types' => array( 'page' ), // post type
  113. 'show_on' => array( 'key' => 'page-template', 'value' => 'homepage.php' ),
  114. ));
  115.  
  116. $kta-> add_field(array(
  117. 'name' =>'Iframe video',
  118. 'id' =>'ifrmvdo',
  119. 'type' =>'oembed',
  120. 'description' =>'paste your video embed link here'
  121.  
  122. ));
  123.  
  124. $kta-> add_field(array(
  125. 'name' =>'First feature service title',
  126. 'id' =>'ffst',
  127. 'type' =>'text',
  128. 'description' =>'type here'
  129.  
  130. ));
  131.  
  132. $kta-> add_field(array(
  133. 'name' =>'First feature service subtitle',
  134. 'id' =>'ffss',
  135. 'type' =>'text',
  136. 'description' =>'type here'
  137.  
  138. ));
  139.  
  140. $kta-> add_field(array(
  141. 'name' =>'First feature service Image',
  142. 'id' =>'ffsi',
  143. 'type' =>'file',
  144. 'description' =>'select here'
  145.  
  146. ));
  147.  
  148. $kta-> add_field(array(
  149. 'name' =>'First feature service URL',
  150. 'id' =>'ffsurl',
  151. 'type' =>'text',
  152. 'description' =>'type here'
  153.  
  154. ));
  155.  
  156. $kta-> add_field(array(
  157. 'name' =>'Second feature service title',
  158. 'id' =>'sfst',
  159. 'type' =>'text',
  160. 'description' =>'type here'
  161.  
  162. ));
  163.  
  164. $kta-> add_field(array(
  165. 'name' =>'Second feature service subtitle',
  166. 'id' =>'sfss',
  167. 'type' =>'text',
  168. 'description' =>'type here'
  169.  
  170. ));
  171.  
  172. $kta-> add_field(array(
  173. 'name' =>'Second feature service Image',
  174. 'id' =>'sfsi',
  175. 'type' =>'file',
  176. 'description' =>'select here'
  177.  
  178. ));
  179.  
  180. $kta-> add_field(array(
  181. 'name' =>'Second feature service URL',
  182. 'id' =>'sfsurl',
  183. 'type' =>'text',
  184. 'description' =>'type here'
  185.  
  186. ));
  187.  
  188.  
  189. //testimonial
  190.  
  191. $kta = new_cmb2_box(array(
  192.  
  193. 'title' =>'Testimonial subtitle',
  194. 'id' =>'testsubtitle',
  195. 'object_types' => array('testimonial' ), // post type
  196. ));
  197.  
  198. $kta-> add_field(array(
  199. 'name' =>'Subtitle',
  200. 'id' =>'tesssubss',
  201. 'type' =>'text',
  202. 'description' =>'type here'
  203.  
  204. ));
  205.  
  206. //KTS Slider
  207.  
  208. //testimonial
  209.  
  210. $kta = new_cmb2_box(array(
  211.  
  212. 'title' =>'KTA slider',
  213. 'id' =>'ktsl',
  214. 'object_types' => array( 'kta-slider' ), // post type
  215. ));
  216.  
  217.  
  218.  
  219. $kta-> add_field(array(
  220. 'name' =>'Slider title',
  221. 'id' =>'ktslititle',
  222. 'type' =>'text',
  223. 'description' =>'type here'
  224.  
  225. ));
  226.  
  227.  
  228. $kta-> add_field(array(
  229. 'name' =>'Slider subtitle',
  230. 'id' =>'ktsslsubtitle',
  231. 'type' =>'text',
  232. 'description' =>'type here'
  233.  
  234. ));
  235.  
  236.  
  237. //Default page
  238.  
  239. $kta = new_cmb2_box(array(
  240.  
  241. 'title' =>'Background content',
  242. 'id' =>'dflt_gb_contents',
  243. 'object_types' => array( 'page' ), // post type
  244. // 'show_on' => array( 'key' => 'page-template', 'value' => 'page.php' ),
  245. ));
  246.  
  247.  
  248.  
  249. $kta-> add_field(array(
  250. 'name' =>'Background image',
  251. 'id' =>'dflt-bg-img',
  252. 'type' =>'file',
  253. 'description' =>'select here'
  254.  
  255. ));
  256.  
  257. $kta-> add_field(array(
  258. 'name' =>'Background title',
  259. 'id' =>'dflt-bg-title',
  260. 'type' =>'text',
  261. 'description' =>'type here'
  262.  
  263. ));
  264.  
  265. $kta-> add_field(array(
  266. 'name' =>'Background subtitle',
  267. 'id' =>'dflt-bg-sub-title',
  268. 'type' =>'wysiwyg',
  269. 'description' =>'type here'
  270.  
  271. ));
  272.  
  273.  
  274.  
  275. //About us page
  276.  
  277. $kta = new_cmb2_box(array(
  278.  
  279. 'title' =>'KTA Tab',
  280. 'id' =>'kttab',
  281. 'object_types' => array('kta-tab' ), // post type
  282. ));
  283.  
  284.  
  285.  
  286. $kta-> add_field(array(
  287. 'name' =>'Tab title',
  288. 'id' =>'ktstabtitle',
  289. 'type' =>'text',
  290. 'description' =>'type here'
  291.  
  292. ));
  293.  
  294. $kta-> add_field(array(
  295. 'name' =>'Tab content',
  296. 'id' =>'ktstabcontent',
  297. 'type' =>'textarea',
  298. 'description' =>'type here'
  299.  
  300. ));
  301.  
  302.  
  303.  
  304.  
  305. $kta = new_cmb2_box(array(
  306.  
  307. 'title' =>'Athlete page contents',
  308. 'id' =>'atlpcntnts',
  309. 'object_types' => array( 'page' ), // post type
  310. 'show_on' => array( 'key' => 'page-template', 'value' => 'athlete.php' ),
  311. ));
  312.  
  313. $kta-> add_field(array(
  314. 'name' =>'Text section title',
  315. 'id' =>'athtxttitle',
  316. 'type' =>'text',
  317. 'description' =>'type here'
  318.  
  319. ));
  320.  
  321. $kta-> add_field(array(
  322. 'name' =>'Text section subtitle',
  323. 'id' =>'athtxtsubs',
  324. 'type' =>'textarea',
  325. 'description' =>'type here'
  326.  
  327. ));
  328.  
  329. $kta-> add_field(array(
  330. 'name' =>'Youtube video',
  331. 'id' =>'ath-video',
  332. 'type' =>'oembed',
  333. 'description' =>'paste embed link here'
  334.  
  335. ));
  336.  
  337. $kta-> add_field(array(
  338. 'name' =>'Gallery',
  339. 'id' =>'ath-gall',
  340. 'type' =>'file_list',
  341. 'description' =>'select images'
  342.  
  343. ));
  344.  
  345.  
  346. $kta = new_cmb2_box(array(
  347.  
  348. 'title' =>'Stories',
  349. 'id' =>'ath_stories',
  350. 'object_types' => array( 'page' ), // post type
  351. 'show_on' => array( 'key' => 'page-template', 'value' => 'athlete.php' ),
  352. ));
  353.  
  354. $kta-> add_field(array(
  355. 'name' =>'Story Image',
  356. 'id' =>'ath-story-imgsss',
  357. 'type' =>'file',
  358. 'description' =>'select image'
  359.  
  360. ));
  361.  
  362. $kta-> add_field(array(
  363. 'name' =>'Story Title',
  364. 'id' =>'ath-story-title',
  365. 'type' =>'text',
  366. 'description' =>'Type here'
  367.  
  368. ));
  369.  
  370. $kta-> add_field(array(
  371. 'name' =>'Story content',
  372. 'id' =>'ath-story-content',
  373. 'type' =>'textarea',
  374. 'description' =>'Type here'
  375.  
  376. ));
  377.  
  378. $kta-> add_field(array(
  379. 'name' =>'Story link',
  380. 'id' =>'ath-story-linkss',
  381. 'type' =>'text_url',
  382. 'description' =>'paste your link here'
  383.  
  384. ));
  385.  
  386. //FAQ
  387.  
  388. $kta = new_cmb2_box(array(
  389.  
  390. 'title' =>'FAQ',
  391. 'id' =>'kkssfazqq',
  392. 'object_types' => array( 'kta-faq' ), // post type
  393. ));
  394.  
  395. $kta-> add_field(array(
  396. 'name' =>'Questions',
  397. 'id' =>'ktafaqques',
  398. 'type' =>'text',
  399. 'description' =>'type here'
  400.  
  401. ));
  402.  
  403. $kta-> add_field(array(
  404. 'name' =>'Answer',
  405. 'id' =>'ktsfaqanswer',
  406. 'type' =>'textarea',
  407. 'description' =>'type here'
  408.  
  409. ));
  410.  
  411.  
  412.  
  413. $kta = new_cmb2_box(array(
  414.  
  415. 'title' =>'Leisure page contents',
  416. 'id' =>'leipcntnts',
  417. 'object_types' => array( 'page' ), // post type
  418. 'show_on' => array( 'key' => 'page-template', 'value' => 'leisure.php' ),
  419. ));
  420.  
  421. $kta-> add_field(array(
  422. 'name' =>'Text section title',
  423. 'id' =>'leisuretxtsectioontitle',
  424. 'type' =>'text',
  425. 'description' =>'type here'
  426.  
  427. ));
  428.  
  429. $kta-> add_field(array(
  430. 'name' =>'Text section subtitle',
  431. 'id' =>'leisecsubttittle',
  432. 'type' =>'textarea',
  433. 'description' =>'type here'
  434.  
  435. ));
  436.  
  437. $kta-> add_field(array(
  438. 'name' =>'Youtube video',
  439. 'id' =>'leisure-video',
  440. 'type' =>'oembed',
  441. 'description' =>'paste embed link here'
  442.  
  443. ));
  444.  
  445. $kta-> add_field(array(
  446. 'name' =>'Gallery',
  447. 'id' =>'lei-gall',
  448. 'type' =>'file_list',
  449. 'description' =>'select images'
  450.  
  451. ));
  452. //leisure stories
  453.  
  454. $kta = new_cmb2_box(array(
  455.  
  456. 'title' =>'Stories',
  457. 'id' =>'leisure_main_stories',
  458. 'object_types' => array( 'page' ), // post type
  459. 'show_on' => array( 'key' => 'page-template', 'value' => 'leisure.php' ),
  460. ));
  461.  
  462. $kta-> add_field(array(
  463. 'name' =>'Story Image',
  464. 'id' =>'leisure-story-imgsss',
  465. 'type' =>'file',
  466. 'description' =>'select image'
  467.  
  468. ));
  469.  
  470. $kta-> add_field(array(
  471. 'name' =>'Story Title',
  472. 'id' =>'leisure-story-title',
  473. 'type' =>'text',
  474. 'description' =>'Type here'
  475.  
  476. ));
  477.  
  478. $kta-> add_field(array(
  479. 'name' =>'Story content',
  480. 'id' =>'leisure-story-content',
  481. 'type' =>'textarea',
  482. 'description' =>'Type here'
  483.  
  484. ));
  485.  
  486. $kta-> add_field(array(
  487. 'name' =>'Story link',
  488. 'id' =>'leisure-story-linkss',
  489. 'type' =>'text_url',
  490. 'description' =>'paste your link here'
  491.  
  492. ));
  493.  
  494.  
  495. //contact page
  496.  
  497. $kta = new_cmb2_box(array(
  498.  
  499. 'title' =>'Background contents',
  500. 'id' =>'con_bg_contents',
  501. 'object_types' => array( 'page' ), // post type
  502. 'show_on' => array( 'key' => 'page-template', 'value' => 'contact.php' ),
  503. ));
  504.  
  505.  
  506. $kta-> add_field(array(
  507. 'name' =>'Quick contact text',
  508. 'id' =>'quick_con_text',
  509. 'type' =>'textarea',
  510. 'description' =>'type here'
  511.  
  512. ));
  513.  
  514. $kta-> add_field(array(
  515. 'name' =>'Enrolement text',
  516. 'id' =>'con_enrolement_text',
  517. 'type' =>'textarea',
  518. 'description' =>'type here'
  519.  
  520. ));
  521.  
  522.  
  523.  
  524. $kta = new_cmb2_box(array(
  525.  
  526. 'title' =>'Enrolement tab',
  527. 'id' =>'con-en-tabs',
  528. 'object_types' => array( 'page' ), // post type
  529. 'show_on' => array( 'key' => 'page-template', 'value' => 'contact.php' ),
  530. ));
  531.  
  532. $kta-> add_field(array(
  533. 'name' =>'Actively enroll title',
  534. 'id' =>'con_actively_title',
  535. 'type' =>'text',
  536. 'description' =>'type here'
  537.  
  538. ));
  539.  
  540. $kta-> add_field(array(
  541. 'name' =>'Actively enroll subtitle',
  542. 'id' =>'con_actively_subtitle',
  543. 'type' =>'textarea',
  544. 'description' =>'type here'
  545.  
  546. ));
  547.  
  548. $kta-> add_field(array(
  549. 'name' =>'Free trial title',
  550. 'id' =>'con_free_title',
  551. 'type' =>'text',
  552. 'description' =>'type here'
  553.  
  554. ));
  555.  
  556. $kta-> add_field(array(
  557. 'name' =>'Free trial subtitle',
  558. 'id' =>'con_free_subtitle',
  559. 'type' =>'textarea',
  560. 'description' =>'type here'
  561.  
  562. ));
  563.  
  564. $kta-> add_field(array(
  565. 'name' =>'Enrolement 3rd Tab title',
  566. 'id' =>'con_enrol_extra_title',
  567. 'type' =>'text',
  568. 'description' =>'type here'
  569.  
  570. ));
  571.  
  572. $kta-> add_field(array(
  573. 'name' =>'Enrolement 3rd Tab Content',
  574. 'id' =>'con_enrol_extra_cont',
  575. 'type' =>'textarea',
  576. 'description' =>'type here'
  577.  
  578. ));
  579.  
  580.  
  581.  
  582.  
  583.  
  584. //Register page
  585.  
  586. $kta = new_cmb2_box(array(
  587.  
  588. 'title' =>'Background contents',
  589. 'id' =>'reg_bg_contents',
  590. 'object_types' => array( 'page' ), // post type
  591. 'show_on' => array( 'key' => 'page-template', 'value' => 'register.php' ),
  592. ));
  593.  
  594.  
  595. $kta-> add_field(array(
  596. 'name' =>'Quick contact text',
  597. 'id' =>'quick_reg_text',
  598. 'type' =>'textarea',
  599. 'description' =>'type here'
  600.  
  601. ));
  602.  
  603. $kta-> add_field(array(
  604. 'name' =>'Enrolement text',
  605. 'id' =>'reg_enrolement_text',
  606. 'type' =>'textarea',
  607. 'description' =>'type here'
  608.  
  609. ));
  610.  
  611.  
  612.  
  613. $kta = new_cmb2_box(array(
  614.  
  615. 'title' =>'Enrolement tab',
  616. 'id' =>'reg-en-tabs',
  617. 'object_types' => array( 'page' ), // post type
  618. 'show_on' => array( 'key' => 'page-template', 'value' => 'register.php' ),
  619. ));
  620.  
  621. $kta-> add_field(array(
  622. 'name' =>'Actively enroll title',
  623. 'id' =>'reg_actively_title',
  624. 'type' =>'text',
  625. 'description' =>'type here'
  626.  
  627. ));
  628.  
  629. $kta-> add_field(array(
  630. 'name' =>'Actively enroll subtitle',
  631. 'id' =>'reg_actively_subtitle',
  632. 'type' =>'textarea',
  633. 'description' =>'type here'
  634.  
  635. ));
  636.  
  637. $kta-> add_field(array(
  638. 'name' =>'Free trial title',
  639. 'id' =>'reg_free_title',
  640. 'type' =>'text',
  641. 'description' =>'type here'
  642.  
  643. ));
  644.  
  645. $kta-> add_field(array(
  646. 'name' =>'Free trial subtitle',
  647. 'id' =>'reg_free_subtitle',
  648. 'type' =>'textarea',
  649. 'description' =>'type here'
  650.  
  651. ));
  652.  
  653. $kta-> add_field(array(
  654. 'name' =>'Enrolement 3rd Tab title',
  655. 'id' =>'reg_enrol_extra_title',
  656. 'type' =>'text',
  657. 'description' =>'type here'
  658.  
  659. ));
  660.  
  661. $kta-> add_field(array(
  662. 'name' =>'Enrolement 3rd Tab Content',
  663. 'id' =>'reg_enrol_extra_cont',
  664. 'type' =>'textarea',
  665. 'description' =>'type here'
  666.  
  667. ));
  668.  
  669.  
  670.  
  671. // Accordion
  672. $kta = new_cmb2_box(array(
  673. 'title' => __( 'FAQ List', 'kta' ),
  674. 'id' => 'reg_kta_accordion_list',
  675. 'object_types' => array( 'page' ),
  676. 'show_on' => array( 'key' => 'page-template', 'value' => 'register.php' ),
  677. ));
  678. $reg_group_field_id_accordion = $kta->add_field(array(
  679. 'id' => 'reg_kta_accordion_list_group',
  680. 'type' => 'group',
  681. 'options' => array(
  682. 'group_title' => __( 'FAQ Item #{#}', 'kta' ),
  683. 'add_button' => __( 'Add Another Item', 'kta' ),
  684. 'remove_button' => __( 'Remove Item', 'kta' ),
  685. 'shortable' => true,
  686. 'closed' => true
  687. )
  688. ));
  689.  
  690. $kta->add_group_field( $reg_group_field_id_accordion, array(
  691. 'name' => __( 'FAQ Nav Title', 'kta' ),
  692. 'type' => 'text',
  693. 'id' => 'reg_kta_accordion_nav_title'
  694. ) );
  695.  
  696. $kta->add_group_field( $reg_group_field_id_accordion, array(
  697. 'name' => __( 'FAQ Content', 'kta' ),
  698. 'type' => 'wysiwyg',
  699. 'id' => 'reg_kta_accordion_content'
  700. ) );
  701.  
  702.  
  703.  
  704.  
  705. //Gallery post type
  706. $kta = new_cmb2_box(array(
  707.  
  708. 'title' =>'Gallery contents',
  709. 'id' =>'main-kta-gallery',
  710. 'object_types' => array( 'page' ), // post type
  711. 'show_on' => array( 'key' => 'page-template', 'value' => 'gallery.php' ),
  712. ));
  713.  
  714. $group_field_id = $kta->add_field(array(
  715. 'id' => '_kta_gallery_page_group',
  716. 'type' => 'group',
  717. 'options' => array(
  718. 'group_title' => __( 'Gallery Item #{#}', 'kta' ),
  719. 'add_button' => __( 'Add Another Item', 'kta' ),
  720. 'remove_button' => __( 'Remove Item', 'kta' ),
  721. 'shortable' => true,
  722. 'closed' => true
  723. )
  724. ));
  725. $kta->add_group_field( $group_field_id, array(
  726. 'name' =>'Gallery title',
  727. 'id' =>'gall-img-title',
  728. 'type' =>'text',
  729. 'description' =>'type here'
  730.  
  731. ));
  732.  
  733. $kta->add_group_field( $group_field_id, array(
  734. 'name' =>'Gallery image',
  735. 'id' =>'gall-imgage',
  736. 'type' =>'file',
  737. 'description' =>'select from here'
  738.  
  739. ));
  740.  
  741. $kta->add_group_field( $group_field_id, array(
  742. 'name' =>'Gallery video ID',
  743. 'id' =>'gall-video',
  744. 'type' =>'text',
  745. 'description' =>'paste youtube video ID Only here'
  746.  
  747. ));
  748. $kta->add_group_field( $group_field_id, array(
  749. 'name' =>'Gallery Category',
  750. 'id' =>'gall-img-cat',
  751. 'type' =>'text',
  752. 'description' =>'type here'
  753.  
  754. ));
  755.  
  756.  
  757. // Gallery Slider
  758. $kta = new_cmb2_box(array(
  759. 'title' => __( 'Gallery Slider', 'kta' ),
  760. 'id' => '_kta_gallery_slider',
  761. 'object_types' => array( 'page' ), // post type
  762. ));
  763.  
  764. $group_field_id = $kta->add_field(array(
  765. 'id' => '_kta_gallery_slider_group',
  766. 'type' => 'group',
  767. 'options' => array(
  768. 'group_title' => __( 'Gallery Item #{#}', 'kta' ),
  769. 'add_button' => __( 'Add Another Item', 'kta' ),
  770. 'remove_button' => __( 'Remove Item', 'kta' ),
  771. 'shortable' => true,
  772. 'closed' => true
  773. )
  774. ));
  775.  
  776. $kta->add_group_field( $group_field_id, array(
  777. 'name' => __( 'Title', 'kta' ),
  778. 'type' => 'text',
  779. 'id' => '_title'
  780. ) );
  781.  
  782.  
  783. $kta->add_group_field( $group_field_id, array(
  784. 'name' => __( 'Subtitle', 'kta' ),
  785. 'type' => 'text',
  786. 'id' => '_subtitle'
  787. ) );
  788.  
  789. $kta->add_group_field( $group_field_id, array(
  790. 'name' => __( 'Thumbnail', 'kta' ),
  791. 'type' => 'file',
  792. 'id' => '_thumbnail'
  793. ) );
  794.  
  795. $kta->add_group_field( $group_field_id, array(
  796. 'name' => __( 'Gallery URL', 'kta' ),
  797. 'type' => 'text',
  798. 'id' => '_gallery_vid_id'
  799. ) );
  800.  
  801. // Tab
  802. $kta = new_cmb2_box(array(
  803. 'title' => __( 'Tab List', 'kta' ),
  804. 'id' => '_kta_tab_list',
  805. 'object_types' => array( 'page' ),
  806. 'show_on' => array( 'key' => 'page-template', 'value' => 'about.php' )
  807. ));
  808. $group_field_id_tab = $kta->add_field(array(
  809. 'id' => '_kta_tab_list_group',
  810. 'type' => 'group',
  811. 'options' => array(
  812. 'group_title' => __( 'Tab Item #{#}', 'kta' ),
  813. 'add_button' => __( 'Add Another Item', 'kta' ),
  814. 'remove_button' => __( 'Remove Item', 'kta' ),
  815. 'shortable' => true,
  816. 'closed' => true
  817. )
  818. ));
  819.  
  820. $kta->add_group_field( $group_field_id_tab, array(
  821. 'name' => __( 'Tab Nav Title', 'kta' ),
  822. 'type' => 'text',
  823. 'id' => '_kta_tab_nav_title'
  824. ) );
  825.  
  826. $kta->add_group_field( $group_field_id_tab, array(
  827. 'name' => __( 'Tab Content', 'kta' ),
  828. 'type' => 'wysiwyg',
  829. 'id' => '_kta_tab_content'
  830. ) );
  831.  
  832. // Accordion
  833. $kta = new_cmb2_box(array(
  834. 'title' => __( 'Accordion List', 'kta' ),
  835. 'id' => '_kta_accordion_list',
  836. 'object_types' => array( 'page' ),
  837. 'show_on' => array( 'key' => 'page-template', 'value' => array( 'athlete.php', 'leisure.php' ) )
  838. ));
  839. $group_field_id_accordion = $kta->add_field(array(
  840. 'id' => '_kta_accordion_list_group',
  841. 'type' => 'group',
  842. 'options' => array(
  843. 'group_title' => __( 'Accordion Item #{#}', 'kta' ),
  844. 'add_button' => __( 'Add Another Item', 'kta' ),
  845. 'remove_button' => __( 'Remove Item', 'kta' ),
  846. 'shortable' => true,
  847. 'closed' => true
  848. )
  849. ));
  850.  
  851. $kta->add_group_field( $group_field_id_accordion, array(
  852. 'name' => __( 'Accordion Nav Title', 'kta' ),
  853. 'type' => 'text',
  854. 'id' => '_kta_accordion_nav_title'
  855. ) );
  856.  
  857. $kta->add_group_field( $group_field_id_accordion, array(
  858. 'name' => __( 'Accordion Content', 'kta' ),
  859. 'type' => 'wysiwyg',
  860. 'id' => '_kta_accordion_content'
  861. ) );
  862.  
  863.  
  864.  
  865. // Member Page Metabox
  866.  
  867. $kta['service_list_one_metabox'] = array(
  868. 'id' => 'service_list_one_metabox',
  869. 'title' => __( 'Service Options 1', 'opm' ),
  870. 'object_types' => array( 'page' ), // Post type
  871. 'context' => 'normal',
  872. 'priority' => 'high',
  873. 'show_on' => array( 'key' => 'page-template', 'value' => array( 'member.php' ) )
  874. 'show_names' => true, // Show field names on the left
  875.  
  876. 'fields' => array(
  877. array(
  878. 'name' => __( 'Service Nav title', 'dgj' ),
  879. 'id' => 'service_nav_title_one',
  880. 'type' => 'text'
  881. ),
  882. array(
  883. 'name' => __( 'Service Meta', 'dgj' ),
  884. 'id' => 'service_meta_one',
  885. 'type' => 'wysiwyg'
  886. ),
  887. array(
  888. 'id' => 'first_column_service_price_list_one',
  889. 'type' => 'group',
  890. // 'repeatable' => false, // use false if you want non-repeatable group
  891. 'options' => array(
  892. 'group_title' => __( 'First Column List {#}', 'dgj' ), // since version 1.1.4, {#} gets replaced by row number
  893. 'add_button' => __( 'Add Another First Column List', 'dgj' ),
  894. 'remove_button' => __( 'Remove First Column List', 'dgj' ),
  895. 'sortable' => true, // beta
  896. 'closed' => true, // true to have the groups closed by default
  897. ),
  898. 'fields' => array(
  899. array(
  900. 'name' => __( 'Item Title', 'dgj' ),
  901. 'id' => 'first_column_item_title_one',
  902. 'type' => 'text'
  903. ),
  904. array(
  905. 'name' => __( 'Item Price', 'dgj' ),
  906. 'id' => 'first_column_item_price_one',
  907. 'type' => 'text'
  908. ),
  909. )
  910. ),
  911.  
  912. ),
  913. );
  914.  
  915.  
  916.  
  917.  
  918. // Member Page Meta End
  919.  
  920.  
  921. });
  922.  
  923.  
  924.  
  925.  
  926. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement