WP_Customize_Background_Image_Control

Customize Background Image Control class.

Defined (1)

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

/wp-includes/customize/class-wp-customize-background-image-control.php  
  1. class WP_Customize_Background_Image_Control extends WP_Customize_Image_Control { 
  2. public $type = 'background'; 
  3.  
  4. /** 
  5. * Constructor. 
  6. * @since 3.4.0 
  7. * @uses WP_Customize_Image_Control::__construct() 
  8. * @param WP_Customize_Manager $manager Customizer bootstrap instance. 
  9. */ 
  10. public function __construct( $manager ) { 
  11. parent::__construct( $manager, 'background_image', array( 
  12. 'label' => __( 'Background Image' ),  
  13. 'section' => 'background_image',  
  14. ) ); 
  15.  
  16. /** 
  17. * Enqueue control related scripts/styles. 
  18. * @since 4.1.0 
  19. */ 
  20. public function enqueue() { 
  21. parent::enqueue(); 
  22.  
  23. wp_localize_script( 'customize-controls', '_wpCustomizeBackground', array( 
  24. 'nonces' => array( 
  25. 'add' => wp_create_nonce( 'background-add' ),  
  26. ),  
  27. ) );