web_dor_customize_register

The Business Responsive web dor customize register function.

Description

web_dor_customize_register( $wp_customize ); 

Parameters (1)

0. $wp_customize
The wp customize.

Usage

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

Defined (1)

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

/custom_functions.php  
  1. function web_dor_customize_register( $wp_customize ) { 
  2. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 
  3. $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 
  4. global $dor_color_control_page; 
  5. $options = web_dor_get_theme_options(); 
  6. $wp_customize->add_section( 'aaa' , array( 
  7. 'title' => __( 'Schemes', 'sp_webBusiness' ),  
  8. 'priority' => 49,  
  9. ) ); 
  10.  
  11.  
  12. $wp_customize->add_setting( "theme_mods_business-responsive[cc_head_elem_back_color]", array( 
  13. 'default' => $defaults['cc_head_elem_back_color'],  
  14. 'type' => 'option',  
  15. 'sanitize_callback' => 'sanitize_hex_color',  
  16. 'capability' => 'edit_theme_options',  
  17. 'transport' => 'postMessage' 
  18. ) ); 
  19. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, "cc_head_elem_back_color", array( 
  20. 'label' => __( 'Header Element Background Color.', 'sp_webBusiness' ),  
  21. 'section' => 'colors',  
  22. 'settings' => "theme_mods_business-responsive[cc_head_elem_back_color]",  
  23. ) ) ); 
  24.  
  25. // Content Background Color. 
  26. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_content_back_color]', array( 
  27. 'default' => $defaults['content_background_color'],  
  28. 'type' => 'option',  
  29. 'sanitize_callback' => 'sanitize_hex_color',  
  30. 'capability' => 'edit_theme_options',  
  31. 'transport' => 'postMessage' 
  32. ) ); 
  33. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'content_background_color', array( 
  34. 'label' => __( 'Body Background Color.', 'sp_webBusiness' ),  
  35. 'section' => 'colors',  
  36. 'settings' => 'theme_mods_business-responsive[cc_content_back_color]',  
  37. ) ) ); 
  38. //// slider .shadow background color 
  39.  
  40. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_shadow_background_color]', array( 
  41. 'default' => $defaults['shadow_background_color'],  
  42. 'type' => 'option',  
  43. 'sanitize_callback' => 'sanitize_hex_color',  
  44. 'capability' => 'edit_theme_options',  
  45. 'transport' => 'postMessage' 
  46. ) ); 
  47. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cc_shadow_background_color', array( 
  48. 'label' => __( 'Slider Background Color.', 'sp_webBusiness' ),  
  49. 'section' => 'colors',  
  50. 'settings' => 'theme_mods_business-responsive[cc_shadow_background_color]',  
  51. ) ) ); 
  52. // Footer Background Color. 
  53. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_footer_back_color]', array( 
  54. 'default' => $defaults['footer_background_color'],  
  55. 'type' => 'option',  
  56. 'sanitize_callback' => 'sanitize_hex_color',  
  57. 'capability' => 'edit_theme_options',  
  58. 'transport' => 'postMessage' 
  59. ) ); 
  60. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_background_color', array( 
  61. 'label' => __( 'Footer Background Color.', 'sp_webBusiness' ),  
  62. 'section' => 'colors',  
  63. 'settings' => 'theme_mods_business-responsive[cc_footer_back_color]',  
  64. ) ) ); 
  65.  
  66. // Header Text Color. 
  67. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_text_headers_color]', array( 
  68. 'default' => $defaults['text_headers_color'],  
  69. 'type' => 'option',  
  70. 'sanitize_callback' => 'sanitize_hex_color',  
  71. 'capability' => 'edit_theme_options',  
  72. 'transport' => 'postMessage' 
  73. ) ); 
  74. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_headers_color', array( 
  75. 'label' => __( 'Header Text Color', 'sp_webBusiness' ),  
  76. 'section' => 'colors',  
  77. 'settings' => 'theme_mods_business-responsive[cc_text_headers_color]',  
  78. ) ) ); 
  79.  
  80. // Primary Text Color. 
  81. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_primary_text_color]', array( 
  82. 'default' => $defaults['primary_text_color'],  
  83. 'type' => 'option',  
  84. 'sanitize_callback' => 'sanitize_hex_color',  
  85. 'capability' => 'edit_theme_options',  
  86. 'transport' => 'postMessage' 
  87. ) ); 
  88. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_text_color', array( 
  89. 'label' => __( 'Primary Text Color.', 'sp_webBusiness' ),  
  90. 'section' => 'colors',  
  91. 'settings' => 'theme_mods_business-responsive[cc_primary_text_color]',  
  92. ) ) ); 
  93.  
  94. // Footer Text Color. 
  95. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_footer_text_color]', array( 
  96. 'default' => $defaults['footer_text_color'],  
  97. 'type' => 'option',  
  98. 'sanitize_callback' => 'sanitize_hex_color',  
  99. 'capability' => 'edit_theme_options',  
  100. 'transport' => 'postMessage' 
  101. ) ); 
  102. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_text_color', array( 
  103. 'label' => __( 'Footer Text Color.', 'sp_webBusiness' ),  
  104. 'section' => 'colors',  
  105. 'settings' => 'theme_mods_business-responsive[cc_footer_text_color]',  
  106. ) ) ); 
  107.  
  108. // Primary Links Color. 
  109. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_primary_links_color]', array( 
  110. 'default' => $defaults['primary_links_color'],  
  111. 'type' => 'option',  
  112. 'sanitize_callback' => 'sanitize_hex_color',  
  113. 'capability' => 'edit_theme_options',  
  114. 'transport' => 'postMessage' 
  115. ) ); 
  116. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_links_color', array( 
  117. 'label' => __( 'Primary Links Color.', 'sp_webBusiness' ),  
  118. 'section' => 'colors',  
  119. 'settings' => 'theme_mods_business-responsive[cc_primary_links_color]',  
  120. ) ) ); 
  121. // Primary Links Hover Color. 
  122. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_primary_links_hover_color]', array( 
  123. 'default' => $defaults['primary_links_hover_color'],  
  124. 'type' => 'option',  
  125. 'sanitize_callback' => 'sanitize_hex_color',  
  126. 'capability' => 'edit_theme_options',  
  127. 'transport' => 'postMessage' 
  128. ) ); 
  129. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cc_primary_links_hover_color', array( 
  130. 'label' => __( 'Primary Links Hover Color.', 'sp_webBusiness' ),  
  131. 'section' => 'colors',  
  132. 'settings' => 'theme_mods_business-responsive[cc_primary_links_hover_color]',  
  133. ) ) ); 
  134.  
  135. //Hover Menu Item Color 
  136. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_menu_color]', array( 
  137. 'default' => $defaults['menu_item'],  
  138. 'type' => 'option',  
  139. 'sanitize_callback' => 'sanitize_hex_color',  
  140. 'capability' => 'edit_theme_options',  
  141. 'transport' => 'postMessage' 
  142. ) ); 
  143. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_item', array( 
  144. 'label' => __( 'Hover Menu Item Color.', 'sp_webBusiness' ),  
  145. 'section' => 'colors',  
  146. 'settings' => 'theme_mods_business-responsive[cc_menu_color]',  
  147. ) ) ); 
  148.  
  149. //Selected Menu Item Color 
  150. $wp_customize->add_setting( 'theme_mods_business-responsive[cc_selected_menu_color]', array( 
  151. 'default' => $defaults['selected_menu_item'],  
  152. 'type' => 'option',  
  153. 'sanitize_callback' => 'sanitize_hex_color',  
  154. 'capability' => 'edit_theme_options',  
  155. 'transport' => 'postMessage' 
  156. ) ); 
  157. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'selected_menu_item', array( 
  158. 'label' => __( 'Selected Menu Item Color.', 'sp_webBusiness' ),  
  159. 'section' => 'colors',  
  160. 'settings' => 'theme_mods_business-responsive[cc_selected_menu_color]',  
  161. ) ) ); 
  162.  
  163. $font_choices[ 'Arial, Helvetica Neue, Helvetica, sans-serif' ] = 'Arial *'; 
  164. $font_choices[ 'Arial Black, Arial Bold, Arial, sans-serif' ] = 'Arial Black *'; 
  165. $font_choices[ 'Arial Narrow, Arial, Helvetica Neue, Helvetica, sans-serif' ] = 'Arial Narrow *'; 
  166. $font_choices[ 'Courier, Verdana, sans-serif' ] = 'Courier *'; 
  167. $font_choices[ 'Georgia, Times New Roman, Times, serif' ] = 'Georgia *'; 
  168. $font_choices[ 'Times New Roman, Times, Georgia, serif' ] = 'Times New Roman *'; 
  169. $font_choices[ 'Trebuchet MS, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Arial, sans-serif' ] = 'Trebuchet MS *'; 
  170. $font_choices[ 'Verdana, sans-serif' ] = 'Verdana *'; 
  171. $font_choices[ 'American Typewriter, Georgia, serif' ] = 'American Typewriter'; 
  172. $font_choices[ 'Andale Mono, Consolas, Monaco, Courier, Courier New, Verdana, sans-serif' ] = 'Andale Mono'; 
  173. $font_choices[ 'Baskerville, Times New Roman, Times, serif' ] = 'Baskerville'; 
  174. $font_choices[ 'Bookman Old Style, Georgia, Times New Roman, Times, serif' ] = 'Bookman Old Style'; 
  175. $font_choices[ 'Calibri, Helvetica Neue, Helvetica, Arial, Verdana, sans-serif' ] = 'Calibri'; 
  176. $font_choices[ 'Cambria, Georgia, Times New Roman, Times, serif' ] = 'Cambria'; 
  177. $font_choices[ 'Candara, Verdana, sans-serif' ] = 'Candara'; 
  178. $font_choices[ 'Century Gothic, Apple Gothic, Verdana, sans-serif' ] = 'Century Gothic'; 
  179. $font_choices[ 'Century Schoolbook, Georgia, Times New Roman, Times, serif' ] = 'Century Schoolbook'; 
  180. $font_choices[ 'Consolas, Andale Mono, Monaco, Courier, Courier New, Verdana, sans-serif' ] = 'Consolas'; 
  181. $font_choices[ 'Constantia, Georgia, Times New Roman, Times, serif' ] = 'Constantia'; 
  182. $font_choices[ 'Corbel, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif' ] = 'Corbel'; 
  183. $font_choices[ 'Franklin Gothic Medium, Arial, sans-serif' ] = 'Franklin Gothic Medium'; 
  184. $font_choices[ 'Garamond, Hoefler Text, Times New Roman, Times, serif' ] = 'Garamond'; 
  185. $font_choices[ 'Gill Sans MT, Gill Sans, Calibri, Trebuchet MS, sans-serif' ] = 'Gill Sans MT'; 
  186. $font_choices[ 'Helvetica Neue, Helvetica, Arial, sans-serif' ] = 'Helvetica Neue'; 
  187. $font_choices[ 'Hoefler Text, Garamond, Times New Roman, Times, sans-serif' ] = 'Hoefler Text'; 
  188. $font_choices[ 'Lucida Bright, Cambria, Georgia, Times New Roman, Times, serif' ] = 'Lucida Bright'; 
  189. $font_choices[ 'Lucida Grande, Lucida Sans, Lucida Sans Unicode, sans-serif' ] = 'Lucida Grande'; 
  190. $font_choices[ 'Palatino Linotype, Palatino, Georgia, Times New Roman, Times, serif' ] = 'Palatino Linotype'; 
  191. $font_choices[ 'Tahoma, Geneva, Verdana, sans-serif' ] = 'Tahoma'; 
  192. $font_choices[ 'Rockwell, Arial Black, Arial Bold, Arial, sans-serif' ] = 'Rockwell'; 
  193. $font_choices[ 'Segoe UI' ] = 'Segoe UI'; 
  194. $wp_customize->add_section( 'fonts' , array( 
  195. 'title' => __( 'Fonts', 'sp_webBusiness' ),  
  196. 'priority' => 50,  
  197. ) ); 
  198. // Header Font. 
  199. $wp_customize->add_setting( 'theme_mods_business-responsive[_type_headers_font]', array( 
  200. 'default' => $defaults['heading_font'],  
  201. 'type' => 'option',  
  202. 'capability' => 'edit_theme_options',  
  203. 'transport' => 'postMessage' 
  204. ) ); 
  205. $wp_customize->add_control( 'theme_mods_business-responsive[_type_headers_font]', array( 
  206. 'label' => __( 'Header Font', 'sp_webBusiness' ),  
  207. 'section' => 'fonts',  
  208. 'settings' => 'theme_mods_business-responsive[_type_headers_font]',  
  209. 'type' => 'select',  
  210. 'choices' => $font_choices 
  211. ) ); 
  212. // Body Font. 
  213. $wp_customize->add_setting( 'theme_mods_business-responsive[_type_primary_font]', array( 
  214. 'default' => $defaults['body_font'],  
  215. 'type' => 'option',  
  216. 'capability' => 'edit_theme_options',  
  217. 'transport' => 'postMessage' 
  218. ) ); 
  219. $wp_customize->add_control( 'theme_mods_business-responsive[_type_primary_font]', array( 
  220. 'label' => __( 'Primary Font (Body)', 'sp_webBusiness' ),  
  221. 'section' => 'fonts',  
  222. 'settings' => 'theme_mods_business-responsive[_type_primary_font]',  
  223. 'type' => 'select',  
  224. 'choices' => $font_choices 
  225. )); 
  226. // Subtitle Font. 
  227. $wp_customize->add_setting( 'theme_mods_business-responsive[_type_secondary_font]', array( 
  228. 'default' => $defaults['subtitle_font'],  
  229. 'type' => 'option',  
  230. 'capability' => 'edit_theme_options',  
  231. 'transport' => 'postMessage' 
  232. ) ); 
  233. $wp_customize->add_control( 'theme_mods_business-responsive[_type_secondary_font]', array( 
  234. 'label' => __( 'Secondary Font (Subtitle)', 'sp_webBusiness' ),  
  235. 'section' => 'fonts',  
  236. 'settings' => 'theme_mods_business-responsive[_type_secondary_font]',  
  237. 'type' => 'select',  
  238. 'choices' => $font_choices 
  239. )); 
  240. // Inputs and Text Areas Font. 
  241. $wp_customize->add_setting( 'theme_mods_business-responsive[_type_inputs_font]', array( 
  242. 'default' => $defaults['textarea_font'],  
  243. 'type' => 'option',  
  244. 'capability' => 'edit_theme_options',  
  245. 'transport' => 'postMessage' 
  246. ) ); 
  247.  
  248. $wp_customize->add_control( 'theme_mods_business-responsive[_type_inputs_font]', array( 
  249. 'label' => __( 'Inputs and Text Areas Font', 'sp_webBusiness' ),  
  250. 'section' => 'fonts',  
  251. 'settings' => 'theme_mods_business-responsive[_type_inputs_font]',  
  252. 'type' => 'select',  
  253. 'choices' => $font_choices 
  254. ));