everest-forms
/
addons
/
StyleCustomizer
/
includes
/
customize
/
class-evf-customize-background-image-control.php
class-evf-customize-background-image-control.php
1 year ago
class-evf-customize-color-control.php
1 year ago
class-evf-customize-color-palette-control.php
1 year ago
class-evf-customize-dimension-control.php
1 year ago
class-evf-customize-image-checkbox-control.php
1 year ago
class-evf-customize-image-radio-control.php
1 year ago
class-evf-customize-select2-control.php
1 year ago
class-evf-customize-slider-control.php
1 year ago
class-evf-customize-templates-section.php
1 year ago
class-evf-customize-toggle-control.php
1 year ago
class-evf-customize-background-image-control.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customize API: EVF_Customize_Background_Image_Control class |
| 4 | * |
| 5 | * @package EverestForms_Style_Customizer\Customize |
| 6 | * @since 1.0.0 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * Customize Background Image Control class. |
| 13 | * |
| 14 | * @see WP_Customize_Image_Control |
| 15 | */ |
| 16 | class EVF_Customize_Background_Image_Control extends WP_Customize_Image_Control { |
| 17 | |
| 18 | /** |
| 19 | * Type. |
| 20 | * |
| 21 | * @var string |
| 22 | */ |
| 23 | public $type = 'evf-background'; |
| 24 | |
| 25 | /** |
| 26 | * Enqueue control related scripts/styles. |
| 27 | * |
| 28 | * @since 1.0.0 |
| 29 | */ |
| 30 | public function enqueue() { |
| 31 | parent::enqueue(); |
| 32 | |
| 33 | $custom_background = get_theme_support( 'custom-background' ); |
| 34 | wp_localize_script( |
| 35 | 'everest-forms-customize-controls', |
| 36 | '_wpCustomizeBackground', |
| 37 | array( |
| 38 | 'defaults' => ! empty( $custom_background[0] ) ? $custom_background[0] : array(), |
| 39 | 'nonces' => array( |
| 40 | 'add' => wp_create_nonce( 'background-add' ), |
| 41 | ), |
| 42 | ) |
| 43 | ); |
| 44 | } |
| 45 | } |
| 46 |