responsive_customize_register

Add theme options in the Customizer.

Description

responsive_customize_register( $wp_customize ); 

Parameters (1)

0. $wp_customize
The wp customize.

Usage

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

Defined (1)

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

/includes/customizer.php  
  1. function responsive_customize_register( $wp_customize ) { 
  2. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 
  3. $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 
  4. $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 
  5.  
  6. $wp_customize->add_section( 'responsive_theme_options', array( 
  7. 'title' => __( 'Theme Options', 'responsive' ),  
  8. 'priority' => 35,  
  9. ) ); 
  10.  
  11. $wp_customize->add_section( 'responsive_social_options', array( 
  12. 'title' => __( 'Social Links', 'responsive' ),  
  13. 'priority' => 36,  
  14. ) ); 
  15.  
  16. //Breadcrumbs 
  17. $wp_customize->add_setting( 'breadcrumbs', array( 
  18. 'default' => 'yes',  
  19. ) ); 
  20.  
  21. $wp_customize->add_control( 'breadcrumbs', array( 
  22. 'label' => __( 'Enable Breadcrumbs', 'responsive' ),  
  23. 'section' => 'responsive_theme_options',  
  24. 'type' => 'radio',  
  25. 'choices' => array( 
  26. 'yes' => __( 'Yes', 'responsive' ),  
  27. 'no' => __( 'No', 'responsive' ),  
  28. ),  
  29. 'priority' => 1,  
  30. ) ); 
  31.  
  32. //Excerpted blog index 
  33. $wp_customize->add_setting( 'blog_excerpt', array( 
  34. 'default' => 'no',  
  35. ) ); 
  36.  
  37. $wp_customize->add_control( 'blog_excerpt', array( 
  38. 'label' => __( 'Blog Post Excerpts', 'responsive' ),  
  39. 'section' => 'responsive_theme_options',  
  40. 'type' => 'radio',  
  41. 'choices' => array( 
  42. 'yes' => __( 'Yes', 'responsive' ),  
  43. 'no' => __( 'No', 'responsive' ),  
  44. ),  
  45. 'priority' => 1,  
  46. ) ); 
  47.  
  48. //Homepage call to action 
  49. $wp_customize->add_setting( 'homepage_callout[link_to]', array( 
  50. 'default' => 'no',  
  51. ) ); 
  52.  
  53. $wp_customize->add_control( 'homepage_callout[link_to]', array( 
  54. 'label' => __( 'Homepage Call to Action: Use custom link', 'responsive' ),  
  55. 'section' => 'responsive_theme_options',  
  56. 'type' => 'radio',  
  57. 'choices' => array( 
  58. 'yes' => __( 'Yes', 'responsive' ),  
  59. 'no' => __( 'No', 'responsive' ),  
  60. ),  
  61. 'priority' => 2,  
  62. ) ); 
  63.  
  64. $wp_customize->add_setting( 'homepage_callout[text]', array( 
  65. 'default' => __( 'Read more ›', 'responsive' ),  
  66. ) ); 
  67.  
  68. $wp_customize->add_control( 'homepage_callout[text]', array( 
  69. 'label' => __( 'Homepage Call to Action: Custom link text', 'responsive' ),  
  70. 'section' => 'responsive_theme_options',  
  71. 'type' => 'text',  
  72. 'priority' => 3,  
  73. ) ); 
  74.  
  75. $wp_customize->add_setting( 'homepage_callout[url]', array( 
  76. 'default' => '',  
  77. ) ); 
  78.  
  79. $wp_customize->add_control( 'homepage_callout[url]', array( 
  80. 'label' => __( 'Homepage Call to Action: Custom link url', 'responsive' ),  
  81. 'section' => 'responsive_theme_options',  
  82. 'type' => 'text',  
  83. 'priority' => 4,  
  84. ) ); 
  85.  
  86. //Social links 
  87. $wp_customize->add_setting( 'responsive_social_links[twitter]', array( 
  88. 'default' => '',  
  89. ) ); 
  90.  
  91. $wp_customize->add_control( 'responsive_social_links[twitter]', array( 
  92. 'label' => __( 'Twitter Link', 'responsive' ),  
  93. 'section' => 'responsive_social_options',  
  94. 'type' => 'text',  
  95. 'priority' => 5,  
  96. ) ); 
  97.  
  98. $wp_customize->add_setting( 'responsive_social_links[facebook]', array( 
  99. 'default' => '',  
  100. ) ); 
  101.  
  102. $wp_customize->add_control( 'responsive_social_links[facebook]', array( 
  103. 'label' => __( 'Facebook Link', 'responsive' ),  
  104. 'section' => 'responsive_social_options',  
  105. 'type' => 'text',  
  106. 'priority' => 6,  
  107. ) ); 
  108.  
  109. $wp_customize->add_setting( 'responsive_social_links[linkedin]', array( 
  110. 'default' => '',  
  111. ) ); 
  112.  
  113. $wp_customize->add_control( 'responsive_social_links[linkedin]', array( 
  114. 'label' => __( 'LinkedIn Link', 'responsive' ),  
  115. 'section' => 'responsive_social_options',  
  116. 'type' => 'text',  
  117. 'priority' => 7,  
  118. ) ); 
  119.  
  120. $wp_customize->add_setting( 'responsive_social_links[youtube]', array( 
  121. 'default' => '',  
  122. ) ); 
  123.  
  124. $wp_customize->add_control( 'responsive_social_links[youtube]', array( 
  125. 'label' => __( 'YouTube Link', 'responsive' ),  
  126. 'section' => 'responsive_social_options',  
  127. 'type' => 'text',  
  128. 'priority' => 8,  
  129. ) ); 
  130.  
  131. $wp_customize->add_setting( 'responsive_social_links[stumbleupon]', array( 
  132. 'default' => '',  
  133. ) ); 
  134.  
  135. $wp_customize->add_control( 'responsive_social_links[stumbleupon]', array( 
  136. 'label' => __( 'StumbleUpon Link', 'responsive' ),  
  137. 'section' => 'responsive_social_options',  
  138. 'type' => 'text',  
  139. 'priority' => 9,  
  140. ) ); 
  141.  
  142. $wp_customize->add_setting( 'responsive_social_links[google_plus]', array( 
  143. 'default' => '',  
  144. ) ); 
  145.  
  146. $wp_customize->add_control( 'responsive_social_links[google_plus]', array( 
  147. 'label' => __( 'Google Plus Link', 'responsive' ),  
  148. 'section' => 'responsive_social_options',  
  149. 'type' => 'text',  
  150. 'priority' => 10,  
  151. ) ); 
  152.  
  153. $wp_customize->add_setting( 'responsive_social_links[instagram]', array( 
  154. 'default' => '',  
  155. ) ); 
  156.  
  157. $wp_customize->add_control( 'responsive_social_links[instagram]', array( 
  158. 'label' => __( 'Instagram Link', 'responsive' ),  
  159. 'section' => 'responsive_social_options',  
  160. 'type' => 'text',  
  161. 'priority' => 11,  
  162. ) ); 
  163.  
  164. $wp_customize->add_setting( 'responsive_social_links[pinterest]', array( 
  165. 'default' => '',  
  166. ) ); 
  167.  
  168. $wp_customize->add_control( 'responsive_social_links[pinterest]', array( 
  169. 'label' => __( 'Pinterest Link', 'responsive' ),  
  170. 'section' => 'responsive_social_options',  
  171. 'type' => 'text',  
  172. 'priority' => 12,  
  173. ) ); 
  174.  
  175. $wp_customize->add_setting( 'responsive_social_links[yelp]', array( 
  176. 'default' => '',  
  177. ) ); 
  178.  
  179. $wp_customize->add_control( 'responsive_social_links[yelp]', array( 
  180. 'label' => __( 'Yelp Link', 'responsive' ),  
  181. 'section' => 'responsive_social_options',  
  182. 'type' => 'text',  
  183. 'priority' => 13,  
  184. ) ); 
  185.  
  186. $wp_customize->add_setting( 'responsive_social_links[vimeo]', array( 
  187. 'default' => '',  
  188. ) ); 
  189.  
  190. $wp_customize->add_control( 'responsive_social_links[vimeo]', array( 
  191. 'label' => __( 'Vimeo Link', 'responsive' ),  
  192. 'section' => 'responsive_social_options',  
  193. 'type' => 'text',  
  194. 'priority' => 14,  
  195. ) ); 
  196.  
  197. $wp_customize->add_setting( 'responsive_social_links[foursquare]', array( 
  198. 'default' => '',  
  199. ) ); 
  200.  
  201. $wp_customize->add_control( 'responsive_social_links[foursquare]', array( 
  202. 'label' => __( 'Foursquare Link', 'responsive' ),  
  203. 'section' => 'responsive_social_options',  
  204. 'type' => 'text',  
  205. 'priority' => 15,  
  206. ) );