weblizar_gl_customizer

The Enigma weblizar gl customizer function.

Description

weblizar_gl_customizer( $wp_customize ); 

Parameters (1)

0. $wp_customize
The wp customize.

Usage

  1. if ( !function_exists( 'weblizar_gl_customizer' ) ) { 
  2. require_once '/customizer.php'; 
  3.  
  4. // The wp customize. 
  5. $wp_customize = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = weblizar_gl_customizer($wp_customize); 
  9.  

Defined (1)

The function is defined in the following location(s).

/customizer.php  
  1. function weblizar_gl_customizer( $wp_customize ) { 
  2. wp_enqueue_style('customizr', WL_TEMPLATE_DIR_URI .'/css/customizr.css'); 
  3. wp_enqueue_style('FA', WL_TEMPLATE_DIR_URI .'/css/font-awesome-4.7.0/css/font-awesome.min.css'); 
  4.  
  5. $ImageUrl1 = esc_url(get_template_directory_uri() ."/images/1.png"); 
  6. $ImageUrl2 = esc_url(get_template_directory_uri() ."/images/2.png"); 
  7. $ImageUrl3 = esc_url(get_template_directory_uri() ."/images/3.png"); 
  8. $port['1'] = esc_url(get_template_directory_uri() ."/images/portfolio1.png"); 
  9. $port['2'] = esc_url(get_template_directory_uri() ."/images/portfolio2.png"); 
  10. $port['3'] = esc_url(get_template_directory_uri() ."/images/portfolio3.png"); 
  11. $port['4'] = esc_url(get_template_directory_uri() ."/images/portfolio4.png");  
  12.  
  13.  
  14. /** Genral section */ 
  15. $wp_customize->add_panel( 'enigma_theme_option', array( 
  16. 'title' => __( 'Theme Options', 'enigma' ),  
  17. 'priority' => 1, // Mixed with top-level-section hierarchy. 
  18. ) ); 
  19. $wp_customize->add_section( 
  20. 'general_sec',  
  21. array( 
  22. 'title' => __( 'Theme General Options', 'enigma' ),  
  23. 'description' => 'Here you can customize Your theme\'s general Settings',  
  24. 'panel'=>'enigma_theme_option',  
  25. 'capability'=>'edit_theme_options',  
  26. 'priority' => 35,  
  27.  
  28. ); 
  29. $wl_theme_options = weblizar_get_options(); 
  30. $wp_customize->add_setting( 
  31. 'enigma_options[_frontpage]',  
  32. array( 
  33. 'type' => 'option',  
  34. 'default'=>$wl_theme_options['_frontpage'],  
  35. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  36. 'capability' => 'edit_theme_options',  
  37. ); 
  38. $wp_customize->add_control( 'enigma_front_page', array( 
  39. 'label' => __( 'Show Front Page', 'enigma' ),  
  40. 'type'=>'checkbox',  
  41. 'section' => 'general_sec',  
  42. 'settings' => 'enigma_options[_frontpage]',  
  43. ) ); 
  44.  
  45. $wp_customize->add_setting( 
  46. 'enigma_options[title_position]',  
  47. array( 
  48. 'type' => 'option',  
  49. 'default'=>$wl_theme_options['title_position'],  
  50. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  51. 'capability' => 'edit_theme_options',  
  52. ); 
  53. $wp_customize->add_control( 'title_position', array( 
  54. 'label' => __( 'Show Site Title in Center', 'enigma' ),  
  55. 'type'=>'checkbox',  
  56. 'section' => 'general_sec',  
  57. 'settings' => 'enigma_options[title_position]',  
  58. ) ); 
  59.  
  60. $wp_customize->add_setting( 
  61. 'enigma_options[upload__header_image]',  
  62. array( 
  63. 'type' => 'option',  
  64. 'default'=>$wl_theme_options['upload__header_image'],  
  65. 'sanitize_callback'=>'esc_url_raw',  
  66. 'capability' => 'edit_theme_options',  
  67. ); 
  68.  
  69. $wp_customize->add_setting( 
  70. 'enigma_options[upload_image_logo]',  
  71. array( 
  72. 'type' => 'option',  
  73. 'default'=>$wl_theme_options['upload_image_logo'],  
  74. 'sanitize_callback'=>'esc_url_raw',  
  75. 'capability' => 'edit_theme_options',  
  76. ); 
  77.  
  78. // site title and logo position : left and center // 
  79. $wp_customize->add_setting( 
  80. 'enigma_options[title_position]',  
  81. array( 
  82. 'type' => 'option',  
  83. 'default'=>$wl_theme_options['title_position'],  
  84. 'sanitize_callback'=>'esc_url_raw',  
  85. 'capability' => 'edit_theme_options',  
  86. ); 
  87. // site title and logo position : left and center // 
  88.  
  89. $wp_customize->add_setting( 
  90. 'enigma_options[height]',  
  91. array( 
  92. 'type' => 'option',  
  93. 'default'=>$wl_theme_options['height'],  
  94. 'sanitize_callback'=>'enigma_sanitize_integer',  
  95. 'capability' => 'edit_theme_options' 
  96. ); 
  97.  
  98.  
  99.  
  100. $wp_customize->add_setting( 
  101. 'enigma_options[width]',  
  102. array( 
  103. 'type' => 'option',  
  104. 'default'=>$wl_theme_options['width'],  
  105. 'sanitize_callback'=>'enigma_sanitize_integer',  
  106. 'capability' => 'edit_theme_options',  
  107. ); 
  108.  
  109. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_upload_image', array( 
  110. 'label' => __( 'Header Image', 'enigma' ),  
  111. 'section' => 'general_sec',  
  112. 'settings' => 'enigma_options[upload__header_image]',  
  113. ) ) ); 
  114.  
  115. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_upload_image_logo', array( 
  116. 'label' => __( 'Website Logo', 'enigma' ),  
  117. 'section' => 'general_sec',  
  118. 'settings' => 'enigma_options[upload_image_logo]',  
  119. ) ) ); 
  120. $wp_customize->add_control( 'enigma_logo_height', array( 
  121. 'label' => __( 'Logo Height', 'enigma' ),  
  122. 'type'=>'number',  
  123. 'section' => 'general_sec',  
  124. 'settings' => 'enigma_options[height]',  
  125. ) ); 
  126. $wp_customize->add_control( 'enigma_logo_width', array( 
  127. 'label' => __( 'Logo Width', 'enigma' ),  
  128. 'type'=>'number',  
  129. 'section' => 'general_sec',  
  130. 'settings' => 'enigma_options[width]',  
  131. ) ); 
  132.  
  133. $wp_customize->add_setting( 
  134. 'enigma_options[upload_image_favicon]',  
  135. array( 
  136. 'type' => 'option',  
  137. 'default'=>$wl_theme_options['upload_image_favicon'],  
  138. 'capability' => 'edit_theme_options',  
  139. 'sanitize_callback'=>'esc_url_raw',  
  140. ); 
  141. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_upload_image_favicon', array( 
  142. 'label' => __( 'Custom favicon', 'enigma' ),  
  143. 'section' => 'general_sec',  
  144. 'settings' => 'enigma_options[upload_image_favicon]',  
  145. ) ) ); 
  146. $wp_customize->add_setting( 
  147. 'enigma_options[custom_css]',  
  148. array( 
  149. 'default'=>esc_attr($wl_theme_options['custom_css']),  
  150. 'type'=>'option',  
  151. 'capability'=>'edit_theme_options',  
  152. 'sanitize_callback'=>'enigma_sanitize_text',  
  153. ); 
  154. $wp_customize->add_control( 'custom_css', array( 
  155. 'label' => __( 'Custom CSS', 'enigma' ),  
  156. 'type'=>'textarea',  
  157. 'section' => 'general_sec',  
  158. 'settings' => 'enigma_options[custom_css]' 
  159. ) ); 
  160. /** Slider options */ 
  161. $wp_customize->add_section( 
  162. 'slider_sec',  
  163. array( 
  164. 'title' => __( 'Theme Slider Options', 'enigma' ),  
  165. 'panel'=>'enigma_theme_option',  
  166. 'description' => 'Here you can add slider images',  
  167. 'capability'=>'edit_theme_options',  
  168. 'priority' => 35,  
  169. 'active_callback' => 'is_front_page',  
  170. ); 
  171.  
  172.  
  173.  
  174. // 
  175.   
  176. $wp_customize->add_setting( 
  177. 'enigma_options[slider_image_speed]',  
  178. array( 
  179. 'type' => 'option',  
  180. 'default'=>$wl_theme_options['slider_image_speed'],  
  181. 'sanitize_callback'=>'enigma_sanitize_text',  
  182. 'capability' => 'edit_theme_options',  
  183. ); 
  184. $wp_customize->add_control( 'enigma_slider_speed', array( 
  185. 'label' => __( 'Slider Speed Option', 'enigma' ),  
  186. 'description' => 'Value will be in milliseconds',  
  187. 'type'=>'text',  
  188. 'section' => 'slider_sec',  
  189. 'settings' => 'enigma_options[slider_image_speed]',  
  190. ) ); 
  191.  
  192.  
  193. // 
  194.   
  195.  
  196. $wp_customize->add_setting( 
  197. 'enigma_options[slide_image_1]',  
  198. array( 
  199. 'type' => 'option',  
  200. 'default'=>$ImageUrl1,  
  201. 'capability' => 'edit_theme_options',  
  202. 'sanitize_callback'=>'esc_url_raw',  
  203. ); 
  204. $wp_customize->add_setting( 
  205. 'enigma_options[slide_image_2]',  
  206. array( 
  207. 'type' => 'option',  
  208. 'default'=>$ImageUrl2,  
  209. 'capability' => 'edit_theme_options',  
  210. 'sanitize_callback'=>'esc_url_raw' 
  211. ); 
  212. $wp_customize->add_setting( 
  213. 'enigma_options[slide_image_3]',  
  214. array( 
  215. 'type' => 'option',  
  216. 'default'=>$ImageUrl3,  
  217. 'capability' => 'edit_theme_options',  
  218. 'sanitize_callback'=>'esc_url_raw',  
  219.  
  220. ); 
  221. $wp_customize->add_setting( 
  222. 'enigma_options[slide_title_1]',  
  223. array( 
  224. 'type' => 'option',  
  225. 'default'=>$wl_theme_options['slide_title_1'],  
  226. 'capability' => 'edit_theme_options',  
  227. 'sanitize_callback'=>'enigma_sanitize_text',  
  228.  
  229. ); 
  230. $wp_customize->add_setting( 
  231. 'enigma_options[slide_title_2]',  
  232. array( 
  233. 'type' => 'option',  
  234. 'default'=>$wl_theme_options['slide_title_2'],  
  235. 'capability' => 'edit_theme_options',  
  236. 'sanitize_callback'=>'enigma_sanitize_text',  
  237.  
  238. ); 
  239. $wp_customize->add_setting( 
  240. 'enigma_options[slide_title_3]',  
  241. array( 
  242. 'type' => 'option',  
  243. 'default'=>$wl_theme_options['slide_title_3'],  
  244. 'capability' => 'edit_theme_options',  
  245. 'sanitize_callback'=>'enigma_sanitize_text',  
  246.  
  247. ); 
  248. $wp_customize->add_setting( 
  249. 'enigma_options[slide_desc_1]',  
  250. array( 
  251. 'type' => 'option',  
  252. 'default'=>$wl_theme_options['slide_desc_1'],  
  253. 'capability' => 'edit_theme_options',  
  254. 'sanitize_callback'=>'enigma_sanitize_text',  
  255.  
  256. ); 
  257. $wp_customize->add_setting( 
  258. 'enigma_options[slide_desc_2]',  
  259. array( 
  260. 'type' => 'option',  
  261. 'default'=>$wl_theme_options['slide_desc_2'],  
  262. 'capability' => 'edit_theme_options',  
  263. 'sanitize_callback'=>'enigma_sanitize_text',  
  264.  
  265. ); 
  266. $wp_customize->add_setting( 
  267. 'enigma_options[slide_desc_3]',  
  268. array( 
  269. 'type' => 'option',  
  270. 'default'=>$wl_theme_options['slide_desc_3'],  
  271. 'capability' => 'edit_theme_options',  
  272. 'sanitize_callback'=>'enigma_sanitize_text',  
  273.  
  274. ); 
  275. $wp_customize->add_setting( 
  276. 'enigma_options[slide_btn_text_1]',  
  277. array( 
  278. 'type' => 'option',  
  279. 'default'=>$wl_theme_options['slide_btn_text_1'],  
  280. 'capability' => 'edit_theme_options',  
  281. 'sanitize_callback'=>'enigma_sanitize_text',  
  282.  
  283. ); 
  284. $wp_customize->add_setting( 
  285. 'enigma_options[slide_btn_text_2]',  
  286. array( 
  287. 'type' => 'option',  
  288. 'default'=>$wl_theme_options['slide_btn_text_2'],  
  289. 'capability' => 'edit_theme_options',  
  290. 'sanitize_callback'=>'enigma_sanitize_text',  
  291.  
  292. ); 
  293. $wp_customize->add_setting( 
  294. 'enigma_options[slide_btn_text_3]',  
  295. array( 
  296. 'type' => 'option',  
  297. 'default'=>$wl_theme_options['slide_btn_text_3'],  
  298. 'capability' => 'edit_theme_options',  
  299. 'sanitize_callback'=>'enigma_sanitize_text',  
  300.  
  301. ); 
  302. $wp_customize->add_setting( 
  303. 'enigma_options[slide_btn_link_1]',  
  304. array( 
  305. 'type' => 'option',  
  306. 'default'=>$wl_theme_options['slide_btn_link_1'],  
  307. 'capability' => 'edit_theme_options',  
  308. 'sanitize_callback'=>'esc_url_raw',  
  309.  
  310. ); 
  311. $wp_customize->add_setting( 
  312. 'enigma_options[slide_btn_link_2]',  
  313. array( 
  314. 'type' => 'option',  
  315. 'default'=>$wl_theme_options['slide_btn_link_2'],  
  316. 'capability' => 'edit_theme_options',  
  317. 'sanitize_callback'=>'esc_url_raw',  
  318.  
  319. ); 
  320. $wp_customize->add_setting( 
  321. 'enigma_options[slide_btn_link_3]',  
  322. array( 
  323. 'type' => 'option',  
  324. 'default'=>$wl_theme_options['slide_btn_link_3'],  
  325. 'capability' => 'edit_theme_options',  
  326. 'sanitize_callback'=>'esc_url_raw',  
  327.  
  328. ); 
  329. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_slider_image_1', array( 
  330. 'label' => __( 'Slider Image One', 'enigma' ),  
  331. 'section' => 'slider_sec',  
  332. 'settings' => 'enigma_options[slide_image_1]' 
  333. ) ) ); 
  334. $wp_customize->add_control( 'enigma_slide_title_1', array( 
  335. 'label' => __( 'Slider title one', 'enigma' ),  
  336. 'type'=>'text',  
  337. 'section' => 'slider_sec',  
  338. 'settings' => 'enigma_options[slide_title_1]' 
  339. ) ); 
  340. $wp_customize->add_control( 'enigma_slide_desc_1', array( 
  341. 'label' => __( 'Slider description one', 'enigma' ),  
  342. 'type'=>'text',  
  343. 'section' => 'slider_sec',  
  344. 'settings' => 'enigma_options[slide_desc_1]' 
  345. ) ); 
  346. $wp_customize->add_control( 'Slider button one', array( 
  347. 'label' => __( 'Slider Button Text One', 'enigma' ),  
  348. 'type'=>'text',  
  349. 'section' => 'slider_sec',  
  350. 'settings' => 'enigma_options[slide_btn_text_1]' 
  351. ) ); 
  352.  
  353. $wp_customize->add_control( 'enigma_slide_btnlink_1', array( 
  354. 'label' => __( 'Slider Button Link One', 'enigma' ),  
  355. 'type'=>'url',  
  356. 'section' => 'slider_sec',  
  357. 'settings' => 'enigma_options[slide_btn_link_1]' 
  358. ) ); 
  359. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_slider_image_2', array( 
  360. 'label' => __( 'Slider Image Two ', 'enigma' ),  
  361. 'section' => 'slider_sec',  
  362. 'settings' => 'enigma_options[slide_image_2]' 
  363. ) ) ); 
  364.  
  365. $wp_customize->add_control( 'enigma_slide_title_2', array( 
  366. 'label' => __( 'Slider Title Two', 'enigma' ),  
  367. 'type'=>'text',  
  368. 'section' => 'slider_sec',  
  369. 'settings' => 'enigma_options[slide_title_2]' 
  370. ) ); 
  371. $wp_customize->add_control( 'enigma_slide_desc_2', array( 
  372. 'label' => __( 'Slider Description Two', 'enigma' ),  
  373. 'type'=>'text',  
  374. 'section' => 'slider_sec',  
  375. 'settings' => 'enigma_options[slide_desc_2]' 
  376. ) ); 
  377. $wp_customize->add_control( 'enigma_slide_btn_2', array( 
  378. 'label' => __( 'Slider Button Text Two', 'enigma' ),  
  379. 'type'=>'text',  
  380. 'section' => 'slider_sec',  
  381. 'settings' => 'enigma_options[slide_btn_text_2]' 
  382. ) ); 
  383. $wp_customize->add_control( 'enigma_slide_btnlink_2', array( 
  384. 'label' => __( 'Slider Button Link Two', 'enigma' ),  
  385. 'type'=>'url',  
  386. 'section' => 'slider_sec',  
  387. 'settings' => 'enigma_options[slide_btn_link_2]' 
  388. ) ); 
  389. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_slider_image_3', array( 
  390. 'label' => __( 'Slider Image Three', 'enigma' ),  
  391. 'section' => 'slider_sec',  
  392. 'settings' => 'enigma_options[slide_image_3]' 
  393. ) ) ); 
  394. $wp_customize->add_control( 'enigma_slide_title_3', array( 
  395. 'label' => __( 'Slider Title Three', 'enigma' ),  
  396. 'type'=>'text',  
  397. 'section' => 'slider_sec',  
  398. 'settings' => 'enigma_options[slide_title_3]' 
  399. ) ); 
  400.  
  401. $wp_customize->add_control( 'enigma_slide_desc_3', array( 
  402. 'label' => __( 'Slider Description Three', 'enigma' ),  
  403. 'type'=>'text',  
  404. 'section' => 'slider_sec',  
  405. 'settings' => 'enigma_options[slide_desc_3]' 
  406. ) ); 
  407. $wp_customize->add_control( 'enigma_slide_btn_3', array( 
  408. 'label' => __( 'Slider Button Text Three', 'enigma' ),  
  409. 'type'=>'text',  
  410. 'section' => 'slider_sec',  
  411. 'settings' => 'enigma_options[slide_btn_text_3]' 
  412. ) ); 
  413. $wp_customize->add_control( 'enigma_slide_btnlink_3', array( 
  414. 'label' => __( 'Slider Button Link Three', 'enigma' ),  
  415. 'type'=>'url',  
  416. 'section' => 'slider_sec',  
  417. 'settings' => 'enigma_options[slide_btn_link_3]' 
  418. ) ); 
  419.  
  420.  
  421. if (get_template_directory() !== get_stylesheet_directory()) { 
  422. /** Product options */ 
  423. $wp_customize->add_section('product_section', array( 
  424. 'title'=>__("Product Options", 'enigma'),  
  425. 'panel'=>'enigma_theme_option',  
  426. 'capability'=>'edit_theme_options',  
  427. 'priority' => 35,  
  428. ));  
  429.  
  430. $wp_customize->add_setting( 
  431. 'enigma_options[product_title]',  
  432. array( 
  433. 'default'=>esc_attr($wl_theme_options['product_title']),  
  434. 'type'=>'option',  
  435. 'capability'=>'edit_theme_options',  
  436. 'sanitize_callback'=>'enigma_sanitize_text',  
  437.  
  438. ); 
  439. $wp_customize->add_control( 'product_title', array( 
  440. 'label' => __( 'Product Title', 'enigma' ),  
  441. 'type'=>'text',  
  442. 'section' => 'product_section',  
  443. 'settings' => 'enigma_options[product_title]' 
  444. ) ); } 
  445.  
  446.  
  447.  
  448. /** Service Options */ 
  449. $wp_customize->add_section('service_section', array( 
  450. 'title'=>__("Service Options", 'enigma'),  
  451. 'panel'=>'enigma_theme_option',  
  452. 'capability'=>'edit_theme_options',  
  453. 'priority' => 35,  
  454. 'active_callback' => 'is_front_page',  
  455. )); 
  456. $wp_customize->add_setting( 
  457. 'enigma_options[service_home]',  
  458. array( 
  459. 'type' => 'option',  
  460. 'default'=>$wl_theme_options['service_home'],  
  461. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  462. 'capability' => 'edit_theme_options' 
  463. ); 
  464.  
  465.  
  466. $wp_customize->add_setting( 
  467. 'enigma_options[home_service_heading]',  
  468. array( 
  469. 'default'=>esc_attr($wl_theme_options['home_service_heading']),  
  470. 'type'=>'option',  
  471. 'capability'=>'edit_theme_options',  
  472. 'sanitize_callback'=>'enigma_sanitize_text',  
  473.  
  474. ); 
  475. $wp_customize->add_control( 'home_service_heading', array( 
  476. 'label' => __( 'Home Service Title', 'enigma' ),  
  477. 'type'=>'text',  
  478. 'section' => 'service_section',  
  479. 'settings' => 'enigma_options[home_service_heading]' 
  480. ) ); 
  481. $wp_customize->add_setting( 
  482. 'enigma_options[service_1_icons]',  
  483. array( 
  484. 'default'=>esc_attr($wl_theme_options['service_1_icons']),  
  485. 'type'=>'option',  
  486. 'capability'=>'edit_theme_options',  
  487. 'sanitize_callback'=>'enigma_sanitize_text',  
  488.  
  489. ); 
  490. $wp_customize->add_setting( 
  491. 'enigma_options[service_2_icons]',  
  492. array( 
  493. 'default'=>esc_attr($wl_theme_options['service_2_icons']),  
  494. 'type'=>'option',  
  495. 'capability'=>'edit_theme_options',  
  496. 'sanitize_callback'=>'enigma_sanitize_text',  
  497.  
  498. ); 
  499. $wp_customize->add_setting( 
  500. 'enigma_options[service_3_icons]',  
  501. array( 
  502. 'default'=>esc_attr($wl_theme_options['service_3_icons']),  
  503. 'type'=>'option',  
  504. 'capability'=>'edit_theme_options',  
  505. 'sanitize_callback'=>'enigma_sanitize_text',  
  506.  
  507. ); 
  508. $wp_customize->add_setting( 
  509. 'enigma_options[service_1_title]',  
  510. array( 
  511. 'default'=>esc_attr($wl_theme_options['service_1_title']),  
  512. 'type'=>'option',  
  513. 'capability'=>'edit_theme_options',  
  514. 'sanitize_callback'=>'enigma_sanitize_text',  
  515. ); 
  516. $wp_customize->add_setting( 
  517. 'enigma_options[service_2_title]',  
  518. array( 
  519. 'default'=>esc_attr($wl_theme_options['service_2_title']),  
  520. 'type'=>'option',  
  521. 'capability'=>'edit_theme_options',  
  522. 'sanitize_callback'=>'enigma_sanitize_text' 
  523. ); 
  524. $wp_customize->add_setting( 
  525. 'enigma_options[service_3_title]',  
  526. array( 
  527. 'default'=>esc_attr($wl_theme_options['service_3_title']),  
  528. 'type'=>'option',  
  529. 'sanitize_callback'=>'enigma_sanitize_text',  
  530. 'capability'=>'edit_theme_options',  
  531. ); 
  532. $wp_customize->add_setting( 
  533. 'enigma_options[service_1_text]',  
  534. array( 
  535. 'default'=>esc_attr($wl_theme_options['service_1_text']),  
  536. 'type'=>'option',  
  537. 'sanitize_callback'=>'enigma_sanitize_text',  
  538. 'capability'=>'edit_theme_options',  
  539. ); 
  540. $wp_customize->add_setting( 
  541. 'enigma_options[service_2_text]',  
  542. array( 
  543. 'default'=>esc_attr($wl_theme_options['service_2_text']),  
  544. 'type'=>'option',  
  545. 'sanitize_callback'=>'enigma_sanitize_text',  
  546. 'capability'=>'edit_theme_options',  
  547. ); 
  548. $wp_customize->add_setting( 
  549. 'enigma_options[service_3_text]',  
  550. array( 
  551. 'default'=>esc_attr($wl_theme_options['service_3_text']),  
  552. 'type'=>'option',  
  553. 'sanitize_callback'=>'enigma_sanitize_text',  
  554. 'capability'=>'edit_theme_options',  
  555. ); 
  556.  
  557. $wp_customize->add_setting( 
  558. 'enigma_options[service_1_link]',  
  559. array( 
  560. 'default'=>esc_attr($wl_theme_options['service_1_link']),  
  561. 'type'=>'option',  
  562. 'capability'=>'edit_theme_options',  
  563. 'sanitize_callback'=>'esc_url_raw',  
  564. )); 
  565. $wp_customize->add_setting( 
  566. 'enigma_options[service_2_link]',  
  567. array( 
  568. 'default'=>esc_attr($wl_theme_options['service_2_link']),  
  569. 'type'=>'option',  
  570. 'capability'=>'edit_theme_options',  
  571. 'sanitize_callback'=>'esc_url_raw',  
  572. )); 
  573. $wp_customize->add_setting( 
  574. 'enigma_options[service_3_link]',  
  575. array( 
  576. 'default'=>esc_attr($wl_theme_options['service_3_link']),  
  577. 'type'=>'option',  
  578. 'capability'=>'edit_theme_options',  
  579. 'sanitize_callback'=>'esc_url_raw',  
  580. )); 
  581.  
  582. $wp_customize->add_control( 'enigma_show_service', array( 
  583. 'label' => __( 'Enable Service on Home', 'enigma' ),  
  584. 'type'=>'checkbox',  
  585. 'section' => 'service_section',  
  586. 'settings' => 'enigma_options[service_home]' 
  587. ) ); 
  588.  
  589. $wp_customize->add_control( 
  590. $wp_customize,  
  591. 'service_options1-line',  
  592. array( 
  593. 'section' => 'service_section',  
  594. 'type' => 'line' 
  595. )); 
  596.  
  597. $wp_customize->add_control( 'service_one_title', array( 
  598. 'label' => __( 'Service One Title', 'enigma' ),  
  599. 'type'=>'text',  
  600. 'section' => 'service_section',  
  601. 'settings' => 'enigma_options[service_1_title]' 
  602. ) ); 
  603.  
  604. $wp_customize->add_control('enigma_options[service_1_icons]',  
  605. array( 
  606. 'label' => __( 'Service Icon One', 'enigma' ),  
  607. 'description'=>__('<a href="http://fontawesome.io/icons/">FontAwesome Icons</a>', 'enigma'),  
  608. 'section' => 'service_section',  
  609. 'type'=>'text',  
  610. 'settings' => 'enigma_options[service_1_icons]' 
  611. ); 
  612.  
  613. $wp_customize->add_control( 'service_one_text', array( 
  614. 'label' => __( 'Service One Text', 'enigma' ),  
  615. 'type'=>'text',  
  616. 'section' => 'service_section',  
  617. 'settings' => 'enigma_options[service_1_text]' 
  618. ) ); 
  619. $wp_customize->add_control( 'service_1_link', array( 
  620. 'label' => __( 'Service One Link', 'enigma' ),  
  621. 'type'=>'url',  
  622. 'section' => 'service_section',  
  623. 'settings' => 'enigma_options[service_1_link]' 
  624. ) ); 
  625. $wp_customize->add_control( 
  626. $wp_customize,  
  627. 'service_options2-line',  
  628. array( 
  629. 'section' => 'service_section',  
  630. 'type' => 'line' 
  631. )); 
  632. $wp_customize->add_control( 'service_two_title', array( 
  633. 'label' => __( 'Service Two Title', 'enigma' ),  
  634. 'type'=>'text',  
  635. 'section' => 'service_section',  
  636. 'settings' => 'enigma_options[service_2_title]' 
  637. ) ); 
  638. $wp_customize->add_control( 'enigma_options[service_2_icons]',  
  639. array( 
  640. 'label' => __( 'Service Icon Two', 'enigma' ),  
  641. 'description'=>__('<a href="http://fontawesome.io/icons/">FontAwesome Icons</a>', 'enigma'),  
  642. 'section' => 'service_section',  
  643. 'type'=>'text',  
  644. 'settings' => 'enigma_options[service_2_icons]' 
  645. ); 
  646. $wp_customize->add_control( 'enigma_service_two_text', array( 
  647. 'label' => __( 'Service Two Text', 'enigma' ),  
  648. 'type'=>'text',  
  649. 'section' => 'service_section',  
  650. 'settings' => 'enigma_options[service_2_text]' 
  651. ) ); 
  652. $wp_customize->add_control( 'service_2_link', array( 
  653. 'label' => __( 'Service Two Link', 'enigma' ),  
  654. 'type'=>'url',  
  655. 'section' => 'service_section',  
  656. 'settings' => 'enigma_options[service_2_link]' 
  657. ) ); 
  658. $wp_customize->add_control(new enigma_Customize_Misc_Control
  659. $wp_customize, 'enigma_service_options3-line',  
  660. array( 
  661. 'section' => 'service_section',  
  662. 'type' => 'line' 
  663. )); 
  664. $wp_customize->add_control( 'enigma_service_three_title', array( 
  665. 'label' => __( 'Service Three Title', 'enigma' ),  
  666. 'type'=>'text',  
  667. 'section' => 'service_section',  
  668. 'settings' => 'enigma_options[service_3_title]' 
  669. ) ); 
  670. $wp_customize->add_control('enigma_options[service_3_icons]',  
  671. array( 
  672. 'label' => __( 'Service Icon Three', 'enigma' ),  
  673. 'description'=>__('<a href="http://fontawesome.io/icons/">FontAwesome Icons</a>', 'enigma'),  
  674. 'section' => 'service_section',  
  675. 'type'=>'text',  
  676. 'settings' => 'enigma_options[service_3_icons]' 
  677. ); 
  678. $wp_customize->add_control( 'enigma_service_three_text', array( 
  679. 'label' => __( 'Service Three Text', 'enigma' ),  
  680. 'type'=>'text',  
  681. 'section' => 'service_section',  
  682. 'settings' => 'enigma_options[service_3_text]' 
  683. ) ); 
  684. $wp_customize->add_control( 'service_3_link', array( 
  685. 'label' => __( 'Service Three Link', 'enigma' ),  
  686. 'type'=>'url',  
  687. 'section' => 'service_section',  
  688. 'settings' => 'enigma_options[service_3_link]' 
  689. ) ); 
  690. /** Portfolio Section */ 
  691. $wp_customize->add_section( 
  692. 'portfolio_section',  
  693. array( 
  694. 'title' => __('Portfolio Options', 'enigma'),  
  695. 'description' => __('Here you can add Portfolio title, description and even portfolios', 'enigma'),  
  696. 'panel'=>'enigma_theme_option',  
  697. 'capability'=>'edit_theme_options',  
  698. 'priority' => 35,  
  699. ); 
  700.  
  701. $wp_customize->add_setting( 
  702. 'enigma_options[portfolio_home]',  
  703. array( 
  704. 'type' => 'option',  
  705. 'default'=>$wl_theme_options['portfolio_home'],  
  706. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  707. 'capability' => 'edit_theme_options' 
  708. ); 
  709. $wp_customize->add_setting( 
  710. 'enigma_options[port_heading]',  
  711. array( 
  712. 'type' => 'option',  
  713. 'default'=>$wl_theme_options['port_heading'],  
  714. 'capability' => 'edit_theme_options',  
  715. 'sanitize_callback'=>'enigma_sanitize_text',  
  716. ); 
  717.  
  718. for($i=1;$i<=4;$i++) {  
  719. $wp_customize->add_setting( 
  720. 'enigma_options[port_'.$i.'_img]',  
  721. array( 
  722. 'type' => 'option',  
  723. 'default'=>$port[$i],  
  724. 'capability' => 'edit_theme_options',  
  725. 'sanitize_callback'=>'esc_url_raw',  
  726. ); 
  727. $wp_customize->add_setting( 
  728. 'enigma_options[port_'.$i.'_title]',  
  729. array( 
  730. 'type' => 'option',  
  731. 'default'=>$wl_theme_options['port_'.$i.'_title'],  
  732. 'capability' => 'edit_theme_options',  
  733. 'sanitize_callback'=>'enigma_sanitize_text',  
  734. ); 
  735.  
  736. $wp_customize->add_setting( 
  737. 'enigma_options[port_'.$i.'_link]',  
  738. array( 
  739. 'type' => 'option',  
  740. 'default'=>$wl_theme_options['port_'.$i.'_link'],  
  741. 'capability' => 'edit_theme_options',  
  742. 'sanitize_callback'=>'esc_url_raw',  
  743. ); 
  744.  
  745. $wp_customize->add_control( 'enigma_show_portfolio', array( 
  746. 'label' => __( 'Enable Portfolio on Home', 'enigma' ),  
  747. 'type'=>'checkbox',  
  748. 'section' => 'portfolio_section',  
  749. 'settings' => 'enigma_options[portfolio_home]' 
  750. ) ); 
  751. $wp_customize->add_control( 'enigma_portfolio_title', array( 
  752. 'label' => __( 'Portfolio Heading', 'enigma' ),  
  753. 'type'=>'text',  
  754. 'section' => 'portfolio_section',  
  755. 'settings' => 'enigma_options[port_heading]' 
  756. ) ); 
  757.  
  758. for($i=1;$i<=4;$i++) { 
  759. $j = array(' One', ' Two', ' Three', ' Four'); 
  760. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'enigma_portfolio_img_'.$i, array( 
  761. 'label' => __( 'Portfolio Image', 'enigma' ).$j[$i-1],  
  762. 'section' => 'portfolio_section',  
  763. 'settings' => 'enigma_options[port_'.$i.'_img]' 
  764. ) ) ); 
  765. $wp_customize->add_control( 'enigma_portfolio_title_'.$i, array( 
  766. 'label' => __( 'Portfolio Title', 'enigma').$j[$i-1],  
  767. 'type'=>'text',  
  768. 'section' => 'portfolio_section',  
  769. 'settings' => 'enigma_options[port_'.$i.'_title]' 
  770. ) ); 
  771.  
  772. $wp_customize->add_control( 'enigma_portfolio_link_'.$i, array( 
  773. 'label' => __( 'Portfolio Link', 'enigma' ).$j[$i-1],  
  774. 'type'=>'url',  
  775. 'section' => 'portfolio_section',  
  776. 'settings' => 'enigma_options[port_'.$i.'_link]' 
  777. ) ); 
  778.  
  779. /** Blog Option */ 
  780. $wp_customize->add_section('blog_section', array( 
  781. 'title'=>__('Home Blog Options', 'enigma'),  
  782. 'panel'=>'enigma_theme_option',  
  783. 'capability'=>'edit_theme_options',  
  784. 'priority' => 35 
  785. )); 
  786. $wp_customize->add_setting( 
  787. 'enigma_options[show_blog]',  
  788. array( 
  789. 'default'=>esc_attr($wl_theme_options['show_blog']),  
  790. 'type'=>'option',  
  791. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  792. 'capability'=>'edit_theme_options' 
  793. ); 
  794. $wp_customize->add_control( 'show_blog', array( 
  795. 'label' => __( 'Enable Social Media Icons in Header', 'enigma' ),  
  796. 'type'=>'checkbox',  
  797. 'section' => 'blog_section',  
  798. 'settings' => 'enigma_options[show_blog]' 
  799. ) ); 
  800. $wp_customize->add_setting( 
  801. 'enigma_options[blog_title]',  
  802. array( 
  803. 'type' => 'option',  
  804. 'default'=>$wl_theme_options['blog_title'],  
  805. 'sanitize_callback'=>'enigma_sanitize_text',  
  806. 'capability' => 'edit_theme_options',  
  807. ); 
  808. $wp_customize->add_control( 'enigma_latest_post', array( 
  809. 'label' => __( 'Home Blog Title', 'enigma' ),  
  810. 'type'=>'text',  
  811. 'section' => 'blog_section',  
  812. 'settings' => 'enigma_options[blog_title]',  
  813. ) ); 
  814.  
  815. /** Font Family Section */ 
  816. $wp_customize->add_section('font_section', array( 
  817. 'title' => __('Typography Settings', 'enigma'),  
  818. 'panel' => 'enigma_theme_option',  
  819. 'capability' => 'edit_theme_options',  
  820. 'priority' => 35 
  821. )); 
  822.  
  823. $wp_customize->add_setting( 
  824. 'enigma_options[main_heading_font]',  
  825. array( 
  826. 'default' => esc_attr($wl_theme_options['main_heading_font']),  
  827. 'type' => 'option',  
  828. 'sanitize_callback'=>'enigma_sanitize_text',  
  829. 'capability'=>'edit_theme_options',  
  830. )); 
  831. $wp_customize->add_control(new enigma_Font_Control($wp_customize, 'main_heading_font', array( 
  832. 'label' => __('Logo Font Style', 'enigma'),  
  833. 'section' => 'font_section',  
  834. 'settings' => 'enigma_options[main_heading_font]',  
  835. ))); 
  836.  
  837. $wp_customize->add_setting( 
  838. 'enigma_options[menu_font]',  
  839. array( 
  840. 'default' => esc_attr($wl_theme_options['menu_font']),  
  841. 'type' => 'option',  
  842. 'sanitize_callback'=>'enigma_sanitize_text',  
  843. 'capability'=>'edit_theme_options' 
  844. )); 
  845. $wp_customize->add_control(new enigma_Font_Control($wp_customize, 'menu_font', array( 
  846. 'label' => __('Header Menu Font Style', 'enigma'),  
  847. 'section' => 'font_section',  
  848. 'settings' => 'enigma_options[menu_font]' 
  849. ))); 
  850.  
  851. $wp_customize->add_setting( 
  852. 'enigma_options[theme_title]',  
  853. array( 
  854. 'default' => esc_attr($wl_theme_options['theme_title']),  
  855. 'type' => 'option',  
  856. 'sanitize_callback'=>'enigma_sanitize_text',  
  857. 'capability'=>'edit_theme_options' 
  858. )); 
  859. $wp_customize->add_control(new enigma_Font_Control($wp_customize, 'theme_title', array( 
  860. 'label' => __('Theme Title Font Style', 'enigma'),  
  861. 'section' => 'font_section',  
  862. 'settings' => 'enigma_options[theme_title]' 
  863. ))); 
  864.  
  865. $wp_customize->add_setting( 
  866. 'enigma_options[desc_font_all]',  
  867. array( 
  868. 'default' => esc_attr($wl_theme_options['desc_font_all']),  
  869. 'type' => 'option',  
  870. 'sanitize_callback'=>'enigma_sanitize_text',  
  871. 'capability'=>'edit_theme_options' 
  872. )); 
  873. $wp_customize->add_control(new enigma_Font_Control($wp_customize, 'desc_font_all', array( 
  874. 'label' => __('Theme Description Font Style', 'enigma'),  
  875. 'section' => 'font_section',  
  876. 'settings' => 'enigma_options[desc_font_all]' 
  877. ))); 
  878.  
  879. /** Social options */ 
  880. $wp_customize->add_section('social_section', array( 
  881. 'title'=>__("Social Options", 'enigma'),  
  882. 'panel'=>'enigma_theme_option',  
  883. 'capability'=>'edit_theme_options',  
  884. 'priority' => 35 
  885. )); 
  886. $wp_customize->add_setting( 
  887. 'enigma_options[header_social_media_in_enabled]',  
  888. array( 
  889. 'default'=>esc_attr($wl_theme_options['header_social_media_in_enabled']),  
  890. 'type'=>'option',  
  891. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  892. 'capability'=>'edit_theme_options' 
  893. ); 
  894. $wp_customize->add_control( 'header_social_media_in_enabled', array( 
  895. 'label' => __( 'Enable Social Media Icons in Header', 'enigma' ),  
  896. 'type'=>'checkbox',  
  897. 'section' => 'social_section',  
  898. 'settings' => 'enigma_options[header_social_media_in_enabled]' 
  899. ) ); 
  900. $wp_customize->add_setting( 
  901. 'enigma_options[footer_section_social_media_enbled]',  
  902. array( 
  903. 'default'=>esc_attr($wl_theme_options['footer_section_social_media_enbled']),  
  904. 'type'=>'option',  
  905. 'sanitize_callback'=>'enigma_sanitize_checkbox',  
  906. 'capability'=>'edit_theme_options' 
  907. ); 
  908. $wp_customize->add_control( 'footer_section_social_media_enbled', array( 
  909. 'label' => __( 'Enable Social Media Icons in Footer', 'enigma' ),  
  910. 'type'=>'checkbox',  
  911. 'section' => 'social_section',  
  912. 'settings' => 'enigma_options[footer_section_social_media_enbled]' 
  913. ) ); 
  914. $wp_customize->add_setting( 
  915. 'enigma_options[email_id]',  
  916. array( 
  917. 'default'=>esc_attr($wl_theme_options['email_id']),  
  918. 'type'=>'option',  
  919. 'sanitize_callback'=>'sanitize_email',  
  920. 'capability'=>'edit_theme_options' 
  921. ); 
  922. $wp_customize->add_control( 'email_id', array( 
  923. 'label' => __('Email ID', 'enigma' ),  
  924. 'type'=>'email',  
  925. 'section' => 'social_section',  
  926. 'settings' => 'enigma_options[email_id]' 
  927. ) ); 
  928. $wp_customize->add_setting( 
  929. 'enigma_options[phone_no]',  
  930. array( 
  931. 'default'=>esc_attr($wl_theme_options['phone_no']),  
  932. 'type'=>'option',  
  933. 'sanitize_callback'=>'enigma_sanitize_text',  
  934. 'capability'=>'edit_theme_options' 
  935. ); 
  936. $wp_customize->add_control( 'phone_no', array( 
  937. 'label' => __('Phone Number', 'enigma' ),  
  938. 'type'=>'text',  
  939. 'section' => 'social_section',  
  940. 'settings' => 'enigma_options[phone_no]' 
  941. ) ); 
  942. $wp_customize->add_setting( 
  943. 'enigma_options[twitter_link]',  
  944. array( 
  945. 'default'=>esc_attr($wl_theme_options['twitter_link']),  
  946. 'type'=>'option',  
  947. 'sanitize_callback'=>'esc_url_raw',  
  948. 'capability'=>'edit_theme_options' 
  949. ); 
  950. $wp_customize->add_control( 'twitter_link', array( 
  951. 'label' => __('Twitter', 'enigma' ),  
  952. 'type'=>'url',  
  953. 'section' => 'social_section',  
  954. 'settings' => 'enigma_options[twitter_link]' 
  955. ) ); 
  956. $wp_customize->add_setting( 
  957. 'enigma_options[fb_link]',  
  958. array( 
  959. 'default'=>esc_attr($wl_theme_options['fb_link']),  
  960. 'type'=>'option',  
  961. 'sanitize_callback'=>'esc_url_raw',  
  962. 'capability'=>'edit_theme_options' 
  963. ); 
  964. $wp_customize->add_control( 'fb_link', array( 
  965. 'label' => __( 'Facebook', 'enigma' ),  
  966. 'type'=>'url',  
  967. 'section' => 'social_section',  
  968. 'settings' => 'enigma_options[fb_link]' 
  969. ) ); 
  970. $wp_customize->add_setting( 
  971. 'enigma_options[linkedin_link]',  
  972. array( 
  973. 'default'=>esc_attr($wl_theme_options['linkedin_link']),  
  974. 'type'=>'option',  
  975. 'sanitize_callback'=>'esc_url_raw',  
  976. 'capability'=>'edit_theme_options' 
  977. ); 
  978. $wp_customize->add_control( 'linkedin_link', array( 
  979. 'label' => __( 'LinkedIn', 'enigma' ),  
  980. 'type'=>'url',  
  981. 'section' => 'social_section',  
  982. 'settings' => 'enigma_options[linkedin_link]' 
  983. ) ); 
  984.  
  985. $wp_customize->add_setting( 
  986. 'enigma_options[gplus]',  
  987. array( 
  988. 'default'=>esc_attr($wl_theme_options['gplus']),  
  989. 'type'=>'option',  
  990. 'sanitize_callback'=>'esc_url_raw',  
  991. 'capability'=>'edit_theme_options' 
  992. ); 
  993. $wp_customize->add_control( 'gplus', array( 
  994. 'label' => __( 'Goole+', 'enigma' ),  
  995. 'type'=>'url',  
  996. 'section' => 'social_section',  
  997. 'settings' => 'enigma_options[gplus]' 
  998. ) ); 
  999. $wp_customize->add_setting( 
  1000. 'enigma_options[youtube_link]',  
  1001. array( 
  1002. 'default'=>esc_attr($wl_theme_options['youtube_link']),  
  1003. 'type'=>'option',  
  1004. 'sanitize_callback'=>'esc_url_raw',  
  1005. 'capability'=>'edit_theme_options' 
  1006. ); 
  1007. $wp_customize->add_control( 'youtube_link', array( 
  1008. 'label' => __( 'Youtube', 'enigma' ),  
  1009. 'type'=>'url',  
  1010. 'section' => 'social_section',  
  1011. 'settings' => 'enigma_options[youtube_link]' 
  1012. ) ); 
  1013. $wp_customize->add_setting( 
  1014. 'enigma_options[instagram]',  
  1015. array( 
  1016. 'default'=>esc_attr($wl_theme_options['instagram']),  
  1017. 'type'=>'option',  
  1018. 'sanitize_callback'=>'esc_url_raw',  
  1019. 'capability'=>'edit_theme_options' 
  1020. ); 
  1021. $wp_customize->add_control( 'instagram', array( 
  1022. 'label' => __( 'Instagram', 'enigma' ),  
  1023. 'type'=>'url',  
  1024. 'section' => 'social_section',  
  1025. 'settings' => 'enigma_options[instagram]' 
  1026. ) ); 
  1027. /**extra icons added 2.7.1*/ 
  1028. $wp_customize->add_setting( 
  1029. 'enigma_options[vk_link]',  
  1030. array( 
  1031. 'default'=>esc_attr($wl_theme_options['vk_link']),  
  1032. 'type'=>'option',  
  1033. 'sanitize_callback'=>'esc_url_raw',  
  1034. 'capability'=>'edit_theme_options' 
  1035. ); 
  1036. $wp_customize->add_control( 'vk_link', array( 
  1037. 'label' => __( 'VK', 'enigma' ),  
  1038. 'type'=>'url',  
  1039. 'section' => 'social_section',  
  1040. 'settings' => 'enigma_options[vk_link]' 
  1041. ) ); 
  1042. $wp_customize->add_setting( 
  1043. 'enigma_options[qq_link]',  
  1044. array( 
  1045. 'default'=>esc_attr($wl_theme_options['qq_link']),  
  1046. 'type'=>'option',  
  1047. 'sanitize_callback'=>'esc_url_raw',  
  1048. 'capability'=>'edit_theme_options' 
  1049. ); 
  1050. $wp_customize->add_control( 'qq_link', array( 
  1051. 'label' => __( 'QQ', 'enigma' ),  
  1052. 'type'=>'url',  
  1053. 'section' => 'social_section',  
  1054. 'settings' => 'enigma_options[qq_link]' 
  1055. ) ); 
  1056. $wp_customize->add_setting( 
  1057. 'enigma_options[whatsapp_link]',  
  1058. array( 
  1059. 'default'=>esc_attr($wl_theme_options['whatsapp_link']),  
  1060. 'type'=>'option',  
  1061. 'sanitize_callback'=>'esc_attr',  
  1062. 'capability'=>'edit_theme_options' 
  1063. ); 
  1064. $wp_customize->add_control( 'whatsapp_link', array( 
  1065. 'label' => __( 'WhatsApp', 'enigma' ),  
  1066. 'type'=>'url',  
  1067. 'section' => 'social_section',  
  1068. 'settings' => 'enigma_options[whatsapp_link]' 
  1069. ) ); 
  1070. /** Footer callout */ 
  1071. $wp_customize->add_section('callout_section', array( 
  1072. 'title'=>__("Footer Call-Out Options", 'enigma'),  
  1073. 'panel'=>'enigma_theme_option',  
  1074. 'capability'=>'edit_theme_options',  
  1075. 'priority' => 35 
  1076. )); 
  1077. $wp_customize->add_setting( 
  1078. 'enigma_options[fc_home]',  
  1079. array( 
  1080. 'default'=>esc_attr($wl_theme_options['fc_home']),  
  1081. 'type'=>'option',  
  1082. 'capability'=>'edit_theme_options',  
  1083. 'sanitize_callback'=>'enigma_sanitize_text',  
  1084. ); 
  1085. $wp_customize->add_control( 'fc_home', array( 
  1086. 'label' => __( 'Enable Footer callout on HOme', 'enigma' ),  
  1087. 'type'=>'checkbox',  
  1088. 'section' => 'callout_section',  
  1089. 'settings' => 'enigma_options[fc_home]' 
  1090. ) ); 
  1091. $wp_customize->add_setting( 
  1092. 'enigma_options[fc_title]',  
  1093. array( 
  1094. 'default'=>esc_attr($wl_theme_options['fc_title']),  
  1095. 'type'=>'option',  
  1096. 'capability'=>'edit_theme_options',  
  1097. 'sanitize_callback'=>'enigma_sanitize_text',  
  1098. ); 
  1099. $wp_customize->add_control( 'fc_title', array( 
  1100. 'label' => __( 'Footer callout Title', 'enigma' ),  
  1101. 'type'=>'text',  
  1102. 'section' => 'callout_section',  
  1103. 'settings' => 'enigma_options[fc_title]' 
  1104. ) ); 
  1105. $wp_customize->add_setting( 
  1106. 'enigma_options[fc_btn_txt]',  
  1107. array( 
  1108. 'default'=>esc_attr($wl_theme_options['fc_btn_txt']),  
  1109. 'type'=>'option',  
  1110. 'capability'=>'edit_theme_options',  
  1111. 'sanitize_callback'=>'enigma_sanitize_text',  
  1112. ); 
  1113. $wp_customize->add_control( 'fc_btn_txt', array( 
  1114. 'label' => __( 'Footer callout Button Text', 'enigma' ),  
  1115. 'type'=>'text',  
  1116. 'section' => 'callout_section',  
  1117. 'settings' => 'enigma_options[fc_btn_txt]' 
  1118. ) ); 
  1119. $wp_customize->add_setting( 
  1120. 'enigma_options[fc_btn_link]',  
  1121. array( 
  1122. 'default'=>esc_attr($wl_theme_options['fc_btn_link']),  
  1123. 'type'=>'option',  
  1124. 'capability'=>'edit_theme_options',  
  1125. 'sanitize_callback'=>'enigma_sanitize_text',  
  1126. ); 
  1127. $wp_customize->add_control( 'fc_btn_link', array( 
  1128. 'label' => __( 'Footer callout Button Link', 'enigma' ),  
  1129. 'type'=>'text',  
  1130. 'section' => 'callout_section',  
  1131. 'settings' => 'enigma_options[fc_btn_link]' 
  1132. ) ); 
  1133. $wp_customize->add_setting( 
  1134. 'enigma_options[fc_icon]',  
  1135. array( 
  1136. 'default'=>esc_attr($wl_theme_options['fc_icon']),  
  1137. 'type'=>'option',  
  1138. 'capability'=>'edit_theme_options',  
  1139. 'sanitize_callback'=>'enigma_sanitize_text',  
  1140. ); 
  1141. $wp_customize->add_control( 'fc_icon', array( 
  1142. 'label' => __( 'Footer callout Icon', 'enigma' ),  
  1143. 'type'=>'text',  
  1144. 'section' => 'callout_section',  
  1145. 'settings' => 'enigma_options[fc_icon]' 
  1146. ) ); 
  1147. /** Footer Options */ 
  1148. $wp_customize->add_section('footer_section', array( 
  1149. 'title'=>__("Footer Options", 'enigma'),  
  1150. 'panel'=>'enigma_theme_option',  
  1151. 'capability'=>'edit_theme_options',  
  1152. 'priority' => 35 
  1153. )); 
  1154. $wp_customize->add_setting( 
  1155. 'enigma_options[footer_customizations]',  
  1156. array( 
  1157. 'default'=>esc_attr($wl_theme_options['footer_customizations']),  
  1158. 'type'=>'option',  
  1159. 'sanitize_callback'=>'enigma_sanitize_text',  
  1160. 'capability'=>'edit_theme_options' 
  1161. ); 
  1162. $wp_customize->add_control( 'footer_customizations', array( 
  1163. 'label' => __( 'Footer Customization Text', 'enigma' ),  
  1164. 'type'=>'text',  
  1165. 'section' => 'footer_section',  
  1166. 'settings' => 'enigma_options[footer_customizations]' 
  1167. ) ); 
  1168.  
  1169. $wp_customize->add_setting( 
  1170. 'enigma_options[developed_by_text]',  
  1171. array( 
  1172. 'default'=>esc_attr($wl_theme_options['developed_by_text']),  
  1173. 'type'=>'option',  
  1174. 'sanitize_callback'=>'enigma_sanitize_text',  
  1175. 'capability'=>'edit_theme_options' 
  1176. ); 
  1177. $wp_customize->add_control( 'developed_by_text', array( 
  1178. 'label' => __( 'Developed By Text', 'enigma' ),  
  1179. 'type'=>'text',  
  1180. 'section' => 'footer_section',  
  1181. 'settings' => 'enigma_options[developed_by_text]' 
  1182. ) ); 
  1183. $wp_customize->add_setting( 
  1184. 'enigma_options[developed_by_weblizar_text]',  
  1185. array( 
  1186. 'default'=>esc_attr($wl_theme_options['developed_by_weblizar_text']),  
  1187. 'type'=>'option',  
  1188. 'sanitize_callback'=>'enigma_sanitize_text',  
  1189. 'capability'=>'edit_theme_options' 
  1190. ); 
  1191. $wp_customize->add_control( 'developed_by_weblizar_text', array( 
  1192. 'label' => __( 'Developed By Link Text', 'enigma' ),  
  1193. 'type'=>'text',  
  1194. 'section' => 'footer_section',  
  1195. 'settings' => 'enigma_options[developed_by_weblizar_text]' 
  1196. ) ); 
  1197. $wp_customize->add_setting( 
  1198. 'enigma_options[developed_by_link]',  
  1199. array( 
  1200. 'default'=>esc_attr($wl_theme_options['developed_by_link']),  
  1201. 'type'=>'option',  
  1202. 'capability'=>'edit_theme_options',  
  1203. 'sanitize_callback'=>'esc_url_raw' 
  1204. ); 
  1205. $wp_customize->add_control( 'developed_by_link', array( 
  1206. 'label' => __( 'Developed By Link', 'enigma' ),  
  1207. 'type'=>'url',  
  1208. 'section' => 'footer_section',  
  1209. 'settings' => 'enigma_options[developed_by_link]' 
  1210. ) );  
  1211.  
  1212. $wp_customize->add_section( 'enigma_more' , array( 
  1213. 'title' => __( 'Upgrade to Enigma Premium 10%OFF', 'enigma' ),  
  1214. 'priority' => 999,  
  1215. 'panel'=>'enigma_theme_option',  
  1216. ) ); 
  1217.  
  1218. $wp_customize->add_setting( 'enigma_more', array( 
  1219. 'default' => null,  
  1220. 'sanitize_callback' => 'sanitize_text_field',  
  1221. ) ); 
  1222.  
  1223. $wp_customize->add_control( new More_Enigma_Control( $wp_customize, 'enigma_more', array( 
  1224. 'label' => __( 'Enigma Premium', 'enigma' ),  
  1225. 'section' => 'enigma_more',  
  1226. 'settings' => 'enigma_more',  
  1227. 'priority' => 1,  
  1228. ) ) );  
  1229.  
  1230.  
  1231.  
  1232.