PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/mymaxiskirt/includes/admin/register-admin-dynamic-options.php

https://bitbucket.org/sanders_nick/my-maxi-skirt
PHP | 956 lines | 793 code | 146 blank | 17 comment | 15 complexity | 6445f7a55468bb476b9654562dc1b905 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, AGPL-1.0, GPL-3.0, LGPL-2.1
  1. <?php
  2. global $avia_config;
  3. $elements[] = array(
  4. "dynamic" => 'blog',
  5. "name" => "Blog",
  6. "slug" => "",
  7. "type" => "group",
  8. "id" => "dynamic_blog",
  9. "linktext" => "Add another Slide",
  10. "deletetext" => "Remove Slide",
  11. "removable" => 'remove element',
  12. "blank" => true,
  13. "nodescription" => true,
  14. 'subelements' => array(
  15. array( "name" => "<strong>A Blog section will be added to the page. Bellow you can choose some blog settings:</strong><br/><br/>Which categories should be used for the blog?",
  16. "desc" => "You can select multiple categories here. If left empty all categories will be displayed",
  17. "id" => "dynamic_blog_cats",
  18. "type" => "select",
  19. "slug" => "",
  20. "multiple"=>6,
  21. "subtype" => "cat"),
  22. array( "name" => "Show Pagination?",
  23. "desc" => "Should the title of the entry be displayed as well?",
  24. "id" => "dynamic_blog_pagination",
  25. "type" => "select",
  26. "slug" => "",
  27. "std" => "yes",
  28. "no_first"=>true,
  29. "subtype" => array('yes'=>'yes','no'=>'no')),
  30. array( "name" => "Posts per page?",
  31. "desc" => "How many posts should be displayed?",
  32. "id" => "dynamic_blog_posts_per_page",
  33. "type" => "select",
  34. "slug" => "",
  35. "std" => "3",
  36. "no_first"=>true,
  37. "subtype" => array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','All'=>"-1")),
  38. )
  39. );
  40. $column_element = array();
  41. $columns = 4;
  42. for ($i = 1; $i <= $columns; $i++)
  43. {
  44. $requirement = $i;
  45. if($requirement < 2) $requirement = 2;
  46. //start column
  47. $column_element[] = array( "slug" => "", "type" => "visual_group_start", "id" => "vg".$i, "nodescription" => true, 'class'=>'avia_pseudo_sortable', "required" => array('dynamic_column_count','{higher_than}'.$requirement) );
  48. $column_element[] = array(
  49. "slug" => "",
  50. "name" => "Column ".$i." Content:",
  51. "desc" => "",
  52. "id" => "dynamic_column_content_".$i,
  53. "type" => "select",
  54. "std" => "page",
  55. "subtype" => array('Single Page'=>'page','Post from Category'=>'cat','Current entry'=>'page_current', 'Widget'=>'widget','Direct Text input'=>'textarea')
  56. );
  57. $column_element[] = array(
  58. "slug" => "",
  59. "name" => "Page:",
  60. "desc" => "",
  61. "id" => "dynamic_column_content_".$i."_page",
  62. "type" => "select",
  63. "std" => "",
  64. "required" => array('dynamic_column_content_'.$i,'page'),
  65. "subtype" => 'page'
  66. );
  67. $column_element[] = array(
  68. "slug" => "",
  69. "name" => "How do you want to display the entry?",
  70. "desc" => "",
  71. "id" => "dynamic_column_content_".$i."_page_display",
  72. "type" => "select",
  73. "std" => "img_post",
  74. "no_first"=>true,
  75. "required" => array('dynamic_column_content_'.$i,'{contains}page'),
  76. "subtype" => array('Preview Image and post content' => 'img_post', 'Preview Image and post title' => 'img_title', 'Only preview Image' => 'img', 'Only post Content' => 'post')
  77. );
  78. $column_element[] = array(
  79. "slug" => "",
  80. "name" => "Post from Category:",
  81. "desc" => "",
  82. "id" => "dynamic_column_content_".$i."_cat",
  83. "type" => "select",
  84. "std" => "",
  85. "required" => array('dynamic_column_content_'.$i,'cat'),
  86. "subtype" => 'cat'
  87. );
  88. $column_element[] = array(
  89. "slug" => "",
  90. "name" => "How do you want to display the post?",
  91. "desc" => "",
  92. "id" => "dynamic_column_content_".$i."_cat_display",
  93. "type" => "select",
  94. "std" => "img_post",
  95. "no_first"=>true,
  96. "required" => array('dynamic_column_content_'.$i,'cat'),
  97. "subtype" => array('Preview Image and post content' => 'img_post', 'Preview Image and post title' => 'img_title', 'Only preview Image' => 'img', 'Only post Content' => 'post')
  98. );
  99. $column_element[] = array(
  100. "slug" => "",
  101. "name" => "Overwrite default Link",
  102. "desc" => "",
  103. "id" => "dynamic_column_content_".$i."_cat_link",
  104. "type" => "text",
  105. "std" => "http://",
  106. "no_first"=>true,
  107. "required" => array('dynamic_column_content_'.$i,'cat')
  108. );
  109. $column_element[] = array(
  110. "slug" => "",
  111. "name" => "Overwrite default Link",
  112. "desc" => "",
  113. "id" => "dynamic_column_content_".$i."_page_link",
  114. "type" => "text",
  115. "std" => "http://",
  116. "no_first"=>true,
  117. "required" => array('dynamic_column_content_'.$i,'{contains}page')
  118. );
  119. $column_element[] = array(
  120. "slug" => "",
  121. "name" => "Enter a widget area name (no special characters) - Once you have saved this template head over to <a href='widgets.php'>Appearance &raquo; Widgets</a> and add some widgets to the Widget area.",
  122. "class" => 'avia_dynamic_template_widget',
  123. "desc" => "",
  124. "id" => "dynamic_column_content_".$i."_widget",
  125. "type" => "text",
  126. "required" => array('dynamic_column_content_'.$i,'widget')
  127. );
  128. $column_element[] = array(
  129. "slug" => "",
  130. "name" => "Enter text here:",
  131. "desc" => "",
  132. "id" => "dynamic_column_content_".$i."_textarea",
  133. "required" => array('dynamic_column_content_'.$i,'textarea'),
  134. "type" => "textarea");
  135. $column_element[] = array(
  136. "slug" => "",
  137. "name" => "Image above Text",
  138. "desc" => "",
  139. "id" => "dynamic_column_content_".$i."_image",
  140. "type" => "upload",
  141. "std" => "",
  142. "subtype" => "advanced",
  143. "label" => "Use Image",
  144. "required" => array('dynamic_column_content_'.$i,'textarea')
  145. );
  146. $column_element[] = array( "slug" => "", "type" => "visual_group_end", "id" => "vg".$i."_end", "nodescription" => true );
  147. // end column
  148. }
  149. $elements[] = array(
  150. "dynamic" => 'columns',
  151. "name" => "Columns",
  152. "slug" => "",
  153. "type" => "group",
  154. "id" => "dynamic_columns",
  155. "linktext" => "Add another Slide",
  156. "deletetext" => "Remove Slide",
  157. "removable" => 'remove element',
  158. "blank" => true,
  159. "nodescription" => true,
  160. 'subelements' => array(
  161. array(
  162. "slug" => "",
  163. "name" => "Select how many columns you want to display, then choose the column width and content",
  164. "desc" => "",
  165. "id" => "dynamic_column_count",
  166. "type" => "select",
  167. "no_first"=>true,
  168. "std" => "2",
  169. "subtype" => array('2 Columns'=>'2','3 Columns'=>'3','4 Columns'=>'4')),
  170. array(
  171. "slug" => "",
  172. "name" => "Choose the column width:",
  173. "desc" => "",
  174. "id" => "dynamic_column_width_2",
  175. "type" => "select",
  176. "required" => array('dynamic_column_count','2'),
  177. "no_first"=>true,
  178. "std" => "2-2",
  179. "subtype" => array('50%:50%'=>'1-1', '25%:75%'=>'1-3', '75%:25%'=>'3-1', '33%:66%'=>'1-2', '66%:33%'=>'2-1')),
  180. array(
  181. "slug" => "",
  182. "name" => "Choose the column width:",
  183. "desc" => "",
  184. "id" => "dynamic_column_width_3",
  185. "type" => "select",
  186. "required" => array('dynamic_column_count','3'),
  187. "no_first"=>true,
  188. "std" => "1-1-1",
  189. "subtype" => array('33%:33%:33%'=>'1-1-1', '25%:25%:50%'=>'1-1-2', '25%:50%:25%'=>'1-2-1', '50%:25%:25%'=>'2-1-1')),
  190. array(
  191. "slug" => "",
  192. "name" => "Choose the column width:",
  193. "desc" => "",
  194. "id" => "dynamic_column_width_4",
  195. "type" => "select",
  196. "required" => array('dynamic_column_count','4'),
  197. "no_first"=>true,
  198. "std" => "1-1-1-1",
  199. "subtype" => array('25%:25%:25%:25%'=>'1-1-1-1')),
  200. $column_element[0],
  201. $column_element[1],
  202. $column_element[2],
  203. $column_element[3],
  204. $column_element[4],
  205. $column_element[5],
  206. $column_element[6],
  207. $column_element[7],
  208. $column_element[8],
  209. $column_element[9],
  210. $column_element[10],
  211. $column_element[11],
  212. $column_element[12],
  213. $column_element[13],
  214. $column_element[14],
  215. $column_element[15],
  216. $column_element[16],
  217. $column_element[17],
  218. $column_element[18],
  219. $column_element[19],
  220. $column_element[20],
  221. $column_element[21],
  222. $column_element[22],
  223. $column_element[23],
  224. $column_element[24],
  225. $column_element[25],
  226. $column_element[26],
  227. $column_element[27],
  228. $column_element[28],
  229. $column_element[29],
  230. $column_element[30],
  231. $column_element[31],
  232. $column_element[32],
  233. $column_element[33],
  234. $column_element[34],
  235. $column_element[35],
  236. $column_element[36],
  237. $column_element[37],
  238. $column_element[38],
  239. $column_element[39],
  240. $column_element[40],
  241. $column_element[41],
  242. $column_element[42],
  243. $column_element[43],
  244. $column_element[44],
  245. $column_element[45],
  246. $column_element[46],
  247. $column_element[47]
  248. )
  249. );
  250. $elements[] = array(
  251. "dynamic"=> 'hr',
  252. "name" => "Horizontal Ruler",
  253. "desc" => "Adds a horizontal ruler to the template. You can either choose the default styling, the default styling with less padding at the top and bottom, a ruler with 'top' link or an invisible ruler that just adds whitespace",
  254. "id" => "dynamic_hr_group",
  255. "type" => "group",
  256. "nodescription"=>true,
  257. "slug" => '',
  258. "removable" => 'remove element',
  259. 'subelements' => array(
  260. array(
  261. "name" => "Horizontal Ruler",
  262. "desc" => "Adds a horizontal ruler to the template. You can either choose the default styling, the default styling with less padding at the top and bottom, a ruler with 'top' link or an invisible ruler that just adds whitespace",
  263. "id" => "dynamic_hr",
  264. "type" => "select",
  265. "std" => "default",
  266. "no_first"=>true,
  267. "subtype" => array('Default Ruler'=>'default','Small Ruler'=>'default_small','Ruler with Text'=>'custom','Whitespace'=>'whitespace'),
  268. "slug" => '',
  269. "removable" => 'remove element'
  270. ),
  271. array(
  272. "slug" => "",
  273. "name" => "Enter the text",
  274. "desc" => "",
  275. "id" => "dynamic_hr_text",
  276. "type" => "text",
  277. "required" => array('dynamic_hr','custom')
  278. ),
  279. array(
  280. "slug" => "",
  281. "name" => "Whitespace Amount",
  282. "desc" => "Enter the amount of whitespace in px or em",
  283. "id" => "dynamic_hr_whitespace",
  284. "type" => "text",
  285. "std" => "30px",
  286. "required" => array('dynamic_hr','whitespace')
  287. ),
  288. )
  289. );
  290. $elements[] = array(
  291. "dynamic"=> 'page_split',
  292. "name" => "Page Split",
  293. "desc" => "Creates a Page Split that allows to select a new color scheme for the content following the page split",
  294. "id" => "dynamic_page_split",
  295. "type" => "group",
  296. "nodescription"=>true,
  297. "slug" => '',
  298. "removable" => 'remove element',
  299. 'subelements' => array(
  300. array(
  301. "name" => "",
  302. "desc" => "Creates a Page Split that allows to select a new color scheme for the content following the page split<br/><br/>",
  303. "id" => "page_split_heading",
  304. "type" => "heading",
  305. "std" => "default",
  306. "slug" => "",
  307. "nodescription"=>true,
  308. ),
  309. array(
  310. "name" => "Page Split Styling",
  311. "desc" => "Select a new color scheme for the content following the page split. You can <a href='admin.php?page=avia#goto_styling'>define color schemes here</a>",
  312. "id" => "page_split_style",
  313. "type" => "select",
  314. "std" => "main_color",
  315. "no_first"=>true,
  316. "slug" => "",
  317. "subtype" => array_flip($avia_config['color_sets']),
  318. ),
  319. /*
  320. array(
  321. "name" => "Page Split Shadow",
  322. "desc" => "Display a shadow at the end of this content area?</a>",
  323. "id" => "page_split_shadow",
  324. "type" => "select",
  325. "std" => "active",
  326. "no_first"=>true,
  327. "slug" => "",
  328. "subtype" => array('Yes'=>'active', 'No' => 'no_shadow'),
  329. )
  330. */
  331. )
  332. );
  333. $itemcount = array('All'=>'-1');
  334. for($i = 1; $i<101; $i++) $itemcount[$i] = $i;
  335. $elements[] = array(
  336. "dynamic" => 'shop',
  337. "name" => "Products",
  338. "slug" => "",
  339. "type" => "group",
  340. "id" => "dynamic_shop",
  341. "linktext" => "Add another Slide",
  342. "deletetext" => "Remove Slide",
  343. "removable" => 'remove element',
  344. "blank" => true,
  345. "nodescription" => true,
  346. 'subelements' => array(
  347. array( "name" => "Which shop categories should be used?",
  348. "desc" => "You can select multiple categories here. Products from those categories will be shown.",
  349. "id" => "shop_cats_dynamic",
  350. "type" => "select",
  351. "slug" => "",
  352. "multiple"=>6,
  353. "taxonomy" => "product_cat",
  354. "subtype" => "cat"),
  355. array(
  356. "slug" => "",
  357. "name" => "Shop Columns",
  358. "desc" => "How many columns should be displayed?",
  359. "id" => "shop_columns",
  360. "type" => "select",
  361. "std" => "3",
  362. "no_first"=>true,
  363. "subtype" => array('2'=>'2','3'=>'3','4'=>'4','5'=>'5')),
  364. array(
  365. "slug" => "",
  366. "name" => "Products per page",
  367. "desc" => "How many items should be displayed?",
  368. "id" => "shop_item_count",
  369. "type" => "select",
  370. "std" => "24",
  371. "no_first"=>true,
  372. "subtype" => $itemcount),
  373. array(
  374. "slug" => "",
  375. "name" => "Shop Pagination",
  376. "desc" => "Should a shop pagination be displayed?",
  377. "id" => "shop_pagination",
  378. "type" => "select",
  379. "std" => "yes",
  380. "no_first"=>true,
  381. "subtype" => array('yes'=>'yes','no'=>'no')),
  382. array(
  383. "slug" => "",
  384. "name" => "Sorting Options",
  385. "desc" => "Here you can choose how to sort the products",
  386. "id" => "shop_sorting",
  387. "type" => "select",
  388. "std" => "dropdown",
  389. "no_first"=>true,
  390. "subtype" => array( 'Let user pick by displaying sort options (default value is defined at Woocommerce -> Settings -> Catalog)'=>'dropdown',
  391. 'Use defaut (defined at Woocommerce -> Settings -> Catalog) '=>'0',
  392. 'Sort alphabetically'=>'title',
  393. 'Sort by most recent'=>'date',
  394. 'Sort by price'=>'price')),
  395. array(
  396. "slug" => "",
  397. "name" => "Force Sidebar (only on Fullwidth Pages)",
  398. "desc" => "If you have selected a full width page you can force a sidebar to display beside your products",
  399. "id" => "shop_sidebar",
  400. "type" => "select",
  401. "std" => "no",
  402. "no_first"=>true,
  403. "subtype" => array('yes'=>'yes','no'=>'no')),
  404. )
  405. );
  406. $elements[] = array(
  407. "dynamic" => 'product_slider',
  408. "name" => "Product Slider",
  409. "slug" => "",
  410. "type" => "group",
  411. "id" => "dynamic_shop_slider",
  412. "linktext" => "Add another Slide",
  413. "deletetext" => "Remove Slide",
  414. "removable" => 'remove element',
  415. "blank" => true,
  416. "nodescription" => true,
  417. 'subelements' => array(
  418. array( "name" => "Which shop categories should be used?",
  419. "desc" => "You can select multiple categories here. Products from those categories will be shown.",
  420. "id" => "shop_cats_dynamic",
  421. "type" => "select",
  422. "slug" => "",
  423. "multiple"=>6,
  424. "taxonomy" => "product_cat",
  425. "subtype" => "cat"),
  426. array(
  427. "slug" => "",
  428. "name" => "Shop Columns",
  429. "desc" => "How many columns should be displayed?",
  430. "id" => "shop_columns",
  431. "type" => "select",
  432. "std" => "3",
  433. "no_first"=>true,
  434. "subtype" => array('2'=>'2','3'=>'3','4'=>'4','5'=>'5')),
  435. array(
  436. "slug" => "",
  437. "name" => "Product count",
  438. "desc" => "How many items should be displayed?",
  439. "id" => "shop_item_count",
  440. "type" => "select",
  441. "std" => "9",
  442. "no_first"=>true,
  443. "subtype" => $itemcount),
  444. array(
  445. "slug" => "",
  446. "name" => "Sorting Options",
  447. "desc" => "Here you can choose how to sort the products",
  448. "id" => "shop_sorting",
  449. "type" => "select",
  450. "std" => "0",
  451. "no_first"=>true,
  452. "subtype" => array( 'Use defaut (defined at Woocommerce -> Settings -> Catalog) '=>'0',
  453. 'Sort alphabetically'=>'title',
  454. 'Sort by most recent'=>'date',
  455. 'Sort by price'=>'price')),
  456. array(
  457. "slug" => "",
  458. "name" => "Autorotation",
  459. "desc" => "Should the slider autorotate? if so choose how many seconds each product set should be visible",
  460. "id" => "shop_autorotate",
  461. "type" => "select",
  462. "std" => "0",
  463. "no_first"=>true,
  464. "subtype" => array('Off'=>'0','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','15'=>'15','20'=>'20','30'=>'30')),
  465. )
  466. );
  467. $elements[] = array(
  468. "dynamic"=> 'slideshow',
  469. "name" => "Slideshow",
  470. "desc" => "The slideshow settings of the post or page that are used to display this template will be applied with all its options. You can modify the slideshow for each post/page when editing that post",
  471. "id" => "dynamic_slideshow",
  472. "type" => "group",
  473. "nodescription"=>true,
  474. "slug" => '',
  475. "removable" => 'remove element',
  476. 'subelements' => array(
  477. array( "name" => "Which Slideshow?",
  478. "desc" => "By default the theme will display the slideshow of the entry which got the this template applied. However you can choose a different page as well.<br/> The slideshow settings of the entry you choose will be applied with all its options. You can modify the slideshow for each post/page when editing that post",
  479. "id" => "dynamic_slideshow_which_post_page",
  480. "type" => "select",
  481. "slug" => "",
  482. "std" => "self",
  483. "no_first"=>true,
  484. "subtype" => array('Display the slideshow of this entry'=>'self','Choose a Page'=>'page')),
  485. array(
  486. "slug" => "",
  487. "name" => "Select Page",
  488. "desc" => "",
  489. "id" => "dynamic_slideshow_page_id",
  490. "type" => "select",
  491. "subtype" => 'page',
  492. "required" => array('dynamic_slideshow_which_post_page','page')
  493. ),
  494. )
  495. );
  496. $elements[] = array(
  497. "dynamic" => 'textarea',
  498. "name" => "Text Area / Callout / Quotes",
  499. "slug" => "",
  500. "type" => "group",
  501. "id" => "dynamic_text_area",
  502. "removable" => 'remove element',
  503. "blank" => true,
  504. "nodescription" => true,
  505. 'subelements' => array(
  506. array( "name" => "Text Styling",
  507. "desc" => "Chosose which text styling should be applied. You can either add a default paragraph or callout style",
  508. "id" => "dynamic_text_styling",
  509. "type" => "select",
  510. "slug" => "",
  511. "std" => "p",
  512. "no_first"=>true,
  513. "subtype" => array('Paragraph Style'=>'p','Blockquote Style'=>'blockquote','Callout Style'=>'callout')),
  514. array( "slug" => "", "type" => "visual_group_start", "id" => "visual_group_dyn_callout", "nodescription" => true, "required" => array('dynamic_text_styling','callout') ),
  515. array(
  516. "slug" => "",
  517. "name" => "Callout Button Label",
  518. "desc" => "Add the label text of the call to action button. If left empty no button will be displayed",
  519. "id" => "dynamic_text_button",
  520. "type" => "text"
  521. ),
  522. array( "name" => "Callout Button link",
  523. "desc" => "",
  524. "slug" => "",
  525. "id" => "dynamic_text_button_link",
  526. "type" => "select",
  527. "std" => "",
  528. "subtype" => array('Link manually'=>'url','Link to Page'=>'page','Link to Category'=>'cat'),
  529. ),
  530. array( "name" => "",
  531. "desc" => "",
  532. "slug" => "",
  533. "id" => "dynamic_text_button_link_url",
  534. "std" => "http://",
  535. "type" => "text",
  536. "required" => array('dynamic_text_button_link','url') ),
  537. array( "name" => "",
  538. "desc" => "",
  539. "slug" => "",
  540. "id" => "dynamic_text_button_link_page",
  541. "type" => "select",
  542. "subtype" => "page",
  543. "required" => array('dynamic_text_button_link','page') ),
  544. array( "name" => "",
  545. "desc" => "",
  546. "slug" => "",
  547. "id" => "dynamic_text_button_link_cat",
  548. "type" => "select",
  549. "subtype" => "cat",
  550. "required" => array('dynamic_text_button_link','cat') ),
  551. array( "slug" => "", "type" => "visual_group_end", "id" => "visual_group_dyn_callout_end", "nodescription" => true),
  552. array(
  553. "slug" => "",
  554. "name" => "The text message that should be displayed",
  555. "desc" => "Your message to the world :)<br/>(Wordpress shortcodes and HTML allowed)",
  556. "id" => "dynamic_text",
  557. "type" => "textarea"),
  558. )
  559. );
  560. $elements[] = array(
  561. "dynamic" => 'heading',
  562. "name" => "Heading",
  563. "slug" => "",
  564. "type" => "group",
  565. "id" => "dynamic_heading",
  566. "removable" => 'remove element',
  567. "blank" => true,
  568. "nodescription" => true,
  569. 'subelements' => array(
  570. array( "name" => "Heading title",
  571. "desc" => "Set your page title bellow. You can also choose to display the tilte of this page.",
  572. "id" => "dynamic_heading_type",
  573. "type" => "select",
  574. "slug" => "",
  575. "std" => "custom",
  576. "no_first"=>true,
  577. "subtype" => array('Display this entries heading'=>'self','Custom Heading'=>'custom')),
  578. array( "name" => "Custom Heading",
  579. "desc" => "",
  580. "slug" => "",
  581. "id" => "dynamic_heading_custom",
  582. "std" => "",
  583. "type" => "text",
  584. "required" => array('dynamic_heading_type','custom') ),
  585. array( "name" => "Heading Size?",
  586. "desc" => "",
  587. "id" => "dynamic_heading_size",
  588. "type" => "select",
  589. "slug" => "",
  590. "std" => "h2",
  591. "no_first"=>true,
  592. "subtype" => array('Big'=>'h2','Medium'=>'h3','Small'=>'h4')),
  593. array("name" => "Display small extra link at the right (eg: a 'read more' link)?",
  594. "desc" => "",
  595. "id" => "dynamic_heading_link_active",
  596. "type" => "select",
  597. "slug" => "",
  598. "std" => "no",
  599. "no_first"=>true,
  600. "subtype" => array('Yes'=>'yes','No'=>'no')),
  601. array( "name" => "Link text",
  602. "desc" => "",
  603. "slug" => "",
  604. "id" => "dynamic_heading_link_text",
  605. "std" => "",
  606. "type" => "text",
  607. "required" => array('dynamic_heading_link_active','yes') ),
  608. array( "name" => "Link URL",
  609. "desc" => "",
  610. "slug" => "",
  611. "id" => "dynamic_heading_link_url",
  612. "std" => "http://",
  613. "type" => "text",
  614. "required" => array('dynamic_heading_link_active','yes') ),
  615. )
  616. );
  617. ######################################################################
  618. # LOGO BAR
  619. ######################################################################
  620. $logo_subelements = array();
  621. $logo_subelements[] = array(
  622. "slug" => "",
  623. "name" => "Image hovers effects",
  624. "desc" => "Do you want to apply a mouse over effect for your images? Default is greyscale overlay.",
  625. "id" => "logo_hover",
  626. "type" => "select",
  627. "std" => "greyscale-active",
  628. "no_first"=>true,
  629. "subtype" => array('None'=>'', 'Greyscale'=>'greyscale-active'));
  630. for ($i = 1; $i <= 5; $i++)
  631. {
  632. $logo_subelements[] = array( "slug" => "",
  633. "name" => "Logo ".$i,
  634. "desc" => "",
  635. "id" => "logo_img_".$i,
  636. "type" => "upload",
  637. "std" => "",
  638. "subtype" => "advanced",
  639. "class" => "av_2columns av_col_1",
  640. "label" => "Use as logo",
  641. );
  642. $logo_subelements[] = array( "slug" => "",
  643. "name" => "Image Link",
  644. "desc" => "",
  645. "class" => "av_2columns av_col_2",
  646. "id" => "logo_img_".$i."_link",
  647. "type" => "text",
  648. "std" => "http://",
  649. "no_first"=>true,
  650. );
  651. }
  652. $elements[] = array(
  653. "dynamic" => 'logo',
  654. "name" => "Logo/Partner List",
  655. "class" => "avia_logobar",
  656. "slug" => "",
  657. "type" => "group",
  658. "id" => "dynamic_l",
  659. "linktext" => "Add another Slide",
  660. "deletetext" => "Remove Slide",
  661. "removable" => 'remove element',
  662. "blank" => true,
  663. "nodescription" => true,
  664. 'subelements' => $logo_subelements
  665. );
  666. $elements[] = array(
  667. "dynamic" => 'post_page',
  668. "name" => "Post/Page Content",
  669. "slug" => "",
  670. "type" => "group",
  671. "id" => "dynamic_post_page",
  672. "removable" => 'remove element',
  673. "blank" => true,
  674. "nodescription" => true,
  675. 'subelements' => array(
  676. array( "name" => "Which Content?",
  677. "desc" => "Chosose a page or post. The content of that entry will be displayed. By default it will display the content of the current post or page that has the this template aplied to it.",
  678. "id" => "dynamic_which_post_page",
  679. "type" => "select",
  680. "slug" => "",
  681. "std" => "self",
  682. "no_first"=>true,
  683. "subtype" => array('Display the content of this post/page'=>'self','Choose a post'=>'post','Choose a Page'=>'page')),
  684. array(
  685. "slug" => "",
  686. "name" => "Select Page",
  687. "desc" => "",
  688. "id" => "dynamic_page_id",
  689. "type" => "select",
  690. "subtype" => 'page',
  691. "required" => array('dynamic_which_post_page','page')
  692. ),
  693. array(
  694. "slug" => "",
  695. "name" => "Select Post",
  696. "desc" => "",
  697. "id" => "dynamic_post_id",
  698. "type" => "select",
  699. "subtype" => 'post',
  700. "required" => array('dynamic_which_post_page','post')
  701. ),
  702. array( "name" => "Display Title?",
  703. "desc" => "Should the title of the entry be displayed as well?",
  704. "id" => "dynamic_which_post_page_title",
  705. "type" => "select",
  706. "slug" => "",
  707. "std" => "yes",
  708. "no_first"=>true,
  709. "subtype" => array('yes'=>'yes','no'=>'no')),
  710. )
  711. );
  712. $itemcount = array('All'=>'-1');
  713. for($i = 1; $i<101; $i++) $itemcount[$i] = $i;
  714. $elements[] = array(
  715. "dynamic" => 'portfolio',
  716. "name" => "Portfolio",
  717. "slug" => "",
  718. "type" => "group",
  719. "id" => "dynamic_portfolio",
  720. "linktext" => "Add another Slide",
  721. "deletetext" => "Remove Slide",
  722. "removable" => 'remove element',
  723. "blank" => true,
  724. "nodescription" => true,
  725. 'subelements' => array(
  726. array( "name" => "Which categories should be used for the portfolio?",
  727. "desc" => "You can select multiple categories here. The Portfolio Page that you choose below will then show all posts from those categories, along with a sort option for each category.",
  728. "id" => "portfolio_cats",
  729. "type" => "select",
  730. "slug" => "portfolio",
  731. "multiple"=>6,
  732. "taxonomy" => "portfolio_entries",
  733. "subtype" => "cat"),
  734. array(
  735. "slug" => "portfolio",
  736. "name" => "Portfolio Details?",
  737. "desc" => "Should the portfolio details be opened on the same page when someone clicks a portfolio item?<br/><br/>",
  738. "id" => "portfolio_ajax_class",
  739. "type" => "select",
  740. "std" => "ajax_portfolio_container",
  741. "no_first"=>true,
  742. "class" => "av_2columns av_col_1",
  743. "subtype" => array( 'Yes, on the same page - known as AJAX Portfolio'=>'ajax_portfolio_container',
  744. 'No, open entries on a single page'=>'')),
  745. array(
  746. "slug" => "portfolio",
  747. "name" => "Portfolio Columns",
  748. "desc" => "How many columns should be displayed? Should a sidebar be displayed as well?<br/><br/>",
  749. "id" => "portfolio_columns",
  750. "type" => "select",
  751. "class" => "av_2columns av_col_2",
  752. "no_first"=>true,
  753. "std" => "4",
  754. "subtype" => array( '1 Column'=>'1',
  755. '2 Columns'=>'2',
  756. '3 Columns'=>'3',
  757. '4 Columns'=>'4',
  758. )),
  759. array(
  760. "slug" => "portfolio",
  761. "name" => "Portfolio Post Number",
  762. "desc" => "How many items should be displayed per page?<br/><br/>",
  763. "id" => "portfolio_item_count",
  764. "type" => "select",
  765. "std" => "16",
  766. "no_first"=>true,
  767. "class" => "av_2columns av_col_1",
  768. "subtype" => $itemcount),
  769. array(
  770. "slug" => "portfolio",
  771. "name" => "Portfolio Title",
  772. "desc" => "Display Title of entry?<br/><br/>",
  773. "id" => "portfolio_text",
  774. "type" => "select",
  775. "std" => "yes",
  776. "no_first"=>true,
  777. "class" => "av_2columns av_col_2",
  778. "subtype" => array('yes'=>'yes','no'=>'no')),
  779. array(
  780. "slug" => "portfolio",
  781. "name" => "Portfolio Sortable?",
  782. "desc" => "Should the sorting options based on categories be displayed?<br/><br/>",
  783. "id" => "portfolio_sorting",
  784. "type" => "select",
  785. "std" => "yes",
  786. "no_first"=>true,
  787. "class" => "av_2columns av_col_1",
  788. "subtype" => array('yes'=>'yes','no'=>'no')),
  789. array(
  790. "slug" => "portfolio",
  791. "name" => "Portfolio Pagination",
  792. "desc" => "Should a portfolio pagination be displayed?<br/><br/><br/>",
  793. "id" => "portfolio_pagination",
  794. "type" => "select",
  795. "std" => "yes",
  796. "no_first"=>true,
  797. "class" => "av_2columns av_col_2",
  798. "subtype" => array('yes'=>'yes','no'=>'no')),
  799. array(
  800. "slug" => "portfolio",
  801. "name" => "Portfolio Greyscale Overlay?",
  802. "desc" => "Should a greyscale hover effect be applied?<br/><br/>",
  803. "id" => "portfolio_greyscale",
  804. "type" => "select",
  805. "std" => "yes",
  806. "no_first"=>true,
  807. "class" => "av_2columns av_col_1",
  808. "subtype" => array('yes'=>'yes','no'=>'no')),
  809. )
  810. );