Advertisement
retesere20

responsive-posts-carousel-alpha-fields

Jul 17th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.60 KB | None | 0 0
  1. <?php
  2.  
  3. trait WCP_Responsive_Posts_Carousel_Fields
  4. {
  5. /**
  6. * Returns carousel settings tabs.
  7. * since 1.0
  8. */
  9. function rpc_settings_tabs() {
  10. $tabs = array(
  11. array(
  12. 'label' => __( 'Content', 'responsive-posts-carousel' ),
  13. 'name' => 'contents',
  14. 'icon' => '<span class="dashicons dashicons-media-text"></span>',
  15. ),
  16. array(
  17. 'label' => __( 'Slider', 'responsive-posts-carousel' ),
  18. 'name' => 'slider',
  19. 'icon' => '<span class="dashicons dashicons-slides"></span>',
  20. ),
  21. array(
  22. 'label' => __( 'Colors & CSS', 'responsive-posts-carousel' ),
  23. 'name' => 'colors',
  24. 'icon' => '<span class="dashicons dashicons-admin-appearance"></span>',
  25. ),
  26. array(
  27. 'label' => __( 'Typography', 'responsive-posts-carousel' ),
  28. 'name' => 'typography',
  29. 'icon' => '<span class="dashicons dashicons-editor-spellcheck"></span>',
  30. ),
  31. array(
  32. 'label' => __( 'Arrows', 'responsive-posts-carousel' ),
  33. 'name' => 'arrows',
  34. 'icon' => '<span class="dashicons dashicons-leftright"></span>',
  35. ),
  36. array(
  37. 'label' => __( 'Advanced', 'responsive-posts-carousel' ),
  38. 'name' => 'advanced',
  39. 'icon' => '<span class="dashicons dashicons-admin-generic"></span>',
  40. ),
  41. );
  42.  
  43. return apply_filters( 'rpc_admin_setting_tabs', $tabs );
  44. }
  45.  
  46.  
  47.  
  48.  
  49. /**
  50. * Returns carousel settings fields.
  51. * since 1.0
  52. */
  53. function rpc_settings_fields()
  54. {
  55. $fields = array(
  56. array(
  57. 'key' => 'taxonomy',
  58. 'type' => 'taxonomy',
  59. 'tab' => 'contents',
  60. 'default' => '',
  61. 'title' => __( 'Select Taxonomy', 'responsive-posts-carousel' ),
  62. 'help' => __( 'Select Taxonomy', 'responsive-posts-carousel' ),
  63. ),
  64. array(
  65. 'key' => array('term', ''),
  66. 'type' => 'term',
  67. 'tab' => 'contents',
  68. 'default' => '',
  69. 'title' => __( 'Select Term', 'responsive-posts-carousel' ),
  70. 'help' => __( 'Select Terms', 'responsive-posts-carousel' ),
  71. ),
  72. array(
  73. 'key' => array('query', 'post_type'),
  74. 'type' => 'post_type',
  75. 'tab' => 'contents',
  76. 'default' => ['post'],
  77. 'title' => __( 'Select Post Type', 'responsive-posts-carousel' ),
  78. 'help' => __( 'Select Post Type', 'responsive-posts-carousel' ),
  79. ),
  80. array(
  81. 'key' => array('query', 'post__in'),
  82. 'type' => 'post__in',
  83. 'tab' => 'contents',
  84. 'default' => '',
  85. 'title' => __( 'Select Posts', 'responsive-posts-carousel' ),
  86. 'help' => __( 'Choose posts to display in carousel', 'responsive-posts-carousel' ),
  87. ),
  88. array(
  89. 'key' => array('query', 'post__not_in'),
  90. 'type' => 'text',
  91. 'tab' => 'contents',
  92. 'default' => '',
  93. 'title' => __( 'Exclude Posts', 'responsive-posts-carousel' ),
  94. 'help' => __( 'Comma separated ids of posts that you do not want to display', 'responsive-posts-carousel' ),
  95. ),
  96. array(
  97. 'key' => array('query', 'posts_per_page'),
  98. 'type' => 'number',
  99. 'tab' => 'contents',
  100. 'default' => 20,
  101. 'title' => __( 'Total Posts', 'responsive-posts-carousel' ),
  102. 'help' => __( 'Provide slide (posts) amount to display', 'responsive-posts-carousel' ),
  103. ),
  104. array(
  105. 'key' => 'hover_effect',
  106. 'type' => 'carousel_styles',
  107. 'tab' => 'contents',
  108. 'default' => 'none',
  109. 'title' => __( 'Post Style', 'responsive-posts-carousel' ),
  110. 'help' => __( 'Choose post style to display in slider', 'responsive-posts-carousel' ),
  111. 'options'=> [
  112. 'none',
  113. 'mini post',
  114. 'post card',
  115. 'no thumbnails',
  116. 'post display style 1',
  117. 'post display style 2',
  118. 'post display style 3',
  119. 'square effect1 left_and_right',
  120. 'square effect1 top_to_bottom',
  121. 'square effect1 bottom_to_top',
  122. 'square effect2',
  123. 'square effect3 bottom_to_top',
  124. 'square effect3 top_to_bottom',
  125. 'square effect4',
  126. 'square effect5 left_to_right',
  127. 'square effect5 right_to_left',
  128. 'square effect6 from_top_and_bottom',
  129. 'square effect6 from_left_and_right',
  130. 'square effect6 top_to_bottom',
  131. 'square effect6 bottom_to_top',
  132. 'square effect7',
  133. 'square effect8 scale_up',
  134. 'square effect8 scale_down',
  135. 'square effect9 bottom_to_top',
  136. 'square effect9 left_to_right',
  137. 'square effect9 right_to_left',
  138. 'square effect9 top_to_bottom',
  139. 'square effect10 left_to_right',
  140. 'square effect10 right_to_left',
  141. 'square effect10 top_to_bottom',
  142. 'square effect10 bottom_to_top',
  143. 'square effect11 left_to_right',
  144. 'square effect11 right_to_left',
  145. 'square effect11 top_to_bottom',
  146. 'square effect11 bottom_to_top',
  147. 'square effect12 left_to_right',
  148. 'square effect12 right_to_left',
  149. 'square effect12 top_to_bottom',
  150. 'square effect12 bottom_to_top',
  151. 'square effect13 left_to_right',
  152. 'square effect13 right_to_left',
  153. 'square effect13 top_to_bottom',
  154. 'square effect13 bottom_to_top',
  155. 'square effect14 left_to_right',
  156. 'square effect14 right_to_left',
  157. 'square effect14 top_to_bottom',
  158. 'square effect14 bottom_to_top',
  159. 'square effect15 left_to_right',
  160. 'square effect15 right_to_left',
  161. 'square effect15 top_to_bottom',
  162. 'square effect15 bottom_to_top',
  163. ]
  164. ),
  165. array(
  166. 'key' => 'title',
  167. 'type' => 'text',
  168. 'tab' => 'contents',
  169. 'default' => '',
  170. 'title' => __( 'Title', 'responsive-posts-carousel' ),
  171. 'help' => __( 'Provide post meta key to display as heading.', 'responsive-posts-carousel' ).' '.
  172. __( 'Example', 'responsive-posts-carousel' ).' '.
  173. '<code>post_title</code>, <code>post_date</code>, <code>content</code>, <code>post_author</code>, <code>excerpt</code>, <code>none</code>',
  174. ),
  175. array(
  176. 'key' => 'desc',
  177. 'type' => 'text',
  178. 'tab' => 'contents',
  179. 'default' => '',
  180. 'title' => __( 'Content', 'responsive-posts-carousel' ),
  181. 'help' => __( 'Provide post meta key to display as description.', 'responsive-posts-carousel' ).' '.
  182. __( 'Example', 'responsive-posts-carousel' ).' '.
  183. '<code>post_title</code>, <code>post_date</code>, <code>content</code>, <code>post_author</code>, <code>excerpt</code>, <code>none</code>',
  184. ),
  185. array(
  186. 'key' => 'words',
  187. 'type' => 'number',
  188. 'tab' => 'contents',
  189. 'default' => '',
  190. 'title' => __( 'Description Words Length', 'responsive-posts-carousel' ),
  191. 'help' => __( 'Maximum words to display for description.', 'responsive-posts-carousel' ).' '.
  192. __( 'Example', 'responsive-posts-carousel' ).' <code>30</code>',
  193. ),
  194. array(
  195. 'key' => 'read_more_txt',
  196. 'type' => 'text',
  197. 'tab' => 'contents',
  198. 'default' => '',
  199. 'title' => __( 'Read More Button Text', 'responsive-posts-carousel' ),
  200. 'help' => __( 'Provide text for read more button, leave blank to disable', 'responsive-posts-carousel' ),
  201. ),
  202. array(
  203. 'key' => 'read_more_target',
  204. 'type' => 'select',
  205. 'tab' => 'contents',
  206. 'default' => '',
  207. 'title' => __( 'Link Target', 'responsive-posts-carousel' ),
  208. 'help' => __( 'How you want to open links', 'responsive-posts-carousel' ),
  209. 'options' => array(
  210. '_self' => __( 'Same Tab', 'responsive-posts-carousel' ),
  211. '_blank' => __( 'New Tab', 'responsive-posts-carousel' ),
  212. ),
  213. ),
  214. array(
  215. 'key' => 'hidemeta',
  216. 'type' => 'checkbox',
  217. 'tab' => 'contents',
  218. 'default' => '',
  219. 'title' => __( 'Disable Post Meta (author, date etc)', 'responsive-posts-carousel' ),
  220. 'help' => __( 'Check this button to hide post meta', 'responsive-posts-carousel' ),
  221. ),
  222.  
  223. // Slider
  224. array(
  225. 'key' => array('slider', 'accessibility'),
  226. 'type' => 'checkbox',
  227. 'tab' => 'slider',
  228. 'default' => 'on',
  229. 'title' => __( 'Accessibility', 'responsive-posts-carousel' ),
  230. 'help' => __( 'Enables tabbing and arrow key navigation', 'responsive-posts-carousel' ),
  231. ),
  232. array(
  233. 'key' => array('slider', 'autoplay'),
  234. 'type' => 'checkbox',
  235. 'tab' => 'slider',
  236. 'default' => 'on',
  237. 'title' => __( 'Auto Play', 'responsive-posts-carousel' ),
  238. 'help' => __( 'Enables auto play of slides', 'responsive-posts-carousel' ),
  239. ),
  240. array(
  241. 'key' => array('slider', 'dots'),
  242. 'type' => 'checkbox',
  243. 'tab' => 'slider',
  244. 'default' => 'on',
  245. 'title' => __( 'Bottom Dots', 'responsive-posts-carousel' ),
  246. 'help' => __( 'Check to enable current slide indicator dots', 'responsive-posts-carousel' ),
  247. ),
  248. array(
  249. 'key' => array('slider', 'arrows'),
  250. 'type' => 'checkbox',
  251. 'tab' => 'arrows',
  252. 'default' => 'on',
  253. 'title' => __( 'Arrows', 'responsive-posts-carousel' ),
  254. 'help' => __( 'Check to enable Next/Prev arrows', 'responsive-posts-carousel' ),
  255. ),
  256. array(
  257. 'key' => array('slider', 'autoplaySpeed'),
  258. 'type' => 'number',
  259. 'tab' => 'slider',
  260. 'default' => '',
  261. 'title' => __( 'Auto Play Speed', 'responsive-posts-carousel' ),
  262. 'help' => __( 'Auto play change interval in milliseconds', 'responsive-posts-carousel' ),
  263. ),
  264. array(
  265. 'key' => array('slider', 'slidesToShow'),
  266. 'type' => 'number',
  267. 'tab' => 'slider',
  268. 'default' => '3',
  269. 'title' => __( 'Number of Columns (Desktop)', 'responsive-posts-carousel' ),
  270. 'help' => __( 'Number of posts to show at a time in a row for desktop view', 'responsive-posts-carousel' ).' <code>992px+</code>',
  271. ),
  272. array(
  273. 'key' => array('slider', 'slidesToShowtab'),
  274. 'type' => 'number',
  275. 'tab' => 'slider',
  276. 'default' => '2',
  277. 'title' => __( 'Number of Columns (Tablet)', 'responsive-posts-carousel' ),
  278. 'help' => __( 'Number of posts to show at a time in a row for tablet view', 'responsive-posts-carousel' ).' <code>992px-</code>',
  279. ),
  280. array(
  281. 'key' => array('slider', 'slidesToShowmob'),
  282. 'type' => 'number',
  283. 'tab' => 'slider',
  284. 'default' => '1',
  285. 'title' => __( 'Number of Columns (Mobile)', 'responsive-posts-carousel' ),
  286. 'help' => __( 'Number of posts to show at a time in a row for mobile view', 'responsive-posts-carousel' ).' <code>768px-</code>',
  287. ),
  288. array(
  289. 'key' => array('slider', 'speed'),
  290. 'type' => 'number',
  291. 'tab' => 'slider',
  292. 'default' => '250',
  293. 'title' => __( 'Slide Speed', 'responsive-posts-carousel' ),
  294. 'help' => __( 'Transition speed in milliseconds', 'responsive-posts-carousel' ),
  295. ),
  296. array(
  297. 'key' => array('slider', 'margin'),
  298. 'type' => 'text',
  299. 'tab' => 'slider',
  300. 'default' => '20px',
  301. 'title' => __( 'Space Between Posts', 'responsive-posts-carousel' ),
  302. 'help' => __( 'Margin will apply to both sides. Provide with unit.', 'responsive-posts-carousel' ).' '.
  303. __( 'Example', 'responsive-posts-carousel' ).' <code>20px</code>',
  304. ),
  305.  
  306. // COlors
  307. array(
  308. 'key' => 'border_width',
  309. 'type' => 'text',
  310. 'tab' => 'colors',
  311. 'default' => '',
  312. 'title' => __( 'Border Width', 'responsive-posts-carousel' ),
  313. 'help' => __( 'Provide width for border with unit. Leave blank to disable border.', 'responsive-posts-carousel' ).' '
  314. .__( 'Example', 'responsive-posts-carousel' ).' <code>2px</code>',
  315. ),
  316. array(
  317. 'key' => 'border_color',
  318. 'type' => 'color',
  319. 'tab' => 'colors',
  320. 'default' => '',
  321. 'title' => __( 'Border Color', 'responsive-posts-carousel' ),
  322. 'help' => __( 'Choose color for border', 'responsive-posts-carousel' ),
  323. ),
  324. array(
  325. 'key' => 'border_type',
  326. 'type' => 'select',
  327. 'tab' => 'colors',
  328. 'default' => '',
  329. 'options' => array(
  330. 'solid' => __( 'Solid', 'responsive-posts-carousel' ),
  331. 'dotted' => __( 'Dotted', 'responsive-posts-carousel' ),
  332. 'dashed' => __( 'Dashed', 'responsive-posts-carousel' ),
  333. 'double' => __( 'Double', 'responsive-posts-carousel' ),
  334. 'groove' => __( 'Groove', 'responsive-posts-carousel' ),
  335. 'ridge' => __( 'Ridge', 'responsive-posts-carousel' ),
  336. 'inset' => __( 'Inset', 'responsive-posts-carousel' ),
  337. 'outset' => __( 'Outset', 'responsive-posts-carousel' ),
  338. ),
  339. 'title' => __( 'Border Type', 'responsive-posts-carousel' ),
  340. 'help' => __( 'Choose type for border', 'responsive-posts-carousel' ),
  341. ),
  342. array(
  343. 'key' => 'title_bg',
  344. 'type' => 'color',
  345. 'tab' => 'colors',
  346. 'default' => '',
  347. 'title' => __( 'Title Background Color', 'responsive-posts-carousel' ),
  348. 'help' => __( 'Choose Title Background Color.', 'responsive-posts-carousel' ).' '.
  349. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  350. ),
  351. array(
  352. 'key' => 'title_color',
  353. 'type' => 'color',
  354. 'tab' => 'colors',
  355. 'default' => '',
  356. 'title' => __( 'Title Color', 'responsive-posts-carousel' ),
  357. 'help' => __( 'Choose Title text color.', 'responsive-posts-carousel' ).' '.
  358. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  359. ),
  360. array(
  361. 'key' => 'desc_color',
  362. 'type' => 'color',
  363. 'tab' => 'colors',
  364. 'default' => '',
  365. 'title' => __( 'Description Color', 'responsive-posts-carousel' ),
  366. 'help' => __( 'Choose description text color.', 'responsive-posts-carousel' ).' '.
  367. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  368. ),
  369. array(
  370. 'key' => 'desc_bg',
  371. 'type' => 'color',
  372. 'tab' => 'colors',
  373. 'default' => '',
  374. 'title' => __( 'Description Background Color', 'responsive-posts-carousel' ),
  375. 'help' => __( 'Choose description background color.', 'responsive-posts-carousel' ).' '.
  376. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  377. ),
  378. array(
  379. 'key' => 'date_bg_color',
  380. 'type' => 'color',
  381. 'tab' => 'colors',
  382. 'default' => '',
  383. 'title' => __( 'Date Background Color', 'responsive-posts-carousel' ),
  384. 'help' => __( 'Choose date background color.', 'responsive-posts-carousel' ).' '.
  385. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  386. ),
  387. array(
  388. 'key' => 'date_text_color',
  389. 'type' => 'color',
  390. 'tab' => 'colors',
  391. 'default' => '',
  392. 'title' => __( 'Date Text Color', 'responsive-posts-carousel' ),
  393. 'help' => __( 'Choose date text color.', 'responsive-posts-carousel' ).' '.
  394. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  395. ),
  396. array(
  397. 'key' => 'overlay_bg_color',
  398. 'type' => 'color',
  399. 'tab' => 'colors',
  400. 'default' => '',
  401. 'title' => __( 'Overlay Background Color', 'responsive-posts-carousel' ),
  402. 'help' => __( 'Choose color for overlay.', 'responsive-posts-carousel' ).' '.
  403. __( 'Leave blank for default settings.', 'responsive-posts-carousel' ),
  404. ),
  405. array(
  406. 'key' => 'shadow',
  407. 'type' => 'text',
  408. 'tab' => 'colors',
  409. 'default' => '',
  410. 'title' => __( 'Shadow', 'responsive-posts-carousel' ),
  411. 'help' => __( 'Provide shadow values as', 'responsive-posts-carousel' ).' <code>h-offset v-offset blur spread color</code> '.
  412. ' <a href="http://www.cssmatic.com/box-shadow" target="_blank">'.
  413. __( 'Generate Shadow', 'responsive-posts-carousel' ).
  414. '</a>',
  415. ),
  416. array(
  417. 'key' => 'read_more_classes',
  418. 'type' => 'text',
  419. 'tab' => 'colors',
  420. 'default' => '',
  421. 'title' => __( 'Read More Button CSS Classes', 'responsive-posts-carousel' ),
  422. 'help' => __( 'Provide css classes for styling of button', 'responsive-posts-carousel' ),
  423. ),
  424. array(
  425. 'key' => 'custom_css',
  426. 'type' => 'textarea',
  427. 'tab' => 'colors',
  428. 'default' => '',
  429. 'title' => __( 'Custom CSS', 'responsive-posts-carousel' ),
  430. 'help' => __( 'Paste custom css code here', 'responsive-posts-carousel' ),
  431. ),
  432.  
  433. // Typography
  434. array(
  435. 'key' => array('typo', 'title_font_family'),
  436. 'type' => 'text',
  437. 'tab' => 'typography',
  438. 'default' => '',
  439. 'title' => __( 'Title Font Family', 'responsive-posts-carousel' ),
  440. 'help' => __( 'Provide font name for title', 'responsive-posts-carousel' ),
  441. ),
  442. array(
  443. 'key' => array('typo', 'title_font_size'),
  444. 'type' => 'text',
  445. 'tab' => 'typography',
  446. 'default' => '',
  447. 'title' => __( 'Title Font Size', 'responsive-posts-carousel' ),
  448. 'help' => __( 'Provide font size for title with unit', 'responsive-posts-carousel' ),
  449. ),
  450. array(
  451. 'key' => array('typo', 'desc_font_family'),
  452. 'type' => 'text',
  453. 'tab' => 'typography',
  454. 'default' => '',
  455. 'title' => __( 'Description Font Family', 'responsive-posts-carousel' ),
  456. 'help' => __( 'Provide font name for description', 'responsive-posts-carousel' ),
  457. ),
  458. array(
  459. 'key' => array('typo', 'desc_font_size'),
  460. 'type' => 'text',
  461. 'tab' => 'typography',
  462. 'default' => '',
  463. 'title' => __( 'Description Font Size', 'responsive-posts-carousel' ),
  464. 'help' => __( 'Provide font size for description with unit', 'responsive-posts-carousel' ),
  465. ),
  466.  
  467. // Arrows
  468. array(
  469. 'key' => array('arrow', 'type'),
  470. 'type' => 'select',
  471. 'tab' => 'arrows',
  472. 'default' => 'simple',
  473. 'title' => __( 'Arrows Type', 'responsive-posts-carousel' ),
  474. 'help' => __( 'Choose navigation arrows type here', 'responsive-posts-carousel' ),
  475. 'options' => array(
  476. 'circle' => __( 'Circle', 'responsive-posts-carousel' ),
  477. 'circleinverted' => __( 'Circle Inverted', 'responsive-posts-carousel' ),
  478. 'simple' => __( 'Simple', 'responsive-posts-carousel' ),
  479. 'long' => __( 'Long', 'responsive-posts-carousel' ),
  480. 'angle' => __( 'Angle', 'responsive-posts-carousel' ),
  481. 'doubleangle' => __( 'Double Angle', 'responsive-posts-carousel' ),
  482. 'caret' => __( 'Caret', 'responsive-posts-carousel' ),
  483. 'caretsquare' => __( 'Caret Square', 'responsive-posts-carousel' ),
  484. 'hand' => __( 'Hand', 'responsive-posts-carousel' ),
  485. 'chevron' => __( 'Chevron', 'responsive-posts-carousel' ),
  486. ),
  487. ),
  488. array(
  489. 'key' => array('arrow', 'style'),
  490. 'type' => 'select',
  491. 'tab' => 'arrows',
  492. 'default' => 'circle',
  493. 'title' => __( 'Arrows Style', 'responsive-posts-carousel' ),
  494. 'help' => __( 'Choose arrow appearance here', 'responsive-posts-carousel' ),
  495. 'options' => array(
  496. 'transparent' => __( 'Transparent', 'responsive-posts-carousel' ),
  497. 'square' => __( 'Square', 'responsive-posts-carousel' ),
  498. 'circle' => __( 'Circle', 'responsive-posts-carousel' ),
  499. ),
  500. ),
  501. array(
  502. 'key' => 'arrow_color',
  503. 'type' => 'color',
  504. 'tab' => 'arrows',
  505. 'default' => '#000',
  506. 'title' => __( 'Arrows Color', 'responsive-posts-carousel' ),
  507. 'help' => __( 'Choose arrow color', 'responsive-posts-carousel' ),
  508. ),
  509. array(
  510. 'key' => array('arrow', 'bgcolor'),
  511. 'type' => 'color',
  512. 'tab' => 'arrows',
  513. 'default' => '',
  514. 'title' => __( 'Arrows Background Color', 'responsive-posts-carousel' ),
  515. 'help' => __( 'Choose arrow background color', 'responsive-posts-carousel' ),
  516. ),
  517.  
  518.  
  519. // Advanced Settings
  520. array(
  521. 'key' => 'images_size',
  522. 'type' => 'image_size',
  523. 'tab' => 'advanced',
  524. 'default' => '',
  525. 'title' => __( 'Images Size', 'responsive-posts-carousel' ),
  526. 'help' => __( 'Choose images size for thumbnails', 'responsive-posts-carousel' ),
  527. ),
  528. array(
  529. 'key' => array('slider', 'rows'),
  530. 'type' => 'number',
  531. 'tab' => 'advanced',
  532. 'default' => '',
  533. 'title' => __( 'Rows', 'responsive-posts-carousel' ),
  534. 'help' => __( 'Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row.', 'responsive-posts-carousel' ),
  535. ),
  536. array(
  537. 'key' => 'offset',
  538. 'type' => 'number',
  539. 'tab' => 'advanced',
  540. 'default' => '',
  541. 'title' => __( 'Skip Posts', 'responsive-posts-carousel' ),
  542. 'help' => __( 'Number of posts to skip from initial posts regarding current settings.', 'responsive-posts-carousel' ),
  543. ),
  544. array(
  545. 'key' => array('slider', 'slidesPerRow'),
  546. 'type' => 'number',
  547. 'tab' => 'advanced',
  548. 'default' => '',
  549. 'title' => __( 'Slides Per Row', 'responsive-posts-carousel' ),
  550. 'help' => __( 'With grid mode initialized via the rows option, this sets how many slides are in each grid row.', 'responsive-posts-carousel' ),
  551. ),
  552. array(
  553. 'key' => 'placeholder_image',
  554. 'type' => 'text',
  555. 'tab' => 'advanced',
  556. 'default' => '',
  557. 'title' => __( 'Placeholder Image Url', 'responsive-posts-carousel' ),
  558. 'help' => __( 'Provide placeholder image url for that posts which do not have featured images.', 'responsive-posts-carousel' ),
  559. ),
  560. array(
  561. 'key' => 'disable_current_post',
  562. 'type' => 'checkbox',
  563. 'tab' => 'advanced',
  564. 'default' => '',
  565. 'title' => __( 'Disable Current Post', 'responsive-posts-carousel' ),
  566. 'help' => __( 'Check to exclude the current post from slider if you are using it under a post.', 'responsive-posts-carousel' ),
  567. ),
  568. array(
  569. 'key' => 'equal_height_mode',
  570. 'type' => 'checkbox',
  571. 'tab' => 'advanced',
  572. 'default' => '',
  573. 'title' => __( 'Equal Height Mode', 'responsive-posts-carousel' ),
  574. 'help' => __( 'Checking this make all images same in height.', 'responsive-posts-carousel' ),
  575. ),
  576. array(
  577. 'key' => 'images_height',
  578. 'type' => 'text',
  579. 'tab' => 'advanced',
  580. 'default' => '',
  581. 'title' => __( 'Images Height', 'responsive-posts-carousel' ),
  582. 'help' => __( 'Fixed Height for images in px. Eg: 450px', 'responsive-posts-carousel' ),
  583. ),
  584. array(
  585. 'key' => 'cache_minutes',
  586. 'type' => 'number',
  587. 'tab' => 'advanced',
  588. 'default' => 1,
  589. 'title' => __( 'Cache', 'responsive-posts-carousel' ),
  590. 'help' => __( 'How many minutes should the query be cached (set 0 for disable)', 'responsive-posts-carousel' ),
  591. ),
  592. );
  593. return apply_filters( 'rpc_admin_setting_fields', $fields );
  594. }
  595. }
  596. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement