From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- ...class-wp-customize-background-image-control.php | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 srcs/wordpress/wp-includes/customize/class-wp-customize-background-image-control.php (limited to 'srcs/wordpress/wp-includes/customize/class-wp-customize-background-image-control.php') diff --git a/srcs/wordpress/wp-includes/customize/class-wp-customize-background-image-control.php b/srcs/wordpress/wp-includes/customize/class-wp-customize-background-image-control.php new file mode 100644 index 0000000..b31a811 --- /dev/null +++ b/srcs/wordpress/wp-includes/customize/class-wp-customize-background-image-control.php @@ -0,0 +1,59 @@ + __( 'Background Image' ), + 'section' => 'background_image', + ) + ); + } + + /** + * Enqueue control related scripts/styles. + * + * @since 4.1.0 + */ + public function enqueue() { + parent::enqueue(); + + $custom_background = get_theme_support( 'custom-background' ); + wp_localize_script( + 'customize-controls', + '_wpCustomizeBackground', + array( + 'defaults' => ! empty( $custom_background[0] ) ? $custom_background[0] : array(), + 'nonces' => array( + 'add' => wp_create_nonce( 'background-add' ), + ), + ) + ); + } +} -- cgit