customize.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  1. <?php
  2. /**
  3. * This file adds the Customizer to the Captivating Theme.
  4. *
  5. * @package Captivating
  6. * @subpackage Customizations
  7. * @link http://restored316designs.com/themes
  8. * @author Lauren Gaige // Restored 316 LLC
  9. * @copyright Copyright (c) 2015, Restored 316 LLC, Released 08/09/2017
  10. * @license GPL-2.0+
  11. */
  12. //* Get default primary colors for Customizer.
  13. function captivating_customizer_get_default_text_color() {
  14. return '#333333';
  15. }
  16. function captivating_customizer_get_default_links_color() {
  17. return '#55c7cf';
  18. }
  19. function captivating_customizer_get_default_linkshover_color() {
  20. return '#333333';
  21. }
  22. function captivating_customizer_get_default_button_color() {
  23. return '#ffffff';
  24. }
  25. function captivating_customizer_get_default_buttonborder_color() {
  26. return '#333333';
  27. }
  28. function captivating_customizer_get_default_buttontext_color() {
  29. return '#333333';
  30. }
  31. function captivating_customizer_get_default_buttonhover_color() {
  32. return '#55c7cf';
  33. }
  34. function captivating_customizer_get_default_buttonhoverborder_color() {
  35. return '#55c7cf';
  36. }
  37. function captivating_customizer_get_default_buttonhovertext_color() {
  38. return '#ffffff';
  39. }
  40. function captivating_customizer_get_default_announcement_color() {
  41. return '#f7f9fc';
  42. }
  43. function captivating_customizer_get_default_announcementtext_color() {
  44. return '#333333';
  45. }
  46. function captivating_customizer_get_default_featured_color() {
  47. return '#f7f9fc';
  48. }
  49. function captivating_customizer_get_default_newsletter_color() {
  50. return '#f7f9fc';
  51. }
  52. function captivating_customizer_get_default_newslettertext_color() {
  53. return '#333333';
  54. }
  55. function captivating_customizer_get_default_cta_color() {
  56. return '#f7f9fc';
  57. }
  58. function captivating_customizer_get_default_ctatext_color() {
  59. return '#333333';
  60. }
  61. function captivating_customizer_get_default_footer_color() {
  62. return '#f7f9fc';
  63. }
  64. function captivating_customizer_get_default_footertext_color() {
  65. return '#333333';
  66. }
  67. function captivating_customizer_get_default_readmorelink_color() {
  68. return '#55c7cf';
  69. }
  70. function captivating_customizer_get_default_widgettitle1_color() {
  71. return '#fff7e1';
  72. }
  73. function captivating_customizer_get_default_widgettitle2_color() {
  74. return '#fff4f0';
  75. }
  76. function captivating_customizer_get_default_widgettitle3_color() {
  77. return '#f7f9fc';
  78. }
  79. function captivating_customizer_get_default_sidebarwidgettitle1_color() {
  80. return '#fff7e1';
  81. }
  82. function captivating_customizer_get_default_sidebarwidgettitle2_color() {
  83. return '#fff4f0';
  84. }
  85. function captivating_customizer_get_default_sidebarwidgettitle3_color() {
  86. return '#f7f9fc';
  87. }
  88. function captivating_customizer_get_default_morecategory1_color() {
  89. return '#ffc933';
  90. }
  91. function captivating_customizer_get_default_morecategory2_color() {
  92. return '#f6748e';
  93. }
  94. function captivating_customizer_get_default_morecategory3_color() {
  95. return '#55c7cf';
  96. }
  97. //* Register settings and controls with the Customizer.
  98. add_action( 'customize_register', 'captivating_customizer_register' );
  99. function captivating_customizer_register() {
  100. global $wp_customize;
  101. $wp_customize->add_setting(
  102. 'captivating_text_color',
  103. array(
  104. 'default' => captivating_customizer_get_default_text_color(),
  105. 'sanitize_callback' => 'sanitize_hex_color',
  106. )
  107. );
  108. $wp_customize->add_setting(
  109. 'captivating_links_color',
  110. array(
  111. 'default' => captivating_customizer_get_default_links_color(),
  112. 'sanitize_callback' => 'sanitize_hex_color',
  113. )
  114. );
  115. $wp_customize->add_setting(
  116. 'captivating_linkshover_color',
  117. array(
  118. 'default' => captivating_customizer_get_default_linkshover_color(),
  119. 'sanitize_callback' => 'sanitize_hex_color',
  120. )
  121. );
  122. $wp_customize->add_setting(
  123. 'captivating_button_color',
  124. array(
  125. 'default' => captivating_customizer_get_default_button_color(),
  126. 'sanitize_callback' => 'sanitize_hex_color',
  127. )
  128. );
  129. $wp_customize->add_setting(
  130. 'captivating_buttonborder_color',
  131. array(
  132. 'default' => captivating_customizer_get_default_buttonborder_color(),
  133. 'sanitize_callback' => 'sanitize_hex_color',
  134. )
  135. );
  136. $wp_customize->add_setting(
  137. 'captivating_buttontext_color',
  138. array(
  139. 'default' => captivating_customizer_get_default_buttontext_color(),
  140. 'sanitize_callback' => 'sanitize_hex_color',
  141. )
  142. );
  143. $wp_customize->add_setting(
  144. 'captivating_buttonhover_color',
  145. array(
  146. 'default' => captivating_customizer_get_default_buttonhover_color(),
  147. 'sanitize_callback' => 'sanitize_hex_color',
  148. )
  149. );
  150. $wp_customize->add_setting(
  151. 'captivating_buttonhoverborder_color',
  152. array(
  153. 'default' => captivating_customizer_get_default_buttonhoverborder_color(),
  154. 'sanitize_callback' => 'sanitize_hex_color',
  155. )
  156. );
  157. $wp_customize->add_setting(
  158. 'captivating_buttonhovertext_color',
  159. array(
  160. 'default' => captivating_customizer_get_default_buttonhovertext_color(),
  161. 'sanitize_callback' => 'sanitize_hex_color',
  162. )
  163. );
  164. $wp_customize->add_setting(
  165. 'captivating_announcement_color',
  166. array(
  167. 'default' => captivating_customizer_get_default_announcement_color(),
  168. 'sanitize_callback' => 'sanitize_hex_color',
  169. )
  170. );
  171. $wp_customize->add_setting(
  172. 'captivating_announcementtext_color',
  173. array(
  174. 'default' => captivating_customizer_get_default_announcementtext_color(),
  175. 'sanitize_callback' => 'sanitize_hex_color',
  176. )
  177. );
  178. $wp_customize->add_setting(
  179. 'captivating_featured_color',
  180. array(
  181. 'default' => captivating_customizer_get_default_featured_color(),
  182. 'sanitize_callback' => 'sanitize_hex_color',
  183. )
  184. );
  185. $wp_customize->add_setting(
  186. 'captivating_newsletter_color',
  187. array(
  188. 'default' => captivating_customizer_get_default_newsletter_color(),
  189. 'sanitize_callback' => 'sanitize_hex_color',
  190. )
  191. );
  192. $wp_customize->add_setting(
  193. 'captivating_newslettertext_color',
  194. array(
  195. 'default' => captivating_customizer_get_default_newslettertext_color(),
  196. 'sanitize_callback' => 'sanitize_hex_color',
  197. )
  198. );
  199. $wp_customize->add_setting(
  200. 'captivating_cta_color',
  201. array(
  202. 'default' => captivating_customizer_get_default_cta_color(),
  203. 'sanitize_callback' => 'sanitize_hex_color',
  204. )
  205. );
  206. $wp_customize->add_setting(
  207. 'captivating_ctatext_color',
  208. array(
  209. 'default' => captivating_customizer_get_default_ctatext_color(),
  210. 'sanitize_callback' => 'sanitize_hex_color',
  211. )
  212. );
  213. $wp_customize->add_setting(
  214. 'captivating_footer_color',
  215. array(
  216. 'default' => captivating_customizer_get_default_footer_color(),
  217. 'sanitize_callback' => 'sanitize_hex_color',
  218. )
  219. );
  220. $wp_customize->add_setting(
  221. 'captivating_footertext_color',
  222. array(
  223. 'default' => captivating_customizer_get_default_footertext_color(),
  224. 'sanitize_callback' => 'sanitize_hex_color',
  225. )
  226. );
  227. $wp_customize->add_setting(
  228. 'captivating_readmorelink_color',
  229. array(
  230. 'default' => captivating_customizer_get_default_readmorelink_color(),
  231. 'sanitize_callback' => 'sanitize_hex_color',
  232. )
  233. );
  234. $wp_customize->add_setting(
  235. 'captivating_widgettitle1_color',
  236. array(
  237. 'default' => captivating_customizer_get_default_widgettitle1_color(),
  238. 'sanitize_callback' => 'sanitize_hex_color',
  239. )
  240. );
  241. $wp_customize->add_setting(
  242. 'captivating_widgettitle2_color',
  243. array(
  244. 'default' => captivating_customizer_get_default_widgettitle2_color(),
  245. 'sanitize_callback' => 'sanitize_hex_color',
  246. )
  247. );
  248. $wp_customize->add_setting(
  249. 'captivating_widgettitle3_color',
  250. array(
  251. 'default' => captivating_customizer_get_default_widgettitle3_color(),
  252. 'sanitize_callback' => 'sanitize_hex_color',
  253. )
  254. );
  255. $wp_customize->add_setting(
  256. 'captivating_sidebarwidgettitle1_color',
  257. array(
  258. 'default' => captivating_customizer_get_default_sidebarwidgettitle1_color(),
  259. 'sanitize_callback' => 'sanitize_hex_color',
  260. )
  261. );
  262. $wp_customize->add_setting(
  263. 'captivating_sidebarwidgettitle2_color',
  264. array(
  265. 'default' => captivating_customizer_get_default_sidebarwidgettitle2_color(),
  266. 'sanitize_callback' => 'sanitize_hex_color',
  267. )
  268. );
  269. $wp_customize->add_setting(
  270. 'captivating_sidebarwidgettitle3_color',
  271. array(
  272. 'default' => captivating_customizer_get_default_sidebarwidgettitle3_color(),
  273. 'sanitize_callback' => 'sanitize_hex_color',
  274. )
  275. );
  276. $wp_customize->add_setting(
  277. 'captivating_morecategory1_color',
  278. array(
  279. 'default' => captivating_customizer_get_default_morecategory1_color(),
  280. 'sanitize_callback' => 'sanitize_hex_color',
  281. )
  282. );
  283. $wp_customize->add_setting(
  284. 'captivating_morecategory2_color',
  285. array(
  286. 'default' => captivating_customizer_get_default_morecategory2_color(),
  287. 'sanitize_callback' => 'sanitize_hex_color',
  288. )
  289. );
  290. $wp_customize->add_setting(
  291. 'captivating_morecategory3_color',
  292. array(
  293. 'default' => captivating_customizer_get_default_morecategory3_color(),
  294. 'sanitize_callback' => 'sanitize_hex_color',
  295. )
  296. );
  297. //* Add Labels to add headings.
  298. $wp_customize->add_control(
  299. new WP_Customize_Color_Control(
  300. $wp_customize,
  301. 'captivating_text_color',
  302. array(
  303. 'description' => __( 'Change the default color for all the body text across the site.', 'captivating' ),
  304. 'label' => __( 'Main Text Color', 'captivating' ),
  305. 'section' => 'colors',
  306. 'settings' => 'captivating_text_color',
  307. )
  308. )
  309. );
  310. $wp_customize->add_control(
  311. new WP_Customize_Color_Control(
  312. $wp_customize,
  313. 'captivating_links_color',
  314. array(
  315. 'description' => __( 'Change the default color for all your links across the site', 'captivating' ),
  316. 'label' => __( 'Link Color', 'captivating' ),
  317. 'section' => 'colors',
  318. 'settings' => 'captivating_links_color',
  319. )
  320. )
  321. );
  322. $wp_customize->add_control(
  323. new WP_Customize_Color_Control(
  324. $wp_customize,
  325. 'captivating_linkshover_color',
  326. array(
  327. 'description' => __( 'Change the default color for all your links when hovered on across the site', 'captivating' ),
  328. 'label' => __( 'Link Color ON HOVER', 'captivating' ),
  329. 'section' => 'colors',
  330. 'settings' => 'captivating_linkshover_color',
  331. )
  332. )
  333. );
  334. $wp_customize->add_control(
  335. new WP_Customize_Color_Control(
  336. $wp_customize,
  337. 'captivating_button_color',
  338. array(
  339. 'description' => __( 'Change the default background color for all the buttons.', 'captivating' ),
  340. 'label' => __( 'Button Background Color', 'captivating' ),
  341. 'section' => 'colors',
  342. 'settings' => 'captivating_button_color',
  343. )
  344. )
  345. );
  346. $wp_customize->add_control(
  347. new WP_Customize_Color_Control(
  348. $wp_customize,
  349. 'captivating_buttonborder_color',
  350. array(
  351. 'description' => __( 'Change the default color for the border on all the buttons.', 'captivating' ),
  352. 'label' => __( 'Button Border Color', 'captivating' ),
  353. 'section' => 'colors',
  354. 'settings' => 'captivating_buttonborder_color',
  355. )
  356. )
  357. );
  358. $wp_customize->add_control(
  359. new WP_Customize_Color_Control(
  360. $wp_customize,
  361. 'captivating_buttontext_color',
  362. array(
  363. 'description' => __( 'Change the default color for the text on the buttons.', 'captivating' ),
  364. 'label' => __( 'Button Text Color', 'captivating' ),
  365. 'section' => 'colors',
  366. 'settings' => 'captivating_buttontext_color',
  367. )
  368. )
  369. );
  370. $wp_customize->add_control(
  371. new WP_Customize_Color_Control(
  372. $wp_customize,
  373. 'captivating_buttonhover_color',
  374. array(
  375. 'description' => __( 'Change the default background color for all the buttons when hovered.', 'captivating' ),
  376. 'label' => __( 'Button Background Color ON HOVER', 'captivating' ),
  377. 'section' => 'colors',
  378. 'settings' => 'captivating_buttonhover_color',
  379. )
  380. )
  381. );
  382. $wp_customize->add_control(
  383. new WP_Customize_Color_Control(
  384. $wp_customize,
  385. 'captivating_buttonhoverborder_color',
  386. array(
  387. 'description' => __( 'Change the default color for the border on all the buttons when hovered.', 'captivating' ),
  388. 'label' => __( 'Button Hover Border Color ON HOVER', 'captivating' ),
  389. 'section' => 'colors',
  390. 'settings' => 'captivating_buttonhoverborder_color',
  391. )
  392. )
  393. );
  394. $wp_customize->add_control(
  395. new WP_Customize_Color_Control(
  396. $wp_customize,
  397. 'captivating_buttonhovertext_color',
  398. array(
  399. 'description' => __( 'Change the default color for the text on the buttons when hovered.', 'captivating' ),
  400. 'label' => __( 'Button Hover Text Color ON HOVER', 'captivating' ),
  401. 'section' => 'colors',
  402. 'settings' => 'captivating_buttonhovertext_color',
  403. )
  404. )
  405. );
  406. $wp_customize->add_control(
  407. new WP_Customize_Color_Control(
  408. $wp_customize,
  409. 'captivating_announcement_color',
  410. array(
  411. 'description' => __( 'Change the default background color on the top announcement bar.', 'captivating' ),
  412. 'label' => __( 'Announcement Background Color', 'captivating' ),
  413. 'section' => 'colors',
  414. 'settings' => 'captivating_announcement_color',
  415. )
  416. )
  417. );
  418. $wp_customize->add_control(
  419. new WP_Customize_Color_Control(
  420. $wp_customize,
  421. 'captivating_announcementtext_color',
  422. array(
  423. 'description' => __( 'Change the default text color on the top announcement bar.', 'captivating' ),
  424. 'label' => __( 'Announcement Text Color', 'captivating' ),
  425. 'section' => 'colors',
  426. 'settings' => 'captivating_announcementtext_color',
  427. )
  428. )
  429. );
  430. $wp_customize->add_control(
  431. new WP_Customize_Color_Control(
  432. $wp_customize,
  433. 'captivating_featured_color',
  434. array(
  435. 'description' => __( 'Change the default background color on the featured content section at the top of the home page and top of the custom blog template.', 'captivating' ),
  436. 'label' => __( 'Featured Content Background', 'captivating' ),
  437. 'section' => 'colors',
  438. 'settings' => 'captivating_featured_color',
  439. )
  440. )
  441. );
  442. $wp_customize->add_control(
  443. new WP_Customize_Color_Control(
  444. $wp_customize,
  445. 'captivating_newsletter_color',
  446. array(
  447. 'description' => __( 'Change the default background color of the subscription box on the sidebar, the convert kit newsletter, as well as the background on the categories in the category index.', 'captivating' ),
  448. 'label' => __( 'Newsletter Background', 'captivating' ),
  449. 'section' => 'colors',
  450. 'settings' => 'captivating_newsletter_color',
  451. )
  452. )
  453. );
  454. $wp_customize->add_control(
  455. new WP_Customize_Color_Control(
  456. $wp_customize,
  457. 'captivating_newslettertext_color',
  458. array(
  459. 'description' => __( 'Change the default text color of the subscription box on the sidebar, the convert kit newsletter, as well as the background on the categories in the category index.', 'captivating' ),
  460. 'label' => __( 'Newsletter Text', 'captivating' ),
  461. 'section' => 'colors',
  462. 'settings' => 'captivating_newslettertext_color',
  463. )
  464. )
  465. );
  466. $wp_customize->add_control(
  467. new WP_Customize_Color_Control(
  468. $wp_customize,
  469. 'captivating_cta_color',
  470. array(
  471. 'description' => __( 'Change the default background color of the Site Wide CTA.', 'captivating' ),
  472. 'label' => __( 'CTA Background', 'captivating' ),
  473. 'section' => 'colors',
  474. 'settings' => 'captivating_cta_color',
  475. )
  476. )
  477. );
  478. $wp_customize->add_control(
  479. new WP_Customize_Color_Control(
  480. $wp_customize,
  481. 'captivating_ctatext_color',
  482. array(
  483. 'description' => __( 'Change the default text color of the Site Wide CTA.', 'captivating' ),
  484. 'label' => __( 'CTA Text', 'captivating' ),
  485. 'section' => 'colors',
  486. 'settings' => 'captivating_ctatext_color',
  487. )
  488. )
  489. );
  490. $wp_customize->add_control(
  491. new WP_Customize_Color_Control(
  492. $wp_customize,
  493. 'captivating_footer_color',
  494. array(
  495. 'description' => __( 'Change the default background color of the footer credits. This also controls the color of your drop down menus.', 'captivating' ),
  496. 'label' => __( 'Footer Background Color', 'captivating' ),
  497. 'section' => 'colors',
  498. 'settings' => 'captivating_footer_color',
  499. )
  500. )
  501. );
  502. $wp_customize->add_control(
  503. new WP_Customize_Color_Control(
  504. $wp_customize,
  505. 'captivating_footertext_color',
  506. array(
  507. 'description' => __( 'Change the default text color of the footer credits.', 'captivating' ),
  508. 'label' => __( 'Footer Text Color', 'captivating' ),
  509. 'section' => 'colors',
  510. 'settings' => 'captivating_footertext_color',
  511. )
  512. )
  513. );
  514. $wp_customize->add_control(
  515. new WP_Customize_Color_Control(
  516. $wp_customize,
  517. 'captivating_readmorelink_color',
  518. array(
  519. 'description' => __( 'Change the default color of the read more links.', 'captivating' ),
  520. 'label' => __( 'Read More Link', 'captivating' ),
  521. 'section' => 'colors',
  522. 'settings' => 'captivating_readmorelink_color',
  523. )
  524. )
  525. );
  526. $wp_customize->add_control(
  527. new WP_Customize_Color_Control(
  528. $wp_customize,
  529. 'captivating_widgettitle1_color',
  530. array(
  531. 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
  532. 'label' => __( 'Widget Title Border 1', 'captivating' ),
  533. 'section' => 'colors',
  534. 'settings' => 'captivating_widgettitle1_color',
  535. )
  536. )
  537. );
  538. $wp_customize->add_control(
  539. new WP_Customize_Color_Control(
  540. $wp_customize,
  541. 'captivating_widgettitle2_color',
  542. array(
  543. 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
  544. 'label' => __( 'Widget Title Border 2', 'captivating' ),
  545. 'section' => 'colors',
  546. 'settings' => 'captivating_widgettitle2_color',
  547. )
  548. )
  549. );
  550. $wp_customize->add_control(
  551. new WP_Customize_Color_Control(
  552. $wp_customize,
  553. 'captivating_widgettitle3_color',
  554. array(
  555. 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
  556. 'label' => __( 'Widget Title Border 3', 'captivating' ),
  557. 'section' => 'colors',
  558. 'settings' => 'captivating_widgettitle3_color',
  559. )
  560. )
  561. );
  562. $wp_customize->add_control(
  563. new WP_Customize_Color_Control(
  564. $wp_customize,
  565. 'captivating_sidebarwidgettitle1_color',
  566. array(
  567. 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
  568. 'label' => __( 'Sidebar Widget Title Border 1', 'captivating' ),
  569. 'section' => 'colors',
  570. 'settings' => 'captivating_sidebarwidgettitle1_color',
  571. )
  572. )
  573. );
  574. $wp_customize->add_control(
  575. new WP_Customize_Color_Control(
  576. $wp_customize,
  577. 'captivating_sidebarwidgettitle2_color',
  578. array(
  579. 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
  580. 'label' => __( 'Sidebar Widget Title Border 2', 'captivating' ),
  581. 'section' => 'colors',
  582. 'settings' => 'captivating_sidebarwidgettitle2_color',
  583. )
  584. )
  585. );
  586. $wp_customize->add_control(
  587. new WP_Customize_Color_Control(
  588. $wp_customize,
  589. 'captivating_sidebarwidgettitle3_color',
  590. array(
  591. 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
  592. 'label' => __( 'Sidebar Widget Title Border 3', 'captivating' ),
  593. 'section' => 'colors',
  594. 'settings' => 'captivating_sidebarwidgettitle3_color',
  595. )
  596. )
  597. );
  598. $wp_customize->add_control(
  599. new WP_Customize_Color_Control(
  600. $wp_customize,
  601. 'captivating_morecategory1_color',
  602. array(
  603. 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
  604. 'label' => __( 'More from Category Link 1', 'captivating' ),
  605. 'section' => 'colors',
  606. 'settings' => 'captivating_morecategory1_color',
  607. )
  608. )
  609. );
  610. $wp_customize->add_control(
  611. new WP_Customize_Color_Control(
  612. $wp_customize,
  613. 'captivating_morecategory2_color',
  614. array(
  615. 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
  616. 'label' => __( 'More from Category Link 2', 'captivating' ),
  617. 'section' => 'colors',
  618. 'settings' => 'captivating_morecategory2_color',
  619. )
  620. )
  621. );
  622. $wp_customize->add_control(
  623. new WP_Customize_Color_Control(
  624. $wp_customize,
  625. 'captivating_morecategory3_color',
  626. array(
  627. 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
  628. 'label' => __( 'More from Category Link 3', 'captivating' ),
  629. 'section' => 'colors',
  630. 'settings' => 'captivating_morecategory3_color',
  631. )
  632. )
  633. );
  634. //* Add front page setting to the Customizer
  635. $wp_customize->add_section( 'captivating_blog_section', array(
  636. 'title' => __( 'Front Page Content Settings', 'captivating' ),
  637. 'description' => __( 'Choose if you would like to display the content section below widget sections on the front page.', 'captivating' ),
  638. 'priority' => 75.01,
  639. ));
  640. //* Add front page setting to the Customizer
  641. $wp_customize->add_setting( 'captivating_blog_setting', array(
  642. 'default' => 'true',
  643. 'capability' => 'edit_theme_options',
  644. 'type' => 'option',
  645. ));
  646. $wp_customize->add_control( new WP_Customize_Control(
  647. $wp_customize, 'captivating_blog_control', array(
  648. 'label' => __( 'Front Page Content Section Display', 'captivating' ),
  649. 'description' => __( 'Show or Hide the content section. The section will display on the front page by default.', 'captivating' ),
  650. 'section' => 'captivating_blog_section',
  651. 'settings' => 'captivating_blog_setting',
  652. 'type' => 'select',
  653. 'choices' => array(
  654. 'false' => __( 'Hide content section', 'captivating' ),
  655. 'true' => __( 'Show content section', 'captivating' ),
  656. ),
  657. ))
  658. );
  659. $wp_customize->add_setting( 'captivating_blog_text', array(
  660. 'default' => __( 'Latest from the Blog', 'captivating' ),
  661. 'capability' => 'edit_theme_options',
  662. 'sanitize_callback' => 'wp_kses_post',
  663. 'type' => 'option',
  664. ));
  665. $wp_customize->add_control( new WP_Customize_Control(
  666. $wp_customize, 'captivating_blog_text_control', array(
  667. 'label' => __( 'Blog Section Heading Text', 'captivating' ),
  668. 'description' => __( 'Choose the heading text you would like to display above posts on the front page.<br /><br />This text will show when displaying posts and using widgets on the front page.', 'captivating' ),
  669. 'section' => 'captivating_blog_section',
  670. 'settings' => 'captivating_blog_text',
  671. 'type' => 'text',
  672. ))
  673. );
  674. }