| Server IP : 103.48.194.25 / Your IP : 216.73.216.231 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/sieuthimayasia.com/public_html/wp-content/themes/mtw-maycn/assets/js/ |
Upload File : |
/**
* File customizer.js.
*
* Theme Customizer enhancements for a better user experience.
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
( function( $ ) {
var style = $( '#maycn-color-scheme-css' ),
api = wp.customize;
if ( ! style.length ) {
style = $( 'head' ).append( '<style type="text/css" id="maycn-color-scheme-css" />' )
.find( '#maycn-color-scheme-css' );
}
// Site title and description.
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '.site-description' ).text( to );
} );
} );
// Link color.
wp.customize( 'link_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( 'a' ).css( {
'color': 'transparent',
} );
} else {
$( 'a' ).css( {
'color': to,
} );
}
} );
} );
// Link hover color.
wp.customize( 'link_hover_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( 'a:hover' ).css( {
'color': 'transparent',
} );
} else {
$( 'a:hover' ).css( {
'color': to,
} );
}
} );
} );
// Text color.
wp.customize( 'text_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( 'body' ).css( {
'color': 'transparent',
} );
} else {
$( 'body' ).css( {
'color': to,
} );
}
} );
} );
// Header background color.
wp.customize( 'header_background_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-header' ).css( {
'background': 'transparent',
} );
} else {
$( '.site-header' ).css( {
'background': to,
} );
}
} );
} );
// Content background color.
wp.customize( 'content_background_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-content' ).css( {
'background': 'transparent',
} );
} else {
$( '.site-content' ).css( {
'background': to,
} );
}
} );
} );
// Footer background color.
wp.customize( 'footer_background_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-footer' ).css( {
'background': 'transparent',
} );
} else {
$( '.site-footer' ).css( {
'background': to,
} );
}
} );
} );
// Copyright background color.
wp.customize( 'copyright_background_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.copyright' ).css( {
'background': 'transparent',
} );
} else {
$( '.copyright' ).css( {
'background': to,
} );
}
} );
} );
// Menu background color.
wp.customize( 'menu_background_color', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.main-navigation' ).css( {
'background': 'transparent',
} );
} else {
$( '.main-navigation' ).css( {
'background': to,
} );
}
} );
} );
// Color Scheme CSS.
api.bind( 'preview-ready', function() {
api.preview.bind( 'update-color-scheme-css', function( css ) {
style.html( css );
} );
} );
} )( jQuery );