cwp_megar_customize_register

Megaresponsive-lite Theme Customizer.

Description

cwp_megar_customize_register( (WP_Customize_Manager) $wp_customize ); 

Parameters (1)

0. $wp_customize (WP_Customize_Manager)
Theme Customizer object.

Usage

  1. if ( !function_exists( 'cwp_megar_customize_register' ) ) { 
  2. require_once '/inc/customizer.php'; 
  3.  
  4. // Theme Customizer object. 
  5. $wp_customize = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cwp_megar_customize_register($wp_customize); 
  9.  

Defined (1)

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

/inc/customizer.php  
  1. function cwp_megar_customize_register( $wp_customize ) { 
  2.  
  3. class megaresponsive_lite_Theme_Support extends WP_Customize_Control 
  4. public function render_content() 
  5.  
  6.  
  7. }  
  8.  
  9. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 
  10.  
  11. $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 
  12.  
  13. $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 
  14.  
  15. /** theme notes */ 
  16. $wp_customize->add_section( 'codeinwp_theme_notes' , array( 
  17. 'title' => __('ThemeIsle theme notes', 'megaresponsive-lite'),  
  18. 'description' => sprintf( __( "Thank you for being part of this! We've spent almost 6 months building ThemeIsle without really knowing if anyone will ever use a theme or not, so we're very grateful that you've decided to work with us. Wanna <a href='http://themeisle.com/contact/' target='_blank'>say hi</a>?<br/><br/><a href='http://themeisle.com/demo/?theme=MegaResponsive' target='_blank'>View Theme Demo</a> | <a href='http://themeisle.com/forums/forum/megaresponsive-lite' target='_blank'>Get theme support</a><br/><br/><a href='http://themeisle.com/documentation-megaresponsive' target='_blank'>Documentation</a>", 'megaresponsive-lite')), 'priority' => 30,  
  19. )); 
  20. $wp_customize->add_setting( 
  21. 'codeinwp_theme_notes' 
  22. , array('sanitize_callback' => 'esc_url_raw')); 
  23. $wp_customize->add_control( new megaresponsive_lite_Theme_Support( $wp_customize, 'codeinwp_theme_notes',  
  24. array( 
  25. 'section' => 'codeinwp_theme_notes',  
  26. )); 
  27.  
  28.  
  29. /** logo */ 
  30. $wp_customize->add_section( 'themeslug_logo_section' , array( 
  31.  
  32. 'title' => __( 'Logo', 'megaresponsive-lite' ),  
  33.  
  34. 'priority' => 31,  
  35.  
  36. 'description' => 'Upload a logo to replace the default site name and description in the header',  
  37.  
  38. ) ); 
  39.  
  40.  
  41.  
  42. $wp_customize->add_setting( 'megaresponsive_lite_logo', array('sanitize_callback' => 'esc_url_raw')); 
  43.  
  44.  
  45.  
  46. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'megaresponsive_lite_logo', array( 
  47.  
  48. 'label' => __( 'Logo', 'megaresponsive-lite' ),  
  49.  
  50. 'section' => 'themeslug_logo_section',  
  51.  
  52. 'settings' => 'megaresponsive_lite_logo',  
  53.  
  54. ) ) );  
  55.  
  56.  
  57. /** email address for contact form */ 
  58. $wp_customize->add_section( 'megaresponsive_lite_email_section' , array( 
  59. 'title' => __( 'Email for contact form', 'megaresponsive-lite' ),  
  60. 'priority' => 130,  
  61. )); 
  62.  
  63. $wp_customize->add_setting( 'megaresponsive_lite_email', array('sanitize_callback' => 'is_email') ); 
  64. $wp_customize->add_control( 'megaresponsive_lite_email', array( 
  65. 'label' => __( 'Email address', 'megaresponsive-lite' ),  
  66. 'section' => 'megaresponsive_lite_email_section',  
  67. 'settings' => 'megaresponsive_lite_email',  
  68. 'priority' => 1,  
  69. )); 
  70.  
  71.  
  72.  
  73.  
  74.