aboutsummaryrefslogtreecommitdiff
path: root/srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
commit5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch)
tree39a1a4629749056191c05dfd899f931701b7acf3 /srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js
parent5afd237bbd22028b85532b8c0b3fcead49a00764 (diff)
downloadft_server-master.tar.gz
ft_server-master.tar.bz2
ft_server-master.zip
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js')
-rw-r--r--srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js b/srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js
deleted file mode 100644
index 91b91f3..0000000
--- a/srcs/wordpress/wp-content/themes/twentynineteen/js/customize-preview.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * File customize-preview.js.
- *
- * Theme Customizer enhancements for a better user experience.
- *
- * Contains handlers to make Theme Customizer preview reload changes asynchronously.
- */
-
-(function( $ ) {
-
- // Primary color.
- wp.customize( 'primary_color', function( value ) {
- value.bind( function( to ) {
- // Update custom color CSS.
- var style = $( '#custom-theme-colors' ),
- hue = style.data( 'hue' ),
- css = style.html(),
- color;
-
- if( 'custom' === to ){
- // If a custom primary color is selected, use the currently set primary_color_hue
- color = wp.customize.get().primary_color_hue;
- } else {
- // If the "default" option is selected, get the default primary_color_hue
- color = 199;
- }
-
- // Equivalent to css.replaceAll, with hue followed by comma to prevent values with units from being changed.
- css = css.split( hue + ',' ).join( color + ',' );
- style.html( css ).data( 'hue', color );
- });
- });
-
- // Primary color hue.
- wp.customize( 'primary_color_hue', function( value ) {
- value.bind( function( to ) {
-
- // Update custom color CSS.
- var style = $( '#custom-theme-colors' ),
- hue = style.data( 'hue' ),
- css = style.html();
-
- // Equivalent to css.replaceAll, with hue followed by comma to prevent values with units from being changed.
- css = css.split( hue + ',' ).join( to + ',' );
- style.html( css ).data( 'hue', to );
- });
- });
-
- // Image filter.
- wp.customize( 'image_filter', function( value ) {
- value.bind( function( to ) {
- if ( to ) {
- $( 'body' ).addClass( 'image-filters-enabled' );
- } else {
- $( 'body' ).removeClass( 'image-filters-enabled' );
- }
- } );
- } );
-
-})( jQuery );