HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/themes/1751121351-config_1751121340/js/customizer.js
/* global wp, jQuery */
/**
 * File customizer.js.
 *
 * Theme Customizer enhancements for a better user experience.
 *
 * Contains handlers to make Theme Customizer preview reload changes asynchronously.
 */

( function( $ ) {
	// 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 );
		} );
	} );

	// Header text color.
	wp.customize( 'header_textcolor', function( value ) {
		value.bind( function( to ) {
			if ( 'blank' === to ) {
				$( '.site-title, .site-description' ).css( {
					clip: 'rect(1px, 1px, 1px, 1px)',
					position: 'absolute',
				} );
			} else {
				$( '.site-title, .site-description' ).css( {
					clip: 'auto',
					position: 'relative',
				} );
				$( '.site-title a, .site-description' ).css( {
					color: to,
				} );
			}
		} );
	} );

	var custom_preview = {
		'pfx_scrolltop_position' : {'sel' : 'a#pfx-scroll-top', 'css' : "left" , 'val' : "{{val}}%"},
		'pfx_scrolltop_padding' : {'sel' : 'a#pfx-scroll-top', 'css' : "padding" , 'val' : "{{val}}px"},
		'pfx_scrolltop_borderwidth' : {'sel' : 'a#pfx-scroll-top', 'css' : "border" , 'val' : "{{val}}px solid"},
		'pfx_scrolltop_borderradius' : {'sel' : 'a#pfx-scroll-top', 'css' : "border-radius" , 'val' : "{{val}}px"},
		'pfx_scrolltop_bg_color' : {'sel' : 'a#pfx-scroll-top', 'css' : "background-color" , 'val' : "{{val}}"},
		'pfx_scrolltop_color' : {'sel' : "a#pfx-scroll-top span.dashicons.dashicons-arrow-up-alt2", 'css' : "color" , 'val' : "{{val}}"},
		'pfx_scrolltop_iconsize' : {'sel' : "a#pfx-scroll-top span.dashicons.dashicons-arrow-up-alt2", 'css' : ['width', 'height', 'font-size'] , 'val' : "{{val}}px"},
	};
	
	$.each( custom_preview, function (i, value){

		// Append & Apply scrolltop setting
		wp.customize( i, function(values) {
			values.bind( function( to ){
				
				var sel = value.sel;
				var newVal = value.val;
				
				newVal = newVal.split('{{val}}').join(to);
				
				if(typeof value.css == 'object'){
					for( var kk in value.css){
							$( sel ).css( value.css[kk] , newVal );
					}
					return;
				}
				
				$( sel ).css( value.css , newVal );
			});
		});

	});
	
}( jQuery ) );